Start free
Terminal and CLI agents

Add the KnowMan MCP server to Devin CLI

Updated 5 min read

Setup in brief

Devin CLI runs local MCP servers over stdio, so you can add KnowMan with devin mcp add knowman -- npx -y @knowman/mcp, saved to local scope by default, or by editing an MCP config file (Devin CLI docs). The KnowMan server is the @knowman/mcp package on Node 22 or newer, and it authenticates with a KNOWMAN_API_KEY created in the web app, or with one knowman login run after which no key sits in the config (KnowMan guide).

.devin/mcp_config.local.json (default local scope) JSON
{
  "mcpServers": {
    "knowman": {
      "command": "npx",
      "args": ["-y", "@knowman/mcp"],
      "env": {
        "KNOWMAN_API_KEY": "km_..."
      }
    }
  }
}
On this page9 sections
  1. What you need
  2. Add the server with devin mcp add
  3. Or write the MCP config file directly
  4. Sign in once with knowman login
  5. Verify the setup
  6. The six tools KnowMan exposes
  7. If the tools do not appear
  8. Use the hosted KnowMan server in Devin CLI
  9. Questions people ask

What you need

You need Devin CLI with MCP support, Node 22 or newer, and a KnowMan account (KnowMan guide). Devin CLI supports two kinds of MCP servers, a local command over stdio or a remote server over HTTP (Devin CLI docs). The KnowMan MCP server is a local stdio server, so it uses the local command form (KnowMan guide).

Create a key in the KnowMan web app under Settings > Connections > Connect an AI agent; keys look like km_... (KnowMan guide). Or skip the key entirely and sign in with knowman login, covered below (KnowMan guide).

Add the server with devin mcp add

Run devin mcp add knowman -- npx -y @knowman/mcp. Trailing arguments after -- imply the stdio transport, so Devin treats this as a local command (Devin CLI docs).

By default the entry is saved to local scope, .devin/mcp_config.local.json, which is gitignored (Devin CLI docs). devin mcp add -s project shares the entry with a team through .devin/mcp_config.json via version control, so keep the API key out of a shared file (Devin CLI docs).

To authenticate, run npx -p @knowman/mcp knowman login once, or set KNOWMAN_API_KEY in the config file entry as shown next (KnowMan guide).

Or write the MCP config file directly

Devin CLI reads server definitions from a mcpServers section in JSON config files (Devin CLI docs). A stdio entry needs command; args and env are optional (Devin CLI docs). Since v3000.3 these live in dedicated files: .devin/mcp_config.local.json for local scope, .devin/mcp_config.json for project scope, and ~/.config/devin/mcp_config.json, or %APPDATA%\devin\mcp_config.json on Windows, for user scope (Devin CLI docs).

Paste the config at the top of this page into .devin/mcp_config.local.json. Devin advises never committing API keys and using the local, gitignored file for sensitive values (Devin CLI docs). If you already ran knowman login, drop the env block; the server picks up the saved credential (KnowMan guide).

On versions older than v3000.3, MCP servers sat under mcpServers in the main config files. Devin migrates those entries to the dedicated files automatically on startup (Devin CLI docs).

Sign in once with knowman login

Run npx -p @knowman/mcp knowman login once. A browser opens for sign-in, and the saved credential is shared by the CLI and the MCP server, so the env block in the config can be dropped (KnowMan guide).

Check the state with npx -p @knowman/mcp knowman status. The same package installs the knowman CLI, which includes kb-search, ask, save, recent, memories, login, status and logout (KnowMan guide).

Verify the setup

Run devin mcp list to see configured servers and devin mcp get knowman for details on the entry (Devin CLI docs). The server may need a moment to initialize (Devin CLI docs).

Then ask the Devin agent to list MCP servers and tools, as Devin's docs suggest (Devin CLI docs). You should see six tools whose names start with kb_ (KnowMan guide).

The six tools KnowMan exposes

Once connected, the agent can call these tools against your KnowMan library (KnowMan guide): - kb_search: search saved items by keyword or meaning, returning titles, URLs and metadata. - kb_ask: ask a question and get an answer with citations. - kb_get_item: fetch the readable content of one saved item. - kb_save: save a URL to the Inbox or the Knowledge Base, with an optional note. - kb_recent: list recently saved items. - kb_memories: list saved claims, decisions and playbooks.

For a wider view of what this enables, see an MCP server for a knowledge base and knowledge bases for AI agents.

If the tools do not appear

Wait a moment first, since Devin notes a server may need time to initialize (Devin CLI docs). If tools still do not appear, ask the agent to list MCP servers and tools (Devin CLI docs).

Devin's docs also suggest verifying the command works outside Devin CLI and checking required environment variables (Devin CLI docs). For KnowMan, the server talks to KnowMan's HTTP API with a Bearer key from KNOWMAN_API_KEY, or uses the credential saved by knowman login (KnowMan guide).

In a managed workspace, a configured server can be blocked when MCP is disabled for your team, or when it is not on the team allowlist or in an enforced MCP registry (Devin CLI docs).

Use the hosted KnowMan server in Devin CLI

KnowMan also runs as a hosted remote MCP server at https://api.knowman.io/mcp over Streamable HTTP, so you can skip the local Node process. You need a KnowMan account at https://app.knowman.io. The open-source local client remains available at https://github.com/Essatt/knowman-mcp.

In clients that support remote MCP servers, you add the server URL https://api.knowman.io/mcp and sign in. With OAuth, the client opens a KnowMan consent page where you approve the knowman.read and knowman.write scopes; access tokens last one hour and refresh automatically.

Alternatively, create an API key in your KnowMan settings and send it as an Authorization: Bearer <key> header. Devin CLI accepts remote HTTP servers, so either path can replace the local npx -y @knowman/mcp setup used in this guide.

Questions people ask

Which file does Devin CLI save MCP servers in?

By default devin mcp add writes to local scope, .devin/mcp_config.local.json, which is gitignored. Project scope uses .devin/mcp_config.json, and user scope uses ~/.config/devin/mcp_config.json, or %APPDATA%\devin\mcp_config.json on Windows. See Devin CLI docs.

Do I need to restart Devin CLI after adding the server?

Devin's documentation states no restart step. It only notes that a server may need a moment to initialize. See Devin CLI docs.

Can I put the KnowMan API key in a shared project config?

Devin advises never committing API keys or secrets and recommends .devin/mcp_config.local.json for sensitive values, so keep the key out of shared project configs (Devin CLI docs). A cleaner route is knowman login, after which the config needs no key at all (KnowMan guide).

Why a local command and not a URL?

Devin CLI supports local stdio commands and remote HTTP servers (Devin CLI docs). The KnowMan MCP server runs locally with npx -y @knowman/mcp and as a hosted remote server at https://api.knowman.io/mcp, so it fits both local and remote client setups (KnowMan guide).

Bring your reading into the loop

Try KnowMan Pro free for 14 days, no credit card.

Start free

Every new account starts with 14 days of Pro. No credit card.