Add the local server
Create or edit ~/.kimi/mcp.json, the documented location for Kimi Code CLI MCP server configuration, and add the JSON above. Kimi Code CLI uses named entries under mcpServers.
The entry uses Kimi's documented local stdio fields, command, args, and env, with KnowMan's package and API key variable. Kimi Code CLI documents these fields, and KnowMan documents the package command and KNOWMAN_API_KEY.
Sign in once with KnowMan
To create the credential, run npx -p @knowman/mcp knowman login and complete browser sign-in. KnowMan documents this one-time login flow and says its saved credential is shared by the CLI and MCP server.
After login, you can drop the env block from the config. Alternatively, create an agent key in KnowMan under Settings > Connections > Connect an AI agent and put it in the KNOWMAN_API_KEY environment variable. KnowMan documents both credential options.
Check the connection
Run kimi mcp test knowman to check the connection and list the available tools. Kimi Code CLI documents this command and its connection status, tool count, names, and descriptions.
In a running session, enter /mcp to view connected servers and loaded tools. Kimi Code CLI documents this session command.
Use KnowMan's six tools
KnowMan's MCP server exposes six tools: kb_search searches saved items, kb_ask answers with citations, and kb_get_item retrieves one item's readable content.
The other tools are kb_save for saving a URL with an optional note, kb_recent for recent items, and kb_memories for saved claims, decisions, and playbooks.
KnowMan runs locally
This setup starts KnowMan's standalone stdio server with npx -y @knowman/mcp; the package requires Node 22 or newer.
KnowMan also provides a hosted remote MCP server at https://api.knowman.io/mcp using Streamable HTTP, but this page configures the local stdio option. KnowMan documents both server modes.
MCP tool confirmations
Kimi Code CLI prompts for confirmation for MCP tool calls. Its documentation says calls are automatically approved in YOLO or AFK mode. For the wider picture of how agents use a personal library, see knowledge bases for AI agents.
Questions people ask
Where does Kimi Code CLI store MCP configuration?
The documented configuration file is ~/.kimi/mcp.json, with named servers under mcpServers. See Kimi Code CLI's MCP configuration guide.
How can I check that KnowMan connected?
Run kimi mcp test knowman to check the connection and list available tools. You can also enter /mcp in a running session to view connected servers and loaded tools. These commands are documented by Kimi Code CLI.
Do MCP tool calls need approval?
Kimi Code CLI prompts for confirmation for MCP tool calls. In YOLO or AFK mode, calls are automatically approved. See Kimi Code CLI's MCP guide.
Can I use KnowMan without an API key in the config?
Yes. Run npx -p @knowman/mcp knowman login and complete browser sign-in; the saved credential is shared with the MCP server. KnowMan documents this login method.