MCP Quickstart

Add your first MCP server to Command Code in under a minute.


1

Add an MCP server

Pick one transport:

Add MCP Server

cmd mcp add --transport http <name> <url>

Example:

Examples

cmd mcp add --transport http notion https://mcp.notion.com/mcp
2

Authenticate if prompted

Some remote servers require OAuth. Open the MCP menu:

/mcp

Follow the browser prompt to log in. Tokens are stored securely and refreshed automatically.

If needed, pass auth headers:

cmd mcp add --transport http private-api https://api.company.com/mcp \ --header "X-API-Key: your-key-here"

All options (--transport, --env, --scope, --header) must come before the server name. -- separates the server name from the local command for stdio servers.

3

Verify connection

List your configured servers:

cmd mcp list

Or inspect one server:

cmd mcp get notion

Inside a session, /mcp shows connection status and available tools.

4

Try it out

Start a session:

cmd

Then ask naturally:

Create a note on Notion named "API Design v2".

Command Code automatically discovers and calls the right MCP tools based on your request.

5

Optional: Add MCP servers from JSON

For complex setups, use JSON:

cmd mcp add-json my-server '{ "transport": "http", "url": "https://api.example.com/mcp", "headers": { "Authorization": "Bearer ${API_KEY}" } }'

Example

GitHub MCP Server

cmd mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer ghp_xxx"}}'

For copying configs between machines or scripting:

  • The JSON accepts type as an alias for transport.
  • Environment variables in config values (like ${API_KEY}) are resolved at runtime.
6

Optional: Import from Claude Desktop

If you already configured MCP servers in Claude Desktop:

cmd mcp add-from-claude-desktop

You will get an interactive picker for which servers to import.