# Add the KnowMan MCP server to Cursor

Client: Cursor

[Add KnowMan to Cursor](https://www.knowman.io/guides/teach-cursor-your-knowledge) 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_..."
      }
    }
  }
}
```

## Where the Cursor MCP config lives

Cursor configures custom [MCP servers](https://www.knowman.io/guides/mcp-server-knowledge-base) with a JSON file ([Cursor docs](https://cursor.com/docs/mcp)). 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](https://cursor.com/docs/mcp)).

Entries are grouped under `mcpServers` ([Cursor docs](https://cursor.com/docs/mcp)). 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](https://www.knowman.io/integrations/vscode).

## What each field means

For [local command-line servers](https://www.knowman.io/guides/what-is-an-mcp-server), an entry requires `type` and `command`, while `args`, `env`, and `envFile` are optional ([Cursor docs](https://cursor.com/docs/mcp)). The connection type value for a local server is `stdio` ([Cursor docs](https://cursor.com/docs/mcp)).

`command` must be available on your system path or contain its full path ([Cursor docs](https://cursor.com/docs/mcp)). `args` is an array of arguments passed to the command, and `env` supplies environment variables to the server ([Cursor docs](https://cursor.com/docs/mcp)). 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](https://cursor.com/docs/mcp)).

## 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](https://www.knowman.io/guides/knowledge-base-for-ai-agents). 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](https://cursor.com/docs/mcp)).

## 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](https://cursor.com/docs/mcp)). The logs show server initialization, tool calls, and error messages ([Cursor docs](https://cursor.com/docs/mcp)).

If a tool call fails, Cursor shows an error message in chat and marks the tool call as failed ([Cursor docs](https://cursor.com/docs/mcp)).

## The six tools KnowMan exposes

Once connected, Cursor can call six tools. `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) 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](https://www.knowman.io/guides/personal-knowledge-base). `kb_memories` lists saved claims, decisions, and playbooks.

For how these fit into agent workflows, see [an MCP server knowledge base](https://www.knowman.io/guides/mcp-server-knowledge-base) and [giving your AI context](https://www.knowman.io/guides/give-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](https://cursor.com/docs/mcp)). 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](https://cursor.com/docs/mcp)). 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

### 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](https://cursor.com/docs/mcp)). 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](https://cursor.com/docs/mcp)). 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](https://cursor.com/docs/mcp)). The logs show server initialization, tool calls, and error messages ([Cursor docs](https://cursor.com/docs/mcp)).

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

## Related pages

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

- [How to Build a Claude Knowledge Base](https://www.knowman.io/guides/claude-knowledge-base)

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

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

## More in this topic

- [Add the KnowMan MCP server to VS Code](https://www.knowman.io/integrations/vscode)
- [KnowMan MCP server for Zed](https://www.knowman.io/integrations/zed)
- [Connect KnowMan to Augment Code](https://www.knowman.io/integrations/augment)

## More for Cursor

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

## Your library, one chat away

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