AnswerLine Sign in Start free

MCP · Agents

Giving an AI agent live answer data with the MCP server

A model answers from its training data. Through the MCP server, an agent can instead see what AI assistants show people today, as structured JSON it can reason over. This post covers connecting, the tools the agent gets, prompts that use them well, and the guardrails worth setting.

Connect

The server speaks MCP over Streamable HTTP. Take the endpoint from the MCP guide and send your API key as a bearer token, for example in Claude Code:

claude mcp add --transport http answers "$MCP_URL" --header "Authorization: Bearer $API_KEY"

$MCP_URL is that endpoint, ending in /mcp. Clients that cannot set headers can use the form with the key in the path (/<API_KEY>/mcp); treat that URL as a secret.

What the agent gets

One tool per engine your account can use, named after its endpoint (chatgpt, google_news, …), plus credits. A tool’s input schema is the API’s request schema, so its arguments are the request body: prompt and country for ChatGPT, plus options such as state or include.searchQueries. The result is the API response, with credit and rate-limit headers under _meta.

Errors come back as results marked isError with the API’s error body, so the agent can read code: CONCURRENT_LIMIT_EXCEEDED means wait for a running call, INSUFFICIENT_CREDITS means stop.

Prompts that use it well

Agents do best with a concrete comparison to run:

Guardrails

Try it on your own prompts

500 free credits a month, no card. One POST returns the answer, sources and citations as JSON.

Keep reading