Claude Code · Configuration files
Add a local MCP server
Run a local MCP server as a subprocess. Everything after -- is the command that starts it.
claude mcp add --transport stdio my-server --env API_KEY=your-api-key -- npx -y my-mcp-server
Official Claude Code documentation