MCP tools Docs menu
Docs
MCP tools for your AI agents
Bots can use tools from Model Context Protocol servers, like GitHub or Notion. Register a server once, then choose which bots may use it.
Add a server
Open the tool servers screen, Give your bots new abilities, and paste a command or URL from any server's README. kwant supports two transports:
- stdio: kwant, or the bot's CLI, starts a command as a child process, for example
npx -y @modelcontextprotocol/server-github. No shell is involved. - http: a streamable-HTTP MCP endpoint at a URL.
Click Connect to test it: kwant starts the server, lists its tools and shuts it down again, and shows what the server printed if something fails.
Home Assistant
From 0.9.21, Home Assistant has its own Connect Home Assistant sheet and a Home team, rather than the generic Add server form. The docs page is Connect Home Assistant. A longer walkthrough, with screenshots and what we saw on a 7B local model, is in the blog: Control Home Assistant from a self-hosted AI bot.
Which bots see which tools
A bot only ever sees the servers assigned to it, never the host user's own MCP configuration. Pick a bot's servers under Tools this bot can use. A disabled server is kept but offered to no bot. Tool names look like mcp__<server>__<tool>.
Secrets
Environment variables and headers are treated as secrets. They're stored, but every value comes back masked as ********, with only the keys visible. Secret values never appear in API responses, logs or the CLI's command line, and test output has them replaced too.
Servers that need a sign-in
For HTTP servers that require sign-in, such as https://mcp.notion.com/mcp, kwant follows the MCP authorization spec: it discovers the server's sign-in provider, registers itself, and runs the authorization-code flow with PKCE in a popup. The sign-in must finish within 10 minutes. The API only ever reports whether a server is connected, never its tokens.
Bots can suggest servers
Bots can search the official MCP Registry and post a suggestion card in the chat. A suggestion installs nothing: you install it, with one click, and only exact versions from the default npm and PyPI registries, Docker images or HTTPS endpoints qualify. Cards for servers that would run on your computer say so.
Composio (optional)
Composio gives your bots Gmail, Slack, Notion, Linear and many more apps through one MCP server. Open Settings → This space → Apps & accounts and press an app's tile. The Connect sheet has 3 steps: open Composio, paste your Composio link (an https address on composio.dev), and pick the bots that may use it. No bot is picked for you, and Composio is on only for the bots you pick. Your Composio API key is optional: with it, you can find apps and start their sign-in from kwant. Tool servers, including Composio, are under Advanced on the same page.
Approvals for tools
MCP tool calls follow the bot's approval mode. Under "Ask only when risky", tools the server marks read-only run without a card, like Home Assistant's reads. That's the server's own claim, and if kwant can't check it, the call asks. Every call a bot makes is recorded on its reply.
HTTP API
| Route | What it does |
|---|---|
GET /api/mcp/servers | List servers, by name |
POST /api/mcp/servers | Register a server |
PUT /api/mcp/servers/:id | Update one. A masked value keeps the stored secret. |
DELETE /api/mcp/servers/:id | Delete it and remove it from every bot |
POST /api/mcp/servers/:id/test | Initialize, list tools, shut down |
POST /api/mcp/servers/:id/oauth/start | Start a sign-in; returns the URL to open |
GET / PUT /api/kwants/:id/mcp-servers | Read or set a bot's servers |
# Register the GitHub server
curl -X POST http://127.0.0.1:8799/api/mcp/servers \
-H 'Content-Type: application/json' \
-d '{"name":"github","transport":"stdio","command":"npx",
"args":["-y","@modelcontextprotocol/server-github"],
"env":{"GITHUB_TOKEN":"…"}}'
The full contract, including the server object and error codes, is in docs/mcp-api.md.
