# Connect KnowMan to OpenClaw

Client: OpenClaw

Add KnowMan to OpenClaw as a [local stdio MCP server](https://www.knowman.io/guides/what-is-an-mcp-server) using `npx -y @knowman/mcp` and your KnowMan API key. [OpenClaw supports saved local stdio servers](https://docs.openclaw.ai/cli/mcp/transports), and KnowMan's [MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base) exposes six tools for searching, asking, reading, saving, [recent items](https://www.knowman.io/guides/personal-knowledge-base), and memories.

## OpenClaw CLI

```bash
openclaw mcp add knowman --command npx --arg -y --arg @knowman/mcp --env KNOWMAN_API_KEY=km_...
```

## Add the local server

Stop the local Gateway before changing saved server definitions. Add KnowMan with the command above. OpenClaw's `mcp add` command accepts stdio server options such as `--command`, `--arg`, and `--env`. [OpenClaw MCP registry](https://docs.openclaw.ai/cli/mcp/registry)

KnowMan's MCP server runs locally over stdio and connects to the KnowMan HTTP API. It requires Node 22 or newer. [OpenClaw stdio transport](https://docs.openclaw.ai/cli/mcp/transports)

## Create a KnowMan API key

In KnowMan, open Settings > Connections > [Connect an AI agent](https://www.knowman.io/guides/connect-any-ai-to-your-notes) to create a key. Keys begin with `km_`; paste the key in place of `km_...` in the command. KnowMan also supports signing in once with its CLI, which lets the MCP server use the saved credential without an environment variable.

## Sign in once with knowman login

To use the shared saved credential, run `npx -p @knowman/mcp knowman login` in a terminal and approve the browser sign-in. Then run `npx -p @knowman/mcp knowman status` to check sign-in status. The MCP server reads the same saved credential, so you can remove the `KNOWMAN_API_KEY` environment entry after login.

## Verify the connection

Run `openclaw mcp doctor knowman --probe` to check that the server starts and exposes tools. You can also run `openclaw mcp probe knowman --json` to inspect its live capabilities. [OpenClaw MCP registry](https://docs.openclaw.ai/cli/mcp/registry)

## Tools available in OpenClaw

`kb_search` searches [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` answers questions with citations, and `kb_get_item` retrieves readable content for one item.

`kb_save` saves a URL with an optional note. `kb_recent` lists recent items, and `kb_memories` lists saved claims, decisions, and playbooks.

## If a change does not appear

Saved-server mutations require the local Gateway to be stopped. `openclaw mcp reload` clears cached MCP runtimes for the current CLI process only; a Gateway or agent in another process needs its own reload or restart path. [OpenClaw MCP registry](https://docs.openclaw.ai/cli/mcp/registry)

## Questions

### Does KnowMan connect to OpenClaw over remote MCP?

No. KnowMan's MCP server is a local stdio server, and its configuration launches a local process. [OpenClaw stdio transport](https://docs.openclaw.ai/cli/mcp/transports)

### How can I check that OpenClaw can start the server?

Run `openclaw mcp doctor knowman --probe` to check that the saved server starts and exposes tools. [OpenClaw MCP registry](https://docs.openclaw.ai/cli/mcp/registry)

### Do I need to keep the API key in the config?

No. After `knowman login`, the MCP server can read the credential saved by the CLI, so the `KNOWMAN_API_KEY` entry can be removed. [KnowMan MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base)

### Why might a server change not appear in an agent?

`openclaw mcp reload` affects only the current CLI process. A Gateway or agent running in another process needs its own reload or restart path. [OpenClaw MCP registry](https://docs.openclaw.ai/cli/mcp/registry)

## 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)

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

## More in this topic

- [KnowMan MCP server for OpenCode](https://www.knowman.io/integrations/opencode)
- [KnowMan MCP server for Qwen Code](https://www.knowman.io/integrations/qwen-code)
- [KnowMan MCP server for Warp](https://www.knowman.io/integrations/warp)

## More for OpenClaw

- [How to give OpenClaw better memory](https://www.knowman.io/guides/openclaw-memory)
- [How to teach OpenClaw your knowledge](https://www.knowman.io/guides/teach-openclaw-your-knowledge)

## Give your agent useful context

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/openclaw
