Diese Anleitung ist noch nicht übersetzt und wird deshalb auf Englisch angezeigt.

MCP server

Grounded exposes your knowledge base over the Model Context Protocol, so any MCP client — Claude Desktop, Claude Code, Cursor, or your own agent — can search your documentation and get cited answers.

Available on Pro and Business.

Endpoint

https://grounded.buzz/api/mcp

Transport: Streamable HTTP (spec 2025-06-18), stateless — a single endpoint accepting POST. A GET (the optional server-to-client stream) is answered with 405, as the spec allows; clients carry on over POST. The older HTTP+SSE transport is not supported.

Authentication

Create a key under Settings → API keys. It is shown once.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx

Keys are stored as SHA-256 hashes; we cannot recover a lost key, only replace it.

Current limitation. The MCP specification expects OAuth 2.1 for remote servers. Grounded currently authenticates with an organization API key. This is documented deliberately rather than glossed over; OAuth support is planned.

Tools

search_knowledge

Returns the passages most relevant to a query, with their sources. The calling agent decides what to do with them.

{
  "name": "search_knowledge",
  "arguments": { "query": "how to rotate an API key", "bot": "Acme Docs", "limit": 5 }
}

bot is the bot's name or public key. When the organization has one bot it can be left out; with several, a call without it is refused with the names to choose from.

Response: { passages: [{ content, document_title, section, anchor, score }] }, and the same passages as numbered text.

ask

Returns a complete grounded answer with citations — the same pipeline the widget uses.

{
  "name": "ask",
  "arguments": { "question": "How do I rotate an API key?", "bot": "Acme Docs" }
}

Response: { answer, citations: [{ document_title, section, anchor }], confidence, conversation_id } where confidence is answered | uncertain | no_answer. Pass conversation_id back to continue the same conversation. The exchange appears in the dashboard under Conversations with the channel MCP, and an unanswered question lands in Content Gaps like any other.

Each ask call uses pebbles, like any answer. search_knowledge does not.

upload_document

Puts Markdown into a bot's knowledge base — for keeping the bot in sync from a script or an agent instead of dragging files into the dashboard. One document per call.

{
  "name": "upload_document",
  "arguments": {
    "bot": "Acme Docs",
    "title": "Refunds",
    "content": "# Refunds\n\nRefunds take 5 days."
  }
}

Only for a key created with "Allow changes". Every other key — including every key created before this tool existed — does not see it in tools/list and cannot call it. The permission is set when the key is created and cannot be changed; create a new key for a script that writes.

Upserted by title, within the bot:

You send status What happens
A title this bot has no upload for created A new document, indexed in the background
A title you uploaded before, new text replaced The same document (same document_id), re-indexed
A title you uploaded before, same text unchanged Nothing is written and nothing is re-indexed

So re-running a sync is safe: it costs one indexing per document that actually changed. Only documents uploaded through this tool are matched — one added by hand in the dashboard is never replaced, even with the same title. Documents uploaded this way show the source MCP in the list.

Response: { document_id, status, title }. Indexing starts after the call returns and takes from seconds to a minute; until it finishes, search_knowledge does not see the new text. The plan's document limit applies, as in the dashboard. Up to 500 000 characters per document.

closes_gaps (optional) takes the gap_ids from list_content_gaps: the gaps this document answers. They leave the open list and show the document as what closed them, as when a draft is published from Content Gaps. Only open gaps of the same bot are closed; the response's gaps_closed says how many were.

Not in this tool: deleting or listing documents.

Syncing a folder of Markdown

The title is the file's first # heading, or its name. Calls are counted against the key's per-minute limit, so the script waits when told to:

// node sync.mjs ./help "Acme Docs"   (GROUNDED_KEY in the environment)
import { readdir, readFile } from 'node:fs/promises'
import { basename, join } from 'node:path'

