# KnowMan MCP server for GitHub Copilot CLI

Client: GitHub Copilot CLI

Copilot CLI adds a local stdio [MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base) with `copilot mcp add SERVER-NAME -- COMMAND [ARGS...]` ([GitHub Docs](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers)), and KnowMan's [local server](https://www.knowman.io/guides/what-is-an-mcp-server) starts with `npx -y @knowman/mcp` on Node 22 or newer ([knowman-mcp](https://github.com/Essatt/knowman-mcp)). Pass the API key with the repeatable `--env KEY=VALUE` flag, since Copilot CLI inherits only PATH from your environment (GitHub Docs). KnowMan also runs a hosted remote server at https://api.knowman.io/mcp using Streamable HTTP, with OAuth sign-in or an API key sent as `Authorization: Bearer <key>` (knowman-mcp).

## Add the KnowMan server (local stdio) to ~/.copilot/mcp-config.json

```json
{
  "mcpServers": {
    "knowman": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "@knowman/mcp"],
      "env": {
        "KNOWMAN_API_KEY": "<key>"
      }
    }
  }
}
```

## Add the server from the terminal

Copilot CLI adds a local stdio MCP server with `copilot mcp add SERVER-NAME -- COMMAND [ARGS...]`, and the docs show an npx example in exactly this shape (GitHub Docs). For KnowMan, name the entry `knowman` and use `npx -y @knowman/mcp` as the command, which starts the local stdio server and needs Node 22 or newer (knowman-mcp).

The `--env KEY=VALUE` flag sets environment variables for the server and can be repeated (GitHub Docs). This matters here: PATH is inherited automatically, but all other environment variables must be configured explicitly (GitHub Docs). The local KnowMan server reads its API key from the `KNOWMAN_API_KEY` environment variable (knowman-mcp).

You can also write the entry directly into the user-level configuration file, which is useful for adding multiple servers at once (GitHub Docs). The config block above shows the entry in that form.

## Or use the /mcp add form

In an interactive session, type `/mcp add`. A configuration form opens, and you use Tab to move between fields (GitHub Docs). For a stdio server, the Command field takes the command to start the server, including any arguments (GitHub Docs).

Enter `npx -y @knowman/mcp` as the command (knowman-mcp). Only PATH is inherited automatically, so set `KNOWMAN_API_KEY` in the form's environment settings as well (GitHub Docs). Press Ctrl+S to save; the MCP server is added and available immediately, without restarting the CLI (GitHub Docs).

## Run against the hosted remote server

KnowMan runs a hosted remote MCP server at https://api.knowman.io/mcp using Streamable HTTP. It accepts OAuth sign-in or an API key sent as `Authorization: Bearer <key>` (knowman-mcp).

On the client side, Copilot CLI supports remote transports over Streamable HTTP, while SSE is the legacy transport, deprecated in the MCP specification but still supported for backwards compatibility (GitHub Docs). For remote servers, `copilot mcp add` accepts `--header "HEADER: VALUE"`, repeatable for multiple headers (GitHub Docs). That is the documented way to pass the Authorization header the hosted KnowMan server expects.

## Where the configuration lives

The user-level MCP configuration file is `~/.copilot/mcp-config.json`, useful for sharing configurations or adding multiple servers at once. It uses a top-level `"mcpServers"` object, and a local server entry is declared with `"type": "local"`, with launch arguments in the `"args"` array (GitHub Docs).

Per-repository configuration can live in `.mcp.json` in any directory from the working directory up to the repository root, and `.github/mcp.json` holds shared configuration committed to the repository (GitHub Docs). `.mcp.json` takes precedence over `.github/mcp.json`, and on name conflicts, definitions closer to the working directory win (GitHub Docs).

## Check the server with /mcp

Type `/mcp` in an interactive session to open the MCP server dashboard (GitHub Docs). Then ask your assistant to search or save, for example "search my KnowMan for ..." or "save this URL" (knowman-mcp).

Separately, the GitHub MCP server is built into Copilot CLI and is already available without any additional configuration (GitHub Docs). Any other MCP servers you want, including KnowMan, are added with the methods above.

## The six KnowMan tools

KnowMan's MCP server exposes six tools (knowman-mcp):

`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 (knowman-mcp). For more on putting a knowledge base behind MCP, see [the MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## If something does not work

If your organization or enterprise configures an allowlist policy, only servers permitted by the allowlist policy can run in Copilot CLI (GitHub Docs). Copilot connectors are in public preview and subject to change (GitHub Docs).

Check Node first: the local server needs Node 22 or newer (knowman-mcp). Then check the environment: Copilot CLI inherits only PATH automatically, so every other variable, including `KNOWMAN_API_KEY`, must be set explicitly (GitHub Docs).

## Questions

### Does GitHub Copilot CLI support MCP servers?

Yes. It supports local stdio servers that start a local process and communicate over stdin/stdout, plus remote servers over Streamable HTTP and SSE, with SSE deprecated in the MCP specification (GitHub Docs). The GitHub MCP server is already built in without extra configuration (GitHub Docs).

### How do I add the KnowMan MCP server to Copilot CLI?

Follow the documented pattern `copilot mcp add SERVER-NAME -- COMMAND [ARGS...]` (GitHub Docs), with `npx -y @knowman/mcp` as the command, which starts the local stdio server and needs Node 22 or newer (knowman-mcp). The repeatable `--env KEY=VALUE` flag is the documented way to set the API key environment variable (GitHub Docs).

### Where does Copilot CLI store MCP server configuration?

User-level configuration lives in `~/.copilot/mcp-config.json`, with a top-level `"mcpServers"` object (GitHub Docs). Per repository, `.mcp.json` and committed `.github/mcp.json` are also read, and `.mcp.json` takes precedence on conflicts (GitHub Docs).

### Can Copilot CLI use KnowMan's hosted remote server?

KnowMan runs a hosted remote server at https://api.knowman.io/mcp using Streamable HTTP, with OAuth sign-in or an API key sent as `Authorization: Bearer <key>` (knowman-mcp). For remote servers, `copilot mcp add` accepts `--header "HEADER: VALUE"`, repeatable for multiple headers (GitHub Docs).

## Related pages

- [Connect your knowledge base through KnowMan's MCP server](https://www.knowman.io/guides/mcp-server-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)

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

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

## More in this topic

- [GitHub Copilot CLI and your knowledge base](https://www.knowman.io/integrations/github-copilot-cli-knowledge-base)
- [KnowMan MCP server for Amazon Q Developer](https://www.knowman.io/integrations/amazon-q-developer)
- [Connect KnowMan to Kimi Code CLI](https://www.knowman.io/integrations/kimi-code-cli)

## More for GitHub Copilot CLI

- [How to give GitHub Copilot CLI better memory](https://www.knowman.io/guides/github-copilot-cli-memory)
- [How to teach GitHub Copilot CLI your knowledge](https://www.knowman.io/guides/teach-github-copilot-cli-your-knowledge)

## Give Copilot CLI your library

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/github-copilot-cli
