MandAPI
English ▾
Coding tools

Use an MCP tool with a MandAPI-backed coding session

Keep model inference in MandAPI while Claude Code connects to an MCP server locally.

Use this recipe with your coding assistant

Read the prompt
Add one MCP fetch tool to my existing MandAPI-backed Claude Code session. First confirm model inference is configured through the Anthropic-compatible host https://api.mandapi.com with a private credential and a tool-capable real model ID. Inspect the current MCP configuration and uvx availability. Register web-fetch with local scope using uvx mcp-server-fetch, preserving other servers. Do not pass the MandAPI key to the MCP server. Guide /mcp inspection, one fetch of the public MandAPI homepage and a short answer based on that result, keeping normal tool confirmations. Distinguish MCP launch, fetch and model errors. Explain how to remove only this server.
TXT

Keep the two connections clear

MandAPI supplies model inference. Your coding client connects to MCP servers and executes their tools; this guide does not require a MandAPI-hosted MCP endpoint. The model still needs tool-calling support in the API format used by your client.

Start with the Claude Code MandAPI connection already working: ANTHROPIC_BASE_URL=https://api.mandapi.com, a private ANTHROPIC_AUTH_TOKEN, and an account-visible Anthropic Messages model. Other OpenAI-compatible clients normally use https://api.mandapi.com/v1 for inference. Those model URLs are not MCP server addresses.

Add one fetch tool

This example uses the reference Fetch MCP server to read a public page. Install uv from its official instructions if it is not already available; uvx launches the server package. From your project directory, register a local-scoped server:

bash
claude mcp add --transport stdio --scope local web-fetch -- uvx mcp-server-fetch
claude mcp get web-fetch

The server registration launches the fetch process on your computer. It does not need your MandAPI key as a command argument.

Run a visible tool check

Start Claude Code with the MandAPI model selected and run /mcp to inspect the server. Ask: “Use web-fetch to read https://mandapi.com/en/ and summarize its main product in two sentences. Show the source URL.” Review the normal tool confirmation when shown.

Check that a fetch result appears and the answer uses that result. Then inspect MandAPI usage for the model request. Server startup, successful fetch and successful model inference are three separate checks.

Fix or remove the server

If the MCP server fails to start, check that the launched process can find uvx. On Windows, follow the Fetch server's UTF-8 guidance for encoding-related timeouts. If fetching works but the model cannot request tools, check the selected model's tool support and the inference connection.

Remove only this example with claude mcp remove web-fetch --scope local. Keep other configured MCP servers intact.

References

Topics inspired by public documentation; instructions and examples adapted for MandAPI.