Clark Farming CompanySoftware Foundry

AI / Agent Reference · Reference

Model-Context-Protocol

Model Context Protocol is an open protocol that standardizes how AI applications connect to external tools and data sources. Created by Anthropic (November 2024), it provides a unified interface for integrating Large Language Models with local files, databases, APIs, and custom tools. It has become the de facto standard for AI agent tool integration as of 2026. Key Features: Open-source specification with TypeScript-…

draftneeds-review0 source links4 resolved links
wiki/wiki/ai-ml/model-context-protocol.md

Answer

Model Context Protocol is an open protocol that standardizes how AI applications connect to external tools and data sources. Created by Anthropic (November 2024), it provides a unified interface for integrating Large Language Models with local files, databases, APIs, and custom tools. It has become the de facto standard for AI agent tool integration as of 2026. Key Features: Open-source specification with TypeScript-…

Auto-generated neutral summary from the source page — needs human review before trusted use.

Evidence & Source Cards

No explicit artifact, library, or external source links found in this sample slice. Evidence state remains needs-review.

Source Excerpt

Model Context Protocol is an open protocol that standardizes how AI applications connect to external tools and data sources. Created by Anthropic (November 2024), it provides a unified interface for integrating Large Language Models with local files, databases, APIs, and custom tools. It has become the de facto standard for AI agent tool integration as of 2026.

Adoption and Ecosystem

Key Features:

Used by: entities/gitnexus (code intelligence, where MCP is a core component of the architecture used as the integration protocol), Cursor, Claude Code, Codex, Claude Desktop, entities/hermes-agent, and many other AI agent platforms.

Architecture

Three-Component Model

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Client    │◄───►│    Host     │◄───►│   Server    │
│  (Large Language Model App)  │     │  (Manager)  │     │ (Tool/Data) │
└─────────────┘     └─────────────┘     └─────────────┘

Client: The AI application (Claude Desktop, Cursor, Hermes, etc.) that initiates requests.

Host: Middleware that manages server connections, handles authentication, and routes requests.

Server: Tool or data provider that exposes capabilities through the Model Context Protocol protocol.

Transport Layers

TransportProtocolUse Case
stdiostdin/stdout JSON-RPCLocal tools, simple deployment
SSEServer-Sent EventsRemote servers, push notifications
Streamable HTTPHTTP + SSEBidirectional, stateful connections

JSON-RPC 2.0

All Model Context Protocol communication uses JSON-RPC 2.0:

// Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "read_file",
    "arguments": { "path": "/path/to/file.txt" }
  }
}

// Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{ "type": "text", "text": "File contents..." }],
    "isError": false
  }
}

MCP Primitives

Tools

Executable functions with JSON schema definitions.

{
  "name": "search_files",
  "description": "Search for files by name pattern",
  "inputSchema": {
    "type": "object",
    "properties": {
      "pattern": { "type": "string", "description": "Glob pattern" },
      "path": { "type": "string", "description": "Search directory" }
    },
    "required": ["pattern"]
  }
}

Resources

Readable data sources addressed by URI.

file:///path/to/file.txt
sqlite:///database.db?table=users
git:///repo/path?file=README.md

Resources support:

Prompts

Reusable prompt templates with parameters.

{
  "name": "summarize_file",
  "description": "Summarize the contents of a file",
  "arguments": [
    {
      "name": "path",
      "description": "Path to the file",
      "required": true
    }
  ]
}

Sampling

Request the client to generate Large Language Model output (model-as-a-tool).

{
  "method": "sampling/createMessage",
  "params": {
    "messages": [{ "role": "user", "content": "Summarize this..." }],
    "maxTokens": 1000
  }
}

Server Implementation

Python (mcp-sdk)

from Model Context Protocol.server import Server
from Model Context Protocol.types import Tool, TextContent

server = Server("my-tool-server")

@server.list_tools()
async def list_tools() -> list[Tool]:
    return [
        Tool(
            name="read_file",
            description="Read a file from the filesystem",
            inputSchema={
                "type": "object",
                "properties": {
                    "path": {"type": "string"}
                },
                "required": ["path"]
            }
        )
    ]

@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
    if name == "read_file":
        content = open(arguments["path"]).read()
        return [TextContent(type="text", text=content)]

Node.js

import { McpServer } from "@modelcontextprotocol/sdk/server/Model Context Protocol.js";

const server = new McpServer({
  name: "my-tool-server",
  version: "1.0.0"
});

server.tool("read-file", { path: String }, async ({ path }) => ({
  content: [{ type: "text", text: fs.readFileSync(path, "utf-8") }]
}));

Client Integration

Claude Desktop

Add servers to claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
    },
    "database": {
      "command": "python",
      "args": ["./db_server.py"]
    }
  }
}

Hermes Agent

Configure Model Context Protocol servers in config.yaml:

Model Context Protocol:
  servers:
    filesystem:
      command: npx
      args: ["-y", "@modelcontextprotocol/server-filesystem", "~/wiki"]

Security

Authentication

Source excerpt truncated at 220 of 254 lines. Open the canonical wiki path above for the full page.

Relationships

Outbound links

Referenced by

Tags

ai-mlmcpprotocoltoolsintegrationstandard