Docs

MCP tools

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.

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.

Approvals for tools

MCP tool calls follow the bot's approval mode. Under "Ask only when risky", tools the server marks read-only and not destructive run without a card. 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

RouteWhat it does
GET /api/mcp/serversList servers, by name
POST /api/mcp/serversRegister a server
PUT /api/mcp/servers/:idUpdate one. A masked value keeps the stored secret.
DELETE /api/mcp/servers/:idDelete it and remove it from every bot
POST /api/mcp/servers/:id/testInitialize, list tools, shut down
POST /api/mcp/servers/:id/oauth/startStart a sign-in; returns the URL to open
GET / PUT /api/kwants/:id/mcp-serversRead 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.