Build your own agent
Use the server from the Claude API, the OpenAI API, or any MCP client library
You do not need a coding agent. Any program that speaks MCP over HTTP can use the server with your API token. Keep the token on your server. Never ship it to a browser or a phone.
Claude API
The Messages API can connect to a remote MCP server for you. You pass the token with each request and Anthropic's servers call ours. This follows Anthropic's documentation for the MCP connector, which is in beta, so check there for the current beta header.
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: mcp-client-2025-11-20" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 2000,
"mcp_servers": [
{ "type": "url", "url": "https://ajusteur.com/api/mcp", "name": "ajusteur", "authorization_token": "'"$AJUSTEUR_API_TOKEN"'" }
],
"tools": [{ "type": "mcp_toolset", "mcp_server_name": "ajusteur" }],
"messages": [{ "role": "user", "content": "Design a fitted wardrobe for a recess 2400 mm wide, 2300 mm high and 600 mm deep." }]
}'OpenAI API
The Responses API has an mcp tool that takes a server address and a token. This follows OpenAI's documentation for remote MCP servers.
curl https://api.openai.com/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL",
"tools": [
{ "type": "mcp", "server_label": "ajusteur", "server_url": "https://ajusteur.com/api/mcp", "authorization": "'"$AJUSTEUR_API_TOKEN"'", "require_approval": "never" }
],
"input": "Design a fitted wardrobe for a recess 2400 mm wide, 2300 mm high and 600 mm deep."
}'We have not run these two requests ourselves. The server side is the same endpoint every other client uses.
An MCP client library
With the official TypeScript SDK, send the token as a header on every request.
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
const transport = new StreamableHTTPClientTransport(new URL("https://ajusteur.com/api/mcp"), {
requestInit: { headers: { Authorization: `Bearer ${process.env.AJUSTEUR_API_TOKEN}` } },
})
const client = new Client({ name: "my-agent", version: "1.0.0" })
await client.connect(transport)
const { tools } = await client.listTools()
const made = await client.callTool({
name: "design_storage_create",
arguments: { context: "fitted", widthMm: 2400, heightMm: 2300, depthMm: 600, bays: 3 },
})
console.log(made.structuredContent)Give your model the server instructions. They are the rules of the house, and initialize returns them.
Plain HTTP
No library at all: post JSON-RPC to one address. The HTTP API section has every endpoint, an OpenAPI document and a playground.
Chat apps
Custom connectors in the Claude apps and in ChatGPT sign people in with OAuth. This server takes API tokens only, so it cannot be added there yet. Use a coding agent, one of the APIs above, or your own client.
Good manners for your agent
- Start with
families_list, once. - Read
sayin every answer and pass it on. Do not compose a number of your own. - Treat
isError: trueandok: falseas answers to act on. They say what to change. - Watch
X-RateLimit-Remaining. See Errors and limits.