MCP Server Template

MCP-Servervorlage 🛠️

Eine Startervorlage zum Erstellen Ihres eigenen Model Context Protocol (MCP)-Servers. Diese Vorlage bietet die grundlegende Struktur und Einrichtung zum Erstellen benutzerdefinierter MCPs, die mit Cursor oder Claude Desktop verwendet werden können.

Merkmale

  • Grundlegende Einrichtung des MCP-Servers mit TypeScript
  • Beispielhafte Toolimplementierung
  • Einsatzbereite Projektstruktur
  • Erstellt mit @modelcontextprotocol/sdk

Projektstruktur

mcp-server-template/ ├── index.ts # Main server implementation ├── package.json # Project dependencies ├── tsconfig.json # TypeScript configuration └── build/ # Compiled JavaScript output

Erste Schritte

  1. Klonen Sie diese Vorlage:
git clone [your-repo-url] my-mcp-server cd my-mcp-server
  1. Installieren Sie Abhängigkeiten:
pnpm install
  1. Erstellen Sie das Projekt:
pnpm run build

Dadurch wird die Datei /build/index.js generiert – Ihr kompiliertes MCP-Serverskript.

Verwendung mit Cursor

  1. Gehen Sie zu Cursoreinstellungen -> MCP -> Neuen MCP-Server hinzufügen
  2. Konfigurieren Sie Ihr MCP:
    • Name: [wählen Sie Ihren eigenen Namen]
    • Typ: Befehl
    • Befehl: node ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js

Verwendung mit Claude Desktop

Fügen Sie Ihrer Claude Desktop-Konfiguration die folgende MCP-Konfiguration hinzu:

{ "mcpServers": { "your-mcp-name": { "command": "node", "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js"] } } }

Entwicklung

Die Vorlage enthält eine Beispiel-Toolimplementierung in index.ts . So erstellen Sie Ihr eigenes MCP:

  1. Ändern Sie die Serverkonfiguration in index.ts :
const server = new McpServer({ name: "your-mcp-name", version: "0.0.1", });
  1. Definieren Sie Ihre benutzerdefinierten Tools mit der Methode server.tool() :
server.tool( "your-tool-name", "Your tool description", { // Define your tool's parameters using Zod schema parameter: z.string().describe("Parameter description"), }, async ({ parameter }) => { // Implement your tool's logic here return { content: [ { type: "text", text: "Your tool's response", }, ], }; } );
  1. Erstellen und testen Sie Ihre Implementierung:
npm run build

Beitragen

Senden Sie uns gerne Probleme und Verbesserungsvorschläge!

Lizenz

MIT

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

Eine Startervorlage zum Erstellen von Model Context Protocol-Servern, die in Cursor oder Claude Desktop integriert werden können, sodass Entwickler benutzerdefinierte Tools und Erweiterungen für KI-Assistenten erstellen können.

  1. Merkmale
    1. Projektstruktur
      1. Erste Schritte
        1. Verwendung mit Cursor
          1. Verwendung mit Claude Desktop
            1. Entwicklung
              1. Beitragen
                1. Lizenz

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants to explore and interact with Cursor IDE's SQLite databases, providing access to project data, chat history, and composer information.
                    Last updated -
                    10
                    Python
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
                    Last updated -
                    1
                    Python
                    • Linux
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.
                    Last updated -
                    275
                    JavaScript
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.
                    Last updated -
                    1
                    TypeScript
                    MIT License

                  View all related MCP servers

                  ID: vnt96edg3a