serve¶
Start a generated MCP server.
Usage¶
Arguments¶
| Argument | Description | Required |
|---|---|---|
path | Path to generated MCP server | Yes |
Options¶
| Option | Description | Default |
|---|---|---|
-p, --port <port> | Port to listen on | 3000 |
--stdio | Use stdio transport instead of HTTP | false |
--verbose | Enable verbose logging | false |
Examples¶
Start Server¶
Output:
MCP Server started
Transport: HTTP
Port: 3000
Tools: 12
URL: http://localhost:3000
Press Ctrl+C to stop
Custom Port¶
Stdio Mode¶
For direct integration with clients that support stdio:
This mode reads from stdin and writes to stdout, compatible with Claude Desktop's config.
Transport Modes¶
HTTP (Default)¶
Starts an HTTP server that accepts MCP JSON-RPC requests:
# Start server
github-to-mcp serve ./my-mcp-server -p 3000
# Test with curl
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Stdio¶
For direct process communication:
# Start in stdio mode
github-to-mcp serve ./my-mcp-server --stdio
# Claude Desktop config
{
"mcpServers": {
"my-repo": {
"command": "github-to-mcp",
"args": ["serve", "/path/to/my-mcp-server", "--stdio"]
}
}
}
Health Check¶
When running in HTTP mode, the server provides a health endpoint:
Response:
Alternative: Direct Node¶
You can also run the server directly:
Or for Python servers:
See Also¶
generate- Generate MCP server- Claude Desktop Integration - Connect to Claude