# KnowMan MCP server for Zed

Client: Zed

Add KnowMan to Zed as a [local MCP server](https://www.knowman.io/guides/what-is-an-mcp-server). Run `npx -y @knowman/mcp` with `KNOWMAN_API_KEY=km_...`, or [sign in](https://www.knowman.io/guides/personal-knowledge-base) with `knowman login` and use the saved credential. Then open Settings → AI → [MCP Servers](https://www.knowman.io/guides/mcp-server-knowledge-base) and check whether the server is active.

## Zed settings.json

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

## What you need

KnowMan MCP runs locally with `npx -y @knowman/mcp` and as a hosted server at https://api.knowman.io/mcp. The local server requires Node 22 or newer. Zed supports local and remote MCP servers through Settings → AI → MCP Servers, so you can use either setup. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp).

## Create an API key

In KnowMan, open Settings → Connections → Connect an AI agent and create an agent key. Keys begin with `km_`. Enter the key in the `KNOWMAN_API_KEY` environment variable in the config below. See [KnowMan MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Add KnowMan in Zed

Open Settings → AI → MCP Servers. Click Add Server, then choose Add Local Server. Enter the command, arguments, and environment variable from the config below. Zed stores local MCP server configuration under the top-level `context_servers` key in its settings file. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp).

## Use the Zed config

Add this entry under `context_servers` in Zed's settings file. The `command`, `args`, and `env` keys match Zed's local MCP server format. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp) and [KnowMan MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Sign in once

Run `npx -p @knowman/mcp knowman login` and approve access in the browser. The CLI and MCP server share the saved credential, so you can remove the `env` block from the Zed config. See [KnowMan MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Verify the server

Return to Settings → AI → MCP Servers. A green dot with the tooltip "Server is active" means Zed says the server is running correctly. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp).

## Tools available in Zed

KnowMan provides six MCP tools: `kb_search` searches [saved items](https://www.knowman.io/guides/how-to-save-articles), `kb_ask` [answers questions](https://www.knowman.io/guides/ai-knowledge-base) with citations, `kb_get_item` reads one item, `kb_save` saves a URL, `kb_recent` lists recent items, and `kb_memories` lists saved claims, decisions, and playbooks. See [KnowMan MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Use the hosted KnowMan server

In Zed, add the hosted server URL https://api.knowman.io/mcp and sign in with OAuth on the KnowMan consent page, or send an API key as an `Authorization: Bearer <key>` header. The consent page requests `knowman.read` for search, read and ask, and `knowman.write` for saving links. Access tokens last one hour and refresh automatically.

For a local setup, Zed can also start the local server with `npx -y @knowman/mcp` and Node 22 or newer. The open-source client is available at [github.com/Essatt/knowman-mcp](https://github.com/Essatt/knowman-mcp).

## Questions

### Does Zed support local MCP servers?

Yes. Zed can connect local and remote MCP servers from Settings → AI → MCP Servers. Add KnowMan with Add Server, then Add Local Server. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp).

### Can I use `knowman login` instead of an API key?

Yes. Run `npx -p @knowman/mcp knowman login`, approve the browser request, and omit the `env` block from Zed's config. The CLI and MCP server share the saved credential. See [KnowMan MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

### How do I confirm KnowMan is active in Zed?

Open Settings → AI → MCP Servers. A green indicator with the tooltip "Server is active" means the server is running correctly. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp).

### What happens if a KnowMan tool returns an error?

Zed shows the context server's error message in the agent's response so you can diagnose and correct the issue. See [Zed MCP documentation](https://zed.dev/docs/ai/mcp).

## Related pages

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

- [How Do You Connect AI to Your Notes?](https://www.knowman.io/guides/connect-any-ai-to-your-notes)

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

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

- [Understand AI knowledge bases through the sources behind an answer](https://www.knowman.io/guides/ai-knowledge-base)

## More in this topic

- [Connect KnowMan to JetBrains AI Assistant](https://www.knowman.io/integrations/jetbrains)
- [KnowMan MCP server for Kilo Code](https://www.knowman.io/integrations/kilo-code)
- [Connect KnowMan to Augment Code](https://www.knowman.io/integrations/augment)

## Bring your saved knowledge into Zed

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