# KnowMan MCP server for Kilo Code

Client: Kilo Code

Add KnowMan under the top-level `mcp` key in Kilo Code's `kilo.jsonc` file. KnowMan runs as a [local stdio server](https://www.knowman.io/guides/what-is-an-mcp-server), so use `npx -y @knowman/mcp`, Node 22 or newer, and a `KNOWMAN_API_KEY` that starts with `km_`.

## Kilo Code MCP configuration

```jsonc
{
  "mcp": {
    "knowman": {
      "type": "local",
      "command": ["npx", "-y", "@knowman/mcp"],
      "env": {
        "KNOWMAN_API_KEY": "km_..."
      }
    }
  }
}
```

## Choose the Kilo Code config file

For a [global setup](https://www.knowman.io/guides/mcp-server-knowledge-base), open `~/.config/kilo/kilo.jsonc`. It applies to every project. For one project, use `kilo.jsonc` in the project root, or `.kilo/kilo.jsonc` for a cleaner setup. Project-level settings take precedence over global settings. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code).

## Add the KnowMan server

Open the chosen `kilo.jsonc` file. Add the `knowman` entry under the top-level `mcp` key using the configuration on this page. Kilo Code uses `"type": "local"` for a local stdio server, and its `command` value is an array. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code).

## Create and insert an API key

In KnowMan, open app.knowman.io, then go to Settings > Connections > Connect an AI agent. Create an agent key, copy it, and replace `km_...` in the `KNOWMAN_API_KEY` field. Keys look like `km_...`. See the [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Sign in once with knowman login

Run `npx -p @knowman/mcp knowman login` and approve access in the browser. The CLI and MCP server share the saved credential, so you can then remove the `env` block from the Kilo Code configuration. See the [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Verify the connection

Open Settings > Agent Behaviour > MCP Servers and review the KnowMan server status. Kilo Code automatically detects available tools and resources after configuration. If the status failed, check the CLI output for error details and confirm that commands and paths are correct. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code).

## KnowMan tools available in Kilo Code

KnowMan exposes `kb_search` for searching [saved items](https://www.knowman.io/guides/how-to-save-articles) by [keyword or meaning](https://www.knowman.io/guides/ai-knowledge-base), `kb_ask` for answers with citations, `kb_get_item` for one item's readable content, and `kb_save` for saving a URL with an optional note. It also exposes `kb_recent` for [recent items](https://www.knowman.io/guides/personal-knowledge-base) and `kb_memories` for saved claims, decisions, and playbooks. See the [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Add the server through the Kilo Code settings

In the [VS Code extension](https://www.knowman.io/integrations/vscode), open Settings > MCP, choose Add Server, and select Local (stdio). Enter the command, arguments, and optional environment variables. Kilo Code writes changes to the appropriate config file, where you can also add, edit, enable, disable, or delete MCP servers. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code).

## Questions

### Can Kilo Code run the KnowMan MCP server locally?

Yes. Kilo Code supports local stdio servers that run as child processes and communicate through stdin and stdout. KnowMan uses this local transport. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code) and the [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

### Where should the KnowMan MCP configuration go?

Use `~/.config/kilo/kilo.jsonc` for all projects, or put `kilo.jsonc` in a project root. You can also use `.kilo/kilo.jsonc`. Project-level configuration takes precedence over global configuration. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code).

### Do I need KNOWMAN_API_KEY after running knowman login?

No, after a successful `knowman login`, the CLI and MCP server can share the saved credential, so you can remove the `env` block. KnowMan also supports the `KNOWMAN_API_KEY` environment variable. See the [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

### What should I check if Kilo Code reports a failed connection?

Check the CLI output for error details, then confirm that commands and paths are correct. KnowMan requires Node 22 or newer. See [Kilo Code MCP documentation](https://kilo.ai/docs/automate/mcp/using-in-kilo-code) and the [KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Related pages

- [Give Claude Code a knowledge base built from your reading](https://www.knowman.io/guides/claude-code-knowledge-base)

- [How Do You Connect AI to Your Notes?](https://www.knowman.io/guides/connect-any-ai-to-your-notes)

- [What Is a Knowledge Base for AI Agents?](https://www.knowman.io/guides/knowledge-base-for-ai-agents)

- [Persistent Memory for AI Agents](https://www.knowman.io/guides/persistent-memory-for-ai-agents)

## More in this topic

- [KnowMan MCP server for Windsurf](https://www.knowman.io/integrations/windsurf)
- [Add the KnowMan MCP server to Roo Code](https://www.knowman.io/integrations/roo-code)
- [Connect KnowMan to Kiro](https://www.knowman.io/integrations/kiro)

## More for Kilo Code

- [Kilo Code memory: what persists and what to add](https://www.knowman.io/guides/kilo-code-memory)
- [How to teach Kilo Code your knowledge](https://www.knowman.io/guides/teach-kilo-code-your-knowledge)

## Give Kilo Code your saved knowledge

Try KnowMan Pro for 14 days with no credit card. [Create your account](https://app.knowman.io/signup)

[Start free](https://app.knowman.io/signup)

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

Source: https://www.knowman.io/integrations/kilo-code
