# KnowMan MCP server for GitHub Copilot

Client: GitHub Copilot

GitHub Copilot in VS Code supports connecting external tools through [Model Context Protocol](https://www.knowman.io/guides/what-is-an-mcp-server) (MCP) servers ([VS Code Copilot overview](https://code.visualstudio.com/docs/copilot/overview)). To add a server, run Chat: Open Customizations from the Command Palette, select [MCP Servers](https://www.knowman.io/guides/mcp-server-knowledge-base), then use Add Server (+) in the User or Workspace group ([VS Code docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)). KnowMan runs as a local stdio server started with `npx -y @knowman/mcp` ([@knowman/mcp on npm](https://www.npmjs.com/package/@knowman/mcp)) and as a hosted remote server at https://api.knowman.io/mcp ([knowman-mcp](https://github.com/Essatt/knowman-mcp)).

## GitHub Copilot, Add Server (Command stdio)

```text
Command Palette: Chat: Open Customizations
Section: MCP Servers
Add Server (+) in the User or Workspace group
Server type: Command (stdio)
Command: npx -y @knowman/mcp
Node 22 or newer; the server reads its API key from KNOWMAN_API_KEY
```

## Add the hosted server in VS Code

GitHub Copilot in VS Code supports connecting external tools through Model Context Protocol (MCP) servers (VS Code Copilot overview). With the intended harness selected, run Chat: Open Customizations from the Command Palette and select MCP Servers (VS Code docs). Select Add Server (+) in the User or Workspace group for your chosen scope (VS Code docs). For a URL-based server, choose HTTP (HTTP or Server-Sent Events) (VS Code docs).

KnowMan's hosted remote MCP server is at https://api.knowman.io/mcp and speaks Streamable HTTP (knowman-mcp). On the server side, it accepts an API key sent as `Authorization: Bearer <key>`, or OAuth sign-in (knowman-mcp).

## Run the local stdio server instead

VS Code also runs local stdio servers: you supply the command and its arguments, and the server communicates through standard input and output (VS Code docs). In the guided flow, choose Command (stdio) and enter the launch command (VS Code docs). KnowMan's stdio server is started with `npx -y @knowman/mcp` (@knowman/mcp on npm). It needs Node 22 or newer (@knowman/mcp on npm), and a server launched by a command needs its runtime installed on the machine that runs it (VS Code docs).

The stdio server reads your key from the environment variable `KNOWMAN_API_KEY`, set to `KNOWMAN_API_KEY=km_...` (knowman-mcp). VS Code warns that local MCP servers can run code on your machine, and their tools can access external services using your permissions (VS Code docs).

## Create an API key or sign in once

The stdio server talks to KnowMan's HTTP API with a Bearer key in the environment variable `KNOWMAN_API_KEY`; keys look like `km_...` and are created at Settings > Connections > Connect an AI agent in the web app (knowman-mcp).

You can skip the environment variable. Run `npx -p @knowman/mcp knowman login` once; it opens a browser sign-in, and the saved credential is shared by the CLI and the MCP server, so the env block can be dropped (knowman-mcp). The same package installs a `knowman` CLI with commands for search, ask, save, recent, memories, login, status and logout (@knowman/mcp on npm).

## Where the configuration lives

The global Copilot configuration writes to $COPILOT_HOME/mcp-config.json, or ~/.copilot/mcp-config.json when COPILOT_HOME is unset (VS Code docs). Local harness configurations can instead use a workspace .vscode/mcp.json or a user-profile mcp.json; both remain available for compatibility and are labeled deprecated in the guided flow (VS Code docs). A workspace-root .mcp.json destination is offered only when an Experimental setting is enabled (VS Code docs).

Portable config files use a top-level mcpServers object, while the VS Code format uses a servers key; do not copy a configuration between the two without checking the format reference (VS Code docs). Portable configurations do not support VS Code input variables or environment files (VS Code docs).

## Verify the connection

Adding a configuration is not proof that the agent can use the server (VS Code docs). Complete a request and inspect the tool call; the connection is confirmed working when the tool returns the requested result without a connection error (VS Code docs).

Ask the assistant to 'search my KnowMan for ...' or 'save this URL'; those are the documented ways to drive the server (knowman-mcp). Servers start on demand, and stopping a server only ends its current run; a later request can start it again (VS Code docs).

## The six KnowMan tools

The KnowMan MCP server offers 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 the 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 pointing AI tools at your library, see [connect any AI to your notes](https://www.knowman.io/guides/connect-any-ai-to-your-notes) or [how an MCP server powers a knowledge base](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Keys, security, and connectors

Keys are created in KnowMan settings, and a key cannot create other keys (knowman-mcp). Do not paste credentials into chat or commit them to your project (VS Code docs). Servers requiring interactive inputs are not forwarded to Copilot harness sessions (VS Code docs).

VS Code also documents Copilot connectors (preview), GitHub-managed MCP connections for Copilot harness sessions without local server setup or manual MCP configuration (VS Code docs). A server launched by a command needs its runtime installed on the machine that runs it (VS Code docs).

## Questions

### How do I add an MCP server to GitHub Copilot?

Run Chat: Open Customizations from the Command Palette, select MCP Servers, then Add Server (+) in the User or Workspace group (VS Code docs). You can also run MCP: Add Server from the Command Palette to start the guided flow (VS Code docs).

### Does GitHub Copilot support HTTP MCP servers?

Yes. URL-based servers use the HTTP (HTTP or Server-Sent Events) option (VS Code docs). KnowMan's hosted server at https://api.knowman.io/mcp speaks Streamable HTTP and accepts an API key sent as `Authorization: Bearer <key>` (knowman-mcp).

### Can I run KnowMan locally instead?

Yes. VS Code supports local servers through the Command (stdio) option, where you enter the command and its arguments (VS Code docs). KnowMan's stdio server is started with `npx -y @knowman/mcp` (@knowman/mcp on npm), needs Node 22 or newer, and reads its key from `KNOWMAN_API_KEY`, or you can run `npx -p @knowman/mcp knowman login` once instead (knowman-mcp).

### How do I know the server is connected?

A configuration alone is not proof, so complete a request and inspect the tool call (VS Code docs). The connection works when the tool returns the requested result without a connection error (VS Code docs).

## Related pages

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

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

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

- [Persistent Memory for AI Agents](https://www.knowman.io/guides/persistent-memory-for-ai-agents)

## More in this topic

- [Add the KnowMan MCP server to Cursor](https://www.knowman.io/integrations/cursor)
- [Connect KnowMan to Cline](https://www.knowman.io/integrations/cline)
- [KnowMan MCP server for Continue](https://www.knowman.io/integrations/continue)

## More for GitHub Copilot

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

## Give Copilot your library

KnowMan Pro is free for 14 days, 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