const [dir, bot] = process.argv.slice(2)
for (const file of (await readdir(dir)).filter((name) => name.endsWith('.md'))) {
  const content = await readFile(join(dir, file), 'utf8')
  const title = content.match(/^# (.+)$/m)?.[1].trim() ?? basename(file, '.md')
  const call = { name: 'upload_document', arguments: { bot, title, content } }
  let res
  while ((res = await post(call)).status === 429) {
    await new Promise((done) =>
      setTimeout(done, Number(res.headers.get('retry-after') ?? 5) * 1000),
    )
  }
  const { result, error } = await res.json()
  console.log(file, error?.message ?? result.structuredContent?.status ?? result.content[0].text)
}

function post(params) {
  return fetch('https://grounded.buzz/api/mcp', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.GROUNDED_KEY}`,
      'Content-Type': 'application/json',
      Accept: 'application/json, text/event-stream',
      'MCP-Protocol-Version': '2025-06-18',
    },
    body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/call', params }),
  })
}

list_content_gaps

The questions a bot could not answer from its documentation — the dashboard's Content Gaps, grouped the same way: one row per need, most asked first. Only for a key created with "Allow changes"; the questions are your visitors' words.

{ "name": "list_content_gaps", "arguments": { "bot": "Acme Docs", "limit": 20 } }

bot is optional — every bot when left out. Response: { gaps: [{ gap_ids, bot, question, times_asked, not_helpful, last_asked_at, pages }], total }.

To close a gap, write the missing document and upload it with closes_gaps: gap_ids. In Claude Desktop that is one request: "Go through our open gaps in Grounded and write the missing answers from our repo and the support tickets — ask me what you can't find, show me each document before you upload it."

Write from sources, not from memory. An assistant's general knowledge of your product is the one thing that must not reach the bot: whatever you upload is cited back to visitors as your documentation, so an invented limit or setting becomes a confident wrong answer. The tool tells the agent so; you are the one who approves each upload.

The questions are typed by anonymous visitors, so they are returned as data — one line each, at most 300 characters — and the tool tells the agent never to act on instructions inside them. Read what the agent proposes before approving a write.

get_bot_settings and update_bot_settings

Read and change a bot's settings from an agent — the same fields as the bot's Settings page, with the same checks. Only for a key created with "Allow changes"; a read-only key sees neither, because a bot's instructions and escalation address are not every integration's business.

{
  "name": "update_bot_settings",
  "arguments": {
    "bot": "Acme Docs",
    "system_prompt": "Answer in British English. Call the product Acme, never ACME."
  }
}
Field Notes
name Up to 60 characters
model An OpenRouter id. Free has one; paid plans may name any capable model
system_prompt Instructions added to every answer. Up to 4 000 characters
welcome_message The first message a visitor sees. Up to 300 characters
escalation_email Where unanswered questions are reported
handoff_url An http(s) link under a question the docs cannot answer
handoff_label That link's text. Up to 40 characters
suggestion_mode automatic (made from document titles), own, or off
suggestions Your own starter questions: one to three, up to 120 characters each
show_sources false hides the source chips under answers; citations are still kept

Send only what changes; everything else is left as it is. "" or null clears a field (not name or model). Both tools return all ten fields. suggestion_mode: "own" needs at least one question, in the same call or already saved. A change applies to the next answer, in the dashboard and in the widget.

Pausing a bot is deliberately not here: a paused bot disappears from the key's own tool list and its widget stops answering, which is a decision for the dashboard.

Claude Desktop

Claude Desktop connects to remote servers through Settings → Connectors → Add custom connector, which takes a URL and no headers. Use the key-in-path form:

https://grounded.buzz/api/mcp/sk_live_xxxxxxxxxxxxxxxx

The tools appear in the tool menu once the connector is enabled. If you would rather keep the key out of a URL, run the server through mcp-remote in claude_desktop_config.json:

{
  "mcpServers": {
    "grounded": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://grounded.buzz/api/mcp",
        "--header",
        "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx"
      ]
    }
  }
}

Claude Code

claude mcp add --transport http grounded https://grounded.buzz/api/mcp \
  --header "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxx"

Cursor

.cursor/mcp.json:

{
  "mcpServers": {
    "grounded": {
      "url": "https://grounded.buzz/api/mcp",
      "headers": { "Authorization": "Bearer sk_live_xxxxxxxxxxxxxxxx" }
    }
  }
}

Trying it with curl

KEY=sk_live_xxxxxxxxxxxxxxxx
curl -s -X POST https://grounded.buzz/api/mcp \
  -H "Authorization: Bearer $KEY" -H 'MCP-Protocol-Version: 2025-06-18' \
  -H 'Accept: application/json, text/event-stream' -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_knowledge","arguments":{"query":"install the widget","bot":"Acme Docs"}}}'

Responses are plain JSON (one body per call), not an SSE stream.

Clients that cannot send headers

Some clients accept only a URL. Use a key-in-path endpoint:

https://grounded.buzz/api/mcp/sk_live_xxxxxxxxxxxxxxxx

This is less safe — the key can end up in logs and browser history. Prefer the header form where the client supports it, and rotate a path-form key if it is ever exposed.

Security

  • The Origin header is validated on every connection, as the specification requires, to prevent DNS-rebinding attacks: a request that carries one must carry the app's own
  • Keys are scoped to one organization and can only reach that organization's bots
  • A key reads only, unless it was created with "Allow changes"; that permission is fixed at creation, and even then the key replaces only documents it uploaded and cannot pause a bot
  • Rate limits are applied per key
  • Revoking a key in the dashboard takes effect immediately

Troubleshooting

Symptom Cause
401 Unauthorized Key missing or revoked (the two are deliberately the same)
429 Too Many Requests The key is over its per-minute limit; Retry-After says when
A call answers "Say which bot" The organization has several bots; pass bot by name
A write tool is not listed The key was created without "Allow changes"
403 Forbidden Your plan does not include MCP (Free)
400 Bad Request on every call Missing or unsupported MCP-Protocol-Version header
Tools do not appear in the client The client is attempting the deprecated HTTP+SSE transport
ask returns no_answer often The bot's documents are thin — check Content Gaps