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.
| Setting | Value |
|---|---|
| URL | https://anytimereply.com/api/mcp?agent=AGENT_ID |
| Header | Authorization: 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
| Tool | Arguments | Returns |
|---|---|---|
search_knowledge | query (required), limit (1–10, default 5) | The most relevant passages with their source links, verified Q&A answers first |
ask_agent | question (required), conversation_id | A 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_lead | name, 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/listandprompts/list(both empty). - Protocol versions
2025-06-18,2025-03-26and2024-11-05. - JSON-RPC batches are supported; notifications get
202 Accepted. GETreturns405— there is no server-initiated stream.- Authentication errors return JSON-RPC error
-32001with 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