Das Repository github.com/modelcontextprotocol/servers enthält sieben aktuelle Referenzserver (Stand 24.09.2026) – gedacht als Lehrbeispiele, nicht als fertige Produkte. Namen, Beschreibungen und Schemas unten stammen aus deren Quelltext; alle Argumente und Pfade sind synthetisch.
7
Referenzserver
39
Tools (ohne Everything)
TS + Python
Sprachen
stdio
Standard-Transport
🗂️Die Referenzserver im Überblick
TypeScript-Server nutzen McpServer + registerTool mit Zod, Python-Server die Low-Level-API mit Pydantic-Schemas.
📁 Filesystem secure-filesystem-server
14 Tools
Sichere Dateioperationen mit konfigurierbarer Zugriffskontrolle.
Acht Tools der Referenzserver plus drei neutrale Beispiele (get_weather aus der Spezifikation, search_docs und create_ticket frei erfunden).
Tool-Definition (wie in tools/list)
{
"name": "fetch",
"description": "Fetches a URL from the internet and optionally extracts its contents as markdown.\n\nAlthough originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.",
"inputSchema": {
"description": "Parameters for fetching a URL.",
"properties": {
"url": {
"description": "URL to fetch",
"format": "uri",
"minLength": 1,
"title": "Url",
"type": "string" },
"max_length": {
"default": 5000,
"description": "Maximum number of characters to return.",
"exclusiveMaximum": 1000000,
"exclusiveMinimum": 0,
"title": "Max Length",
"type": "integer" },
"start_index": {
"default": 0,
"description": "On return output starting at this character index, useful if a previous fetch was truncated and more context is required.",
"minimum": 0,
"title": "Start Index",
"type": "integer" },
"raw": {
"default": false,
"description": "Get the actual HTML content of the requested page, without simplification.",
"title": "Raw",
"type": "boolean" } },
"required": ["url"],
"title": "Fetch",
"type": "object" }}
class Fetch(BaseModel):
"""Parameters for fetching a URL."""
url: Annotated[AnyUrl, Field(description="URL to fetch")]
max_length: Annotated[int, Field(default=5000,
description="Maximum number of characters to return.", gt=0, lt=1000000)]
start_index: Annotated[int, Field(default=0, description="…", ge=0)]
raw: Annotated[bool, Field(default=False, description="…")]
server = Server("mcp-fetch")
@server.list_tools()
async def list_tools() -> list[Tool]:
return [Tool(name="fetch", description="…", inputSchema=Fetch.model_json_schema())]
@server.call_tool()
async def call_tool(name, arguments: dict) -> list[TextContent]:
args = Fetch(**arguments) # Validierung durch Pydantic
…
return [TextContent(type="text", text=f"{prefix}Contents of {url}:\n{content}")]
time/server.py – Schema von Hand + Annotationspy
Tool(
name="get_current_time",
description="Get current time in a specific timezone",
inputSchema={
"type": "object",
"properties": {
"timezone": {
"type": "string",
"description": f"IANA timezone name (…). Use '{local_tz}' as local timezone …",
}
},
"required": ["timezone"],
},
annotations=ToolAnnotations(readOnlyHint=True, destructiveHint=False,
idempotentHint=True, openWorldHint=False),
)
💡 Drei Wege zum Schema
Zod-Shape (Filesystem, TypeScript-SDK erzeugt das JSON Schema), Pydantic-Modell (Fetch, Git: model_json_schema()) und JSON Schema direkt von Hand (Time). Für den Client sieht alles gleich aus – ein JSON Schema im tools/list-Ergebnis.
🏷️ Wie der Host die Namen sieht
Claude Code setzt vor jedes Tool mcp__<Server-Schlüssel>__, z. B. mcp__fetch__fetch oder mcp__filesystem__read_text_file. So kollidieren gleichnamige Tools verschiedener Server nicht.
⚙️Einbinden in einen Host
Das verbreitete mcpServers-Format (Claude Desktop, Claude Code u. a.). Pfade und URL sind Beispiele.
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /projekt
claude mcp add fetch -- uvx mcp-server-fetch
claude mcp add --transport http beispiel-remote https://mcp.example.org/mcp
claude mcp list # → filesystem: … ✓ Connected
Drei Einbindungs-Orte in Claude Code
--scope project → .mcp.json im Projekt (geteilt, z. B. per Git)
--scope user → Benutzerkonfiguration von Claude Code (alle Projekte)
--scope local → Benutzerkonfiguration, nur für das aktuelle Projekt
🔒 Secrets
Zugangsdaten für stdio-Server stehen in env – im Klartext in der Konfigurationsdatei. Nie teilen oder einchecken; in geteilten.mcp.json-Dateien Platzhalter wie ${API_TOKEN} verwenden.