Start free
Editors and IDEs

Add the KnowMan MCP server to Cursor

Updated 3 min read

Setup in brief

Add KnowMan to Cursor by pasting a knowman entry under mcpServers in ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project), with command npx, args -y @knowman/mcp, and your key in KNOWMAN_API_KEY. You need Node 22 or newer. If you have run knowman login once, you can leave the key out entirely.

~/.cursor/mcp.json (global) or .cursor/mcp.json (per project) JSON
{
  "mcpServers": {
    "knowman": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@knowman/mcp"],
      "env": {
        "KNOWMAN_API_KEY": "km_..."
      }
    }
  }
}
On this page9 sections
  1. Where the Cursor MCP config lives
  2. What each field means
  3. Steps to add KnowMan to Cursor
  4. Sign in once with knowman login
  5. Verify the connection
  6. The six tools KnowMan exposes
  7. Common problems
  8. Use the hosted KnowMan server in Cursor
  9. Questions people ask

Where the Cursor MCP config lives

Cursor configures custom MCP servers with a JSON file (Cursor docs). For tools available everywhere, create ~/.cursor/mcp.json in your home directory. For project-specific tools, create .cursor/mcp.json in your project (Cursor docs).

Entries are grouped under mcpServers (Cursor docs). Paste the config shown at the top of this page into either file, then follow the steps below.

The same KnowMan MCP server works in Cursor, Windsurf, Zed and VS Code.

What each field means

For local command-line servers, an entry requires type and command, while args, env, and envFile are optional (Cursor docs). The connection type value for a local server is stdio (Cursor docs).

command must be available on your system path or contain its full path (Cursor docs). args is an array of arguments passed to the command, and env supplies environment variables to the server (Cursor docs). KnowMan runs locally with npx -y @knowman/mcp and Node 22 or newer, and is also available as a hosted server at https://api.knowman.io/mcp using Streamable HTTP. Cursor supports SSE and Streamable HTTP transports (Cursor docs).

Steps to add KnowMan to Cursor

Install Node 22 or newer, if you do not have it.

Create a key in the KnowMan web app under Settings > Connections > Connect an AI agent. Keys look like km_....

Paste the config from the top of this page into ~/.cursor/mcp.json or .cursor/mcp.json, replacing km_... with your key.

Restart Cursor, since custom server changes require restarting Cursor (Cursor docs).

Sign in once with knowman login

You can skip the API key step. Run npx -p @knowman/mcp knowman login once. It opens your browser for sign-in.

The saved credential is shared by the knowman CLI and the MCP server, so after a successful login you can drop the env block from the config. The CLI installed by the same package also includes a status command.

Verify the connection

Open the Output panel in Cursor with Cmd+Shift+U on macOS or Ctrl+Shift+U on Windows and Linux, then select "MCP Logs" from the dropdown (Cursor docs). The logs show server initialization, tool calls, and error messages (Cursor docs).

If a tool call fails, Cursor shows an error message in chat and marks the tool call as failed (Cursor docs).

The six tools KnowMan exposes

Once connected, Cursor can call six tools. kb_search searches saved items by keyword or meaning and returns titles, URLs, and metadata. kb_ask answers a question with citations. kb_get_item returns the readable content of one item. kb_save saves a URL to the Inbox or Knowledge Base with an optional note. kb_recent lists recent items. kb_memories lists saved claims, decisions, and playbooks.

For how these fit into agent workflows, see an MCP server knowledge base and giving your AI context.

Common problems

If Cursor cannot start the server, the command must be on your system path or contain its full path (Cursor docs). Give the absolute path to your Node installation's npx.

If the key is rejected, create a new one at Settings > Connections > Connect an AI agent in the web app and update the env block.

Cursor reminds users that MCP servers can access external services and execute code on your behalf (Cursor docs). The KnowMan server talks to KnowMan's HTTP API with your Bearer key.

Use the hosted KnowMan server in Cursor

In Cursor’s MCP settings, add https://api.knowman.io/mcp as a server URL. Sign in on the KnowMan consent page and approve access to connect with OAuth.

You can also use an API key created in KnowMan settings. Add this to Cursor’s mcp.json: {"mcpServers":{"knowman":{"url":"https://api.knowman.io/mcp","headers":{"Authorization":"Bearer <key>"}}}}.

Questions people ask

Where is the Cursor MCP config file?

For tools everywhere, create ~/.cursor/mcp.json in your home directory. For project-specific tools, create .cursor/mcp.json in your project (Cursor docs). Cursor documents one home-directory path and does not list OS-specific variants.

Can I use envFile with KnowMan?

The envFile option is for stdio servers (Cursor docs). KnowMan runs locally as a stdio server, and its hosted server at https://api.knowman.io/mcp uses an Authorization header for API key sign-in.

How do I view MCP logs in Cursor?

Open the Output panel with Cmd+Shift+U or Ctrl+Shift+U, then select "MCP Logs" from the dropdown (Cursor docs). The logs show server initialization, tool calls, and error messages (Cursor docs).

Do I still need KNOWMAN_API_KEY after knowman login?

No. The credential saved by npx -p @knowman/mcp knowman login is shared by the CLI and the MCP server, so you can drop the env block.

Your library, one chat away

Try KnowMan Pro for 14 days with no credit card. Create your account

Start free

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