Every MCP client starts a local server the same way: it runs a command and talks to it over stdio. Remote servers are reached by URL over Streamable HTTP. Use absolute paths in every config below.
Claude Code#
# local, over stdio
claude mcp add weather -- node /absolute/path/main.ts
# remote, over HTTP
claude mcp add --transport http weather https://example.com/mcpAdd --scope project to write the server to .mcp.json and share it with your team.
Claude Desktop#
Edit claude_desktop_config.json (Settings → Developer → Edit Config), then restart the app:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/absolute/path/main.ts"]
}
}
}Cursor#
Create .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"weather": { "command": "node", "args": ["/absolute/path/main.ts"] },
"remote-weather": { "url": "https://example.com/mcp" }
}
}VS Code#
Create .vscode/mcp.json:
{
"servers": {
"weather": { "type": "stdio", "command": "node", "args": ["/absolute/path/main.ts"] },
"remote-weather": { "type": "http", "url": "https://example.com/mcp" }
}
}MCP Inspector#
npx @modelcontextprotocol/inspector node /absolute/path/main.tsTo inspect an HTTP server, start it with serve({ http: 3000 }), open the Inspector, pick Streamable HTTP and enter http://127.0.0.1:3000/mcp. The Inspector runs on localhost, which picomcp allows by default.
Bun and Deno#
Replace node with your runtime:
{ "command": "bun", "args": ["/absolute/path/main.ts"] }{ "command": "deno", "args": ["run", "--allow-net", "/absolute/path/main.ts"] }Troubleshooting#
The client shows no tools. Run the command from the config yourself. If it exits or prints an error, the client sees the same thing.
"Unexpected token" or JSON errors in the client log. Something wrote to stdout. picomcp redirects console.log to stderr while serving over stdio, but other libraries may write to process.stdout directly.
Node says it cannot run .ts files. Upgrade to Node 22.18 or later, or run the server with Bun.