# Model Context Protocol (MCP)

The Model Context Protocol, MCP, is an open protocol that lets AI applications connect to external tools and data: a server offers resources, prompts and tools, and the client in an AI application calls them over JSON-RPC 2.0 messages. Meadowstack uses it twice: its kit runs a small MCP server so coding tools find existing components, and its starter has a settings page for the MCP server your app would offer its users.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/glossary/model-context-protocol/

*The kit's MCP server declares its first tool: find a component before writing one.*

From `packages/kit/src/mcp/server.mjs` in the Meadowstack repository:

```js
const TOOLS = [
  {
    name: "find_component",
    title: "Find a kit component",
    description:
      'Search the kit for the part that does what you were about to build ("boční panel záznamu", "table of invoices", "confirm before delete"). Returns the best matches with their import, summary and archetypes.',
    inputSchema: {
      type: "object",
      properties: {
        query: { type: "string", description: "What you need, in your own words (Czech or English)." },
        archetype: { type: "string", enum: archetypes, description: "Keep parts allowed on this Screen archetype." },
        limit: { type: "integer", minimum: 1, maximum: 20, description: "How many results (default 5)." },
      },
      required: ["query"],
```

## Why it matters in a business app

Two reasons, one for the people who build the app and one for those who use it.

**Building:** a coding tool that can ask "does the kit already have a side panel?" reuses it instead of writing a fourth one. **Using:** once your app offers an MCP server, an assistant such as Claude or ChatGPT can read orders or propose a change on a person's behalf. That second case carries risk, which is why the specification's principles are that users consent to and understand every data access and operation, and that hosts obtain consent before invoking any tool.

## How Meadowstack handles it

**The kit's server** (`packages/kit/src/mcp/server.mjs`) speaks MCP over stdio with no SDK: three tools, `find_component`, `get_component` and `list_components`, answered from the kit's manifest of 126 components. It negotiates the protocol versions it lists, from 2024-11-05 to 2025-06-18; the current specification is dated 2026-07-28, so check your client's version before you rely on it.

**Your app's server** is not shipped in 2.1. The starter's Settings, MCP and AI page (`workspace/settings-mcp.tsx`) says so instead of showing an address or a key that does not exist, lists what a server needs, and states its rules: an assistant never gets more rights than the person who connected it, every change waits for a person's yes, and every call is logged. The recipe `docs/recipes/integrations-and-mcp.md` describes the server: tools are the app's own api functions, run as the person, read only by default. See also [prompt injection](https://meadowstack.com/glossary/prompt-injection/) and [least privilege](https://meadowstack.com/glossary/least-privilege/).

## Common mistakes

- **A write tool that writes.** In the recipe a write tool stores a pending change and waits for a person's yes in the app.
- **A service account behind the server.** The assistant then sees more than the person who asked.
- **Trusting tool descriptions from anywhere.** The specification says descriptions of tool behaviour should be treated as untrusted unless they come from a trusted server.
- **No log.** "Who called what" is the first question when something odd happens.

## How Claude Code starts it

*The repository's .mcp.json: one local server, started with Node, no dependency added.*

From `.mcp.json` in the Meadowstack repository:

```json
{
  "mcpServers": {
    "meadowstack-kit": {
      "command": "node",
      "args": ["packages/kit/src/mcp/server.mjs"]
```

## Questions

### Is MCP only for Claude?

No. It is an open protocol with a public specification, and many AI applications and coding tools act as MCP clients.

### Does Meadowstack include an MCP server for my app's data?

Not in 2.1. The kit's server answers questions about components for coding tools; for your app's data the starter has the settings page and the recipe, and you build the server with your backend.

### What can an MCP server offer?

Resources (context and data), prompts (templated messages) and tools (functions the model can call). The kit's server offers three tools.

## Sources

- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/latest), checked 2 December 2026

## Related

- [Field: the label, hint and message of every input](https://meadowstack.com/components/field/) (Components)
- [AGENTS.md](https://meadowstack.com/glossary/agents-md/) (Glossary)
- [A secure vibe coding checklist for business apps](https://meadowstack.com/blog/secure-vibe-coding-checklist/) (Blog)
- [What to put in AGENTS.md for a React app](https://meadowstack.com/guides/agents-md-for-react-business-apps/) (Guide)
- [Framework quick start: from clone to your app](https://meadowstack.com/framework/start/) (Meadowstack)
- [Team and roles, with the rules in code](https://meadowstack.com/screens/roles-and-permissions/) (Screens)
