The complete reference for DoclyChat's MCP server and REST API -- every tool, every parameter, and how to provision isolated sub-tenants for your own clients.
MCP (Model Context Protocol) is like a universal plug that lets an AI assistant -- such as Claude -- reach into an outside app and use it directly, instead of you copy-pasting information back and forth. Turn it on for DoclyChat, and any MCP-compatible AI tool can ask your chatbot questions, pull up financial statements, and check your credit balance -- using nothing but the same API key you already have.
Every DoclyChat account already has one, waiting in Settings → API. No extra signup, no new password.
Add the DoclyChat MCP address and your key to your AI app's settings -- Settings → API shows a ready-to-paste snippet for Claude Desktop, Claude Code, and other MCP-compatible tools. No coding involved.
From then on, your AI assistant can ask your chatbot questions, look up financial statements, and check usage -- right inside the tool you already use every day.
{
"mcpServers": {
"doclychat": {
"url": "https://doclychat.com/mcp",
"headers": { "X-Api-Key": "<your API key>" }
}
}
}DoclyChat's MCP server speaks the standard MCP protocol, so it works the same way in every one of these -- copy your API key from Settings, paste the matching snippet below, and start asking.
Open Settings → Connectors → Add custom connector and paste in the URL and API key, or add this block to your claude_desktop_config.json.
{
"mcpServers": {
"doclychat": {
"url": "https://doclychat.com/mcp",
"headers": { "X-Api-Key": "<your API key>" }
}
}
}Run this once from any project directory to register DoclyChat as an MCP server for Claude Code.
claude mcp add --transport http doclychat \ https://doclychat.com/mcp \ --header "X-Api-Key: <your API key>"
These editors read the same JSON shape from their own MCP settings file (Cursor's .cursor/mcp.json, Windsurf's mcp_config.json, or Cline's MCP Servers panel) -- paste this in.
{
"mcpServers": {
"doclychat": {
"url": "https://doclychat.com/mcp",
"headers": { "X-Api-Key": "<your API key>" }
}
}
}Point any MCP-compatible client at https://doclychat.com/mcp over HTTP with an X-Api-Key header carrying your key -- no special integration needed, it's the same open standard every client above uses.
All tools are called the same way -- an X-Api-Key header carrying your tenant's key -- and every one that hits a snag returns a plain { error } instead of a cryptic status code. Click any tool below for its parameters, things you can ask, and a real example call and response.
question (string, required) -- plain-language text, or one of the slash commands below for a guaranteed JSON shape instead of free text.{ "question": "What is our return policy?" }{
"answer": "Items can be returned within 30 days...",
"sources": [
{ "document": "Returns-Policy.pdf", "page": 1, "snippet": "..." }
]
}query (string, required) -- natural language or keywords.limit (integer, optional, default 10, max 50).{ "query": "late payment fee", "limit": 5 }{
"results": [
{ "document": "Terms.pdf", "page": 4, "text": "...", "score": 0.87, "sourceUrl": null }
]
}take (integer, optional, default 20, max 100) -- how many statements to return, most recent first.{ "take": 5 }[
{
"id": "3fa85f64-...",
"document": "Q4-2024.pdf",
"fiscalYear": 2024,
"status": "Completed",
"lineItemCount": 42,
"lineItems": [
{ "account": "Revenue", "category": "Income", "amount": 128500.00 }
]
}
]{ }{
"monthlyLimit": 50000,
"creditsUsedThisPeriod": 17,
"bonusCredits": 0,
"isNearLimit": false,
"isExceeded": false
}{ }{
"plan": { "key": "pro", "name": "Pro", "monthlyCredits": 50000 },
"usage": { "monthlyLimit": 50000, "creditsUsedThisPeriod": 17 },
"autoRecharge": { "enabled": false, "thresholdCredits": 1000 }
}list_conversations: includeArchived (boolean, optional, default false), take (integer, optional, default 20, max 100).get_conversation: conversationId (string, required) -- from list_conversations.{ "take": 10 }{
"conversations": [
{ "id": "abc-123", "title": "Return policy question", "updatedAtUtc": "...", "isPinned": false }
]
}{ }{
"sources": [
{ "connectorType": "GoogleDrive", "connectorName": "Client Docs", "enabled": true,
"lastSyncedAtUtc": "...", "lastSyncStatus": "Succeeded", "lastSyncError": null }
]
}{ }{
"agents": [
{ "key": "financial-data", "name": "Financial Data", "description": "..." }
]
}query (string, required) -- a product name, SKU, or stock/price question.{ "query": "SKU-1042 stock" }{
"results": [
{ "shop": "My Shopify Store", "connectorType": "Shopify", "result": { "sku": "SKU-1042", "stock": 14 } }
]
}description (string, required) -- a concise description of the job.maxComparableItems (integer, optional, default 200).{ "description": "Austausch einer Gastherme in einem Einfamilienhaus" }{
"hasEnoughData": true,
"suggestedTotalEstimate": 3200.00,
"groups": [
{ "matchedWork": "Gastherme Austausch", "count": 14, "averagePrice": 3200, "minPrice": 2500, "maxPrice": 4100 }
]
}query (string, required).limit (integer, optional, default 10, max 50).{ "query": "parental leave policy" }{
"results": [
{ "document": "Employee-Handbook.pdf", "page": 12, "text": "...", "score": 0.91 }
]
}tenantName (string, required) -- display name for the new tenant.{ "tenantName": "Acme Corp" }{
"tenantId": "...",
"tenantName": "Acme Corp",
"apiKey": "... (shown once, store it now)"
}Running your own product on top of DoclyChat? create_sub_tenant lets your own API key provision an isolated tenant -- its own knowledge base, its own credits -- for each of your downstream clients, no DoclyChat admin involved.
Call create_sub_tenant with your own API key and a name for the client. You get back a tenantId and a brand-new apiKey -- store it immediately, it's shown once.
Push each of that client's documents into their new tenant with POST /api/knowledge/documents/ingest, using the client's own apiKey.
Ask questions or search that client's data over /mcp or REST, using the same apiKey -- fully isolated from every other tenant, including yours.
// request
{ "tenantName": "Acme Corp" }
// response -- store apiKey now, it is never shown again
{ "tenantId": "...", "tenantName": "Acme Corp", "apiKey": "..." }Each sub-tenant is headless (no email/password login) -- the apiKey returned once is the only way back in, so store it immediately.
Grab your API key from Settings → API and paste it into any MCP-compatible tool -- or start a free DoclyChat account first.
Rejoining the server...
Failed to rejoin. Please retry or reload the page.
Your session was paused by the server.
Failed to resume the session. Please retry or reload the page.
Your session has expired. Reloading…