Skip to main content
Glama

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

Install Server
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 starter template for building Model Context Protocol (MCP) servers, enabling developers to create and add custom tools that can be integrated with Claude Desktop.
                    Last updated -
                    2
                    TypeScript
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A modular, extensible Model Context Protocol server framework designed for Claude Desktop that uses convention-based automatic module discovery to easily extend AI application functionality without modifying core code.
                    Last updated -
                    3
                    Python
                  • 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
                    23
                    TypeScript
                    MIT License

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/hypermodel-labs/mcp-server-template'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server