Skip to content
AnytimeReply

OpenAI & MCP

MCP server

Give AI assistants and agent platforms access to your agent's knowledge through the Model Context Protocol.

Your agent is also an MCP server (Streamable HTTP, JSON responses), so MCP-capable AI tools can search its knowledge, ask it questions and save leads.

SettingValue
URLhttps://anytimereply.com/api/mcp?agent=AGENT_ID
HeaderAuthorization: Bearer af_live_YOUR_KEY

agent takes the agent's ID or public key. If your workspace has only one agent you can leave it out.

Tools

ToolArgumentsReturns
search_knowledgequery (required), limit (1–10, default 5)The most relevant passages with their source links, verified Q&A answers first
ask_agentquestion (required), conversation_idA ready-to-send answer with sources and a [conversation_id: …] to continue
get_business_overview—The agent's business overview: products and prices, how to buy, policies, contacts
create_leadname, email, phone, note (at least one of name, email, phone)Saves a lead (form MCP) and fires lead.created

ask_agent uses message credits like a chat reply; the others don't.

Example

Shell
curl "https://anytimereply.com/api/mcp?agent=AGENT_ID" \
  -H "Authorization: Bearer af_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_knowledge","arguments":{"query":"refund policy"}}}'
200 OK
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{ "type": "text", "text": "VERIFIED ANSWER\nQ: Can I get a refund?\nA: Yes, within 7 days…\n\n---\n\nRefund policy (https://example.com/refunds)\n…" }]
  }
}

Protocol details

  • Supported methods: initialize, ping, tools/list, tools/call, resources/list and prompts/list (both empty).
  • Protocol versions 2025-06-18, 2025-03-26 and 2024-11-05.
  • JSON-RPC batches are supported; notifications get 202 Accepted.
  • GET returns 405 — there is no server-initiated stream.
  • Authentication errors return JSON-RPC error -32001 with the HTTP status (401 or 429). Unknown methods return -32601.

To use someone else's MCP server as actions inside your agent, see Connect an MCP server.

Was this page helpful?
Still stuck? Contact us
MCP server – API reference · AnytimeReply