Quick answer
From a terminal opened in the project where you want to use MCP, add Anthropic’s hosted Claude Code documentation server:
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
Start Claude Code in that same project and run /mcp. The server’s Connected status indicates that it connected; registering the command by itself does not establish a working connection. Then ask Claude to search the documentation server and check the tool call and results in Claude’s output. The example is hosted and requires no authentication or special configuration, according to the official quickstart. By default, the command registers it for you in this project, not across your other projects. (code.claude.com)
Before you start
You need Claude Code installed and authenticated, and a terminal open in a project directory. The official quickstart says any directory works, including an empty one. Run claude mcp add in the terminal before starting your Claude Code session—not at Claude Code’s prompt. (code.claude.com)
This example connects to a hosted HTTP server that provides full-text search over Claude Code documentation. It is a simple first connection because it needs no separate server installation or authentication. Other servers may require different transports, sign-in steps, credentials, and permissions. (code.claude.com)
Add the MCP server
-
Open a terminal in the project where you want to use the server.
-
Run:
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp -
The command registers the hosted server in your local configuration for you in this project. The name
claude-code-docsis a label you choose; it can be changed. -
Start Claude Code in that same project by running
claude. -
In the session, run:
/mcpCheck the server’s status. A Connected status indicates it connected; if it is not connected, it is registered but not ready to use. (
code.claude.com)
Test that the server’s search tool works
Ask Claude Code for something that requires searching the documentation, such as:
Use the claude-code-docs MCP server to find the MCP quickstart and summarize how to connect a server.
In Claude’s output, check for a tool call labeled with the server name, claude-code-docs, and confirm the returned tool result contains relevant documentation-search content. Anthropic’s quickstart identifies the server-name label as a way to confirm the answer came from the MCP server rather than Claude’s built-in knowledge. If Claude asks permission the first time it calls the server, approve it. A plausible final answer without the labeled tool call and relevant result is not an end-to-end confirmation. (code.claude.com)
If it doesn’t connect
- The server is missing from
/mcp: Confirm you ran the add command in a terminal and started Claude Code from the same project. By default, this command’s local scope applies to you in that project only. (code.claude.com) - The server appears but search does not work: Check that the URL is exactly
https://code.claude.com/docs/mcp, then retry the search prompt. This example needs no authentication; do not assume another server does. (code.claude.com) - You’re adding a different MCP server: Follow that server’s instructions for its transport, URL or launch command, sign-in, credentials, and permissions.
Only connect servers you trust. Anthropic warns that servers fetching external content can expose you to prompt-injection risk. (code.claude.com)
MCP setup is separate from a production model API
MCP connects Claude Code to tools and data sources. Model-provider or gateway configuration determines where model requests go and how Claude Code authenticates to that provider. Adding an MCP server does not configure a model API, and configuring a model API does not add MCP tools; Claude Code documents MCP and LLM gateway setup separately. (code.claude.com)
The task does not specify which production API provider you intend to use. If you mean Token Forge Cloud, its public site describes managed model APIs, but the available product information here does not establish a Claude Code endpoint, authentication settings, model identifier, or supported integration path. Get those details from the provider’s applicable technical documentation before configuring production access.
Anthropic’s gateway documentation says it does not support routing Claude Code to non-Claude models through a gateway. Do not assume that an MCP connection—or a provider’s API compatibility—means a particular non-Claude model is a supported Claude Code backend. Verify the provider and model against the documented integration path first. (code.claude.com)
For provider-specific production instructions, identify the provider and intended model, then confirm its official base URL, authentication method, supported API format, and any version or region requirements. Keep provider credentials distinct from MCP server credentials: each service may have its own authentication and permission requirements.
Sources
Connect to MCP servers — Claude Code Docs
Debug your configuration — Claude Code Docs
