# Add the KnowMan MCP server to Roo Code

Client: Roo Code

Add a `knowman` entry under `mcpServers` in your global `mcp_settings.json` or your project's `.roo/mcp.json`, the two files Roo Code loads for MCP servers ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). KnowMan MCP is a [standalone stdio server](https://www.knowman.io/guides/what-is-an-mcp-server), package `@knowman/mcp`, started with `npx -y @knowman/mcp` with Node 22 or newer ([KnowMan MCP guide](https://www.knowman.io/guides/mcp-server-knowledge-base)). Roo Code supports STDIO for local servers and automatically detects a configured server's tools and resources ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

## Roo Code global mcp_settings.json or project .roo/mcp.json. Runs npx -y @knowman/mcp with Node 22 or newer. Authenticate with KNOWMAN_API_KEY or npx -p @knowman/mcp knowman login.

```json
{
  "mcpServers": {
    "knowman": {
      "command": "npx",
      "args": ["-y", "@knowman/mcp"],
      "env": {
        "KNOWMAN_API_KEY": "km_..."
      }
    }
  }
}
```

## Add the KnowMan server in Roo Code

Open the MCP settings view by clicking the icon in the top navigation of the Roo Code pane, then scroll to the bottom of the view ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). Click "Edit Global MCP" to open the global `mcp_settings.json`, or "Edit Project MCP" to open `.roo/mcp.json`; Roo Code creates that file if it does not exist ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

Add the `knowman` entry from the config on this page under `mcpServers`. Both files use JSON with an `mcpServers` object containing named server configurations ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). For a stdio config with a `command`, the `type` key defaults to `stdio` and can be omitted ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). The entry follows KnowMan's documented server setup: `command` `npx`, `args` `["-y", "@knowman/mcp"]`, and `env` with `KNOWMAN_API_KEY`, run on Node 22 or newer.

## Global and project config files

Global MCP settings are stored in `mcp_settings.json` and can be opened from the MCP settings view ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). Project MCP settings live in `.roo/mcp.json` at the project root, and Roo Code automatically detects and loads this file if it exists ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). If a server name exists in both global and project configurations, the project-level configuration takes precedence ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

For a STDIO server, `command` is required, while `args`, `cwd` and `env` are optional. When `cwd` is omitted, it defaults to the first workspace folder path or the main process's working directory ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

## Sign in once with knowman login

Run `npx -p @knowman/mcp knowman login` once. It opens your browser for sign-in, and the saved credential is shared by the `knowman` CLI and the MCP server, so the `env` block with `KNOWMAN_API_KEY` can be dropped from the config.

If you prefer a key, open the KnowMan web app and create one at Settings > Connections > Connect an AI agent; keys look like `km_...`. The server package is `@knowman/mcp` and needs Node 22 or newer.

## Verify the install

After configuring an MCP server, Roo Code automatically detects its available tools and resources ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). If successful, the new server and its tools appear in your MCP server list, ready to use ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

Check that "Enable MCP Servers" is on; it is on by default, and turning it off prevents connections and removes MCP tools from Roo Code ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). To restart, press the button next to the `knowman` server in its MCP server panel ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

## The KnowMan MCP server tools

The KnowMan MCP server provides `kb_search`, which searches [saved items](https://www.knowman.io/guides/how-to-save-articles) by [keyword or meaning](https://www.knowman.io/guides/ai-knowledge-base) and returns titles, URLs and metadata, `kb_ask`, which answers a question with citations, and `kb_get_item`, which returns the readable content of one item.

It also provides `kb_save`, which saves a URL to the Inbox or the Knowledge Base with an optional note, `kb_recent` for [recent items](https://www.knowman.io/guides/personal-knowledge-base), and `kb_memories` for saved claims, decisions and playbooks. See [knowledge base for AI agents](https://www.knowman.io/guides/knowledge-base-for-ai-agents) for the wider pattern.

## Transports, Windows and limits

Roo Code supports three transports: STDIO for local servers, Streamable HTTP for new remote servers, and SSE for legacy remote servers ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). KnowMan MCP is a standalone stdio server that talks to KnowMan's HTTP API and runs locally with npx -y @knowman/mcp, and it is also available as a hosted remote server at https://api.knowman.io/mcp with OAuth sign-in or an API key, so it fits both local and remote MCP setups.

On Windows, Roo Code's documented local-server example runs `npx` through `cmd /c` ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). On macOS and Linux, the documented example runs `npx` directly with `-y` ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

## Use the hosted KnowMan server

KnowMan also runs as a hosted remote MCP server at https://api.knowman.io/mcp over Streamable HTTP. In clients that support remote MCP servers, you add this server URL and sign in, so your knowledge base can be reached without running the local stdio server.

Sign-in uses OAuth: the client opens a KnowMan consent page where you approve the knowman.read and knowman.write scopes, and access tokens last one hour and refresh automatically. Instead of OAuth, you can send an API key created in KnowMan settings as an `Authorization: Bearer <key>` header.

The open-source local client ([knowman-mcp](https://github.com/Essatt/knowman-mcp)) keeps working with `npx -y @knowman/mcp`, and both setups expose the same KnowMan tools.

## Questions

### Does Roo Code support local stdio MCP servers?

Yes. MCP in Roo Code supports STDIO for local servers, plus Streamable HTTP and SSE for remote servers ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). KnowMan MCP is a standalone stdio server, so it fits the STDIO transport.

### Where do I put the KnowMan config in Roo Code?

In the `mcpServers` object of your global `mcp_settings.json` or your project's `.roo/mcp.json`, opened with "Edit Global MCP" or "Edit Project MCP" in the MCP settings view ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). If the same server name exists in both files, the project-level configuration takes precedence ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

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

No. After one `npx -p @knowman/mcp knowman login`, the saved credential is shared by the CLI and the MCP server, so the `env` block can be dropped. Without a login, create a key at Settings > Connections > Connect an AI agent in the web app; keys look like `km_...`.

### How do I restart the KnowMan server in Roo Code?

Press the button next to the MCP server you would like to restart in its server panel ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)). Also confirm "Enable MCP Servers" is checked, since it is on by default and turning it off removes MCP tools ([Roo Code docs](https://roocodeinc.github.io/Roo-Code/features/mcp/using-mcp-in-roo/)).

## Related pages

- [Connect your knowledge base through KnowMan's MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base)

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

- [How to Give Your AI Context from What You Read](https://www.knowman.io/guides/give-your-ai-context)

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

- [What is a personal knowledge base, and how do you build one?](https://www.knowman.io/guides/personal-knowledge-base)

## More in this topic

- [KnowMan MCP server for GitHub Copilot](https://www.knowman.io/integrations/github-copilot)
- [KnowMan MCP server for Windsurf](https://www.knowman.io/integrations/windsurf)
- [Connect KnowMan to Cline](https://www.knowman.io/integrations/cline)

## More for Roo Code

- [How to give Roo Code better memory](https://www.knowman.io/guides/roo-code-memory)
- [How to teach Roo Code your knowledge](https://www.knowman.io/guides/teach-roo-code-your-knowledge)

## Build your personal knowledge base

KnowMan saves articles and links, reads and tags them, and answers questions with citations ([personal knowledge base guide](/guides/personal-knowledge-base)). Pro includes a [14-day trial with no credit card](/guides/personal-knowledge-base). [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/roo-code
