
MCP 启动器
STDIO基础MCP服务器框架,支持AI客户端运行本地工具
基础MCP服务器框架,支持AI客户端运行本地工具
Want to build your own MCP server?
MCP Server Starter gives you a basic structure to run local tools with Cursor, Claude, and others using the MCP standard.
📡 Flexible Communication
stdio
: Local usageStreamable HTTP
: Remote and local useagesse
: Remote and local usage (deprecated)~~📦 Minimal Setup - Get started quickly with a basic server implementation.
🤖 Cursor AI Integration - Includes example .cursor/mcp.json
configuration.
⌨️ TypeScript - Add type safety to your project.
Model Context Protocol Supports multiple Transport methods.
Recommend for local setups
Add the code snippets below
.cursor/mcp.json
Local development/testing
Use this if you want to test your mcp server locally
{ "mcpServers": { "my-starter-mcp-stdio": { "command": "node", "args": ["./bin/cli.mjs", "--stdio"] } } }
Published Package
Use this when you have published your package in the npm registry
{ "mcpServers": { "my-starter-mcp-stdio": { "command": "npx", "args": ["my-mcp-server", "--stdio"] } } }
Important: Streamable HTTP is not supported in Cursor yet
Recommend for remote server usage
Important: In contrast to stdio you need also to run the server with the correct flag
Local development
Use the streamable http
transport
node ./bin/cli.mjs --http --port 4200
Or with mcp inspector
npm run dev-http
# npm run dev-sse (deprecated)
{ "mcpServers": { "my-starter-mcp-http": { "command": "node", "args": ["./bin/cli.mjs", "--http", "--port", "4001"] // "args": ["./bin/cli.mjs", "--sse", "--port", "4002"] (or deprecated sse usage) } } }
Published Package
Use this when you have published your package in the npm registry
Run this in your terminal
npx my-mcp-server --http --port 4200 # npx my-mcp-server --sse --port 4201 (deprecated)
{ "mcpServers": { "my-starter-mcp-http": { "url": "http://localhost:4200/mcp" // "url": "http://localhost:4201/sse" } } }
Use the inspect
command to debug your mcp server
Protocol | Description | Flags | Notes |
---|---|---|---|
stdio | Standard I/O | (None) | Default |
http | HTTP REST | --port <num> (def: 3000), --endpoint <path> (def: /mcp ) | |
sse | Server-Sent Events | --port <num> (def: 3000) | Deprecated |
This project is licensed under the MIT License - see the LICENSE file for details.