Start free
Guide Teach your agent your knowledge

How to teach GitHub Copilot your knowledge

Updated 3 min read

The short answer

Give Copilot project guidance in Markdown instruction files, then add an MCP server when you want access to tools or data sources. You can connect KnowMan's documented hosted MCP endpoint and ask Copilot to search your saved reading, subject to the client setup described in VS Code's MCP documentation and the KnowMan MCP README.

On this page7 sections
  1. Write project instructions
  2. Use targeted instructions for specific files
  3. Choose the right customization
  4. Add an MCP server in VS Code
  5. Connect KnowMan to your saved reading
  6. Where KnowMan fits
  7. Questions people ask

Write project instructions

Put reusable project guidance in Markdown files, such as where code belongs, which libraries to use, and which tests to run. Share these files through source control so the guidance stays with the project. VS Code custom instructions

Copilot supports .github/copilot-instructions.md or AGENTS.md for project instructions. The selected agent harness determines which instruction files it reads. VS Code custom instructions

These files do not need frontmatter. Instructions guide behavior, but do not guarantee compliance or replace tests, code review, or security controls. They also do not apply to inline suggestions as you type. VS Code custom instructions

Use targeted instructions for specific files

An .instructions.md file can use applyTo to target files. In Local sessions, a description lets the agent decide whether to read an instructions file for a task. VS Code custom instructions

Use instruction files for coding conventions or project context. For a reusable multi-step workflow, VS Code suggests an agent skill instead. VS Code custom instructions

Choose the right customization

VS Code's Agent Customizations editor includes instructions, skills, custom agents, hooks, and MCP servers. Use instructions for project guidance, and use an MCP server to connect agents to tools and data sources. Customization overview and MCP servers

Add an MCP server in VS Code

To add a server manually, open MCP Servers, select Add Server in the User or Workspace group, then follow the guided flow. A remote server can use an HTTP or Server-Sent Events endpoint. Customization overview and MCP servers

VS Code also documents a local server option that starts a command and communicates over standard input and output. Local MCP servers can run code on your machine and access external services with your permissions, so review the publisher and requested access. MCP servers

Connect KnowMan to your saved reading

KnowMan's hosted MCP server is at https://api.knowman.io/mcp and uses Streamable HTTP. Hosted access supports OAuth approval or an API key sent as an Authorization bearer token. KnowMan MCP README

Add the endpoint through VS Code's guided MCP server flow. If the client offers OAuth, sign in to KnowMan and approve access; otherwise, use the documented bearer-key method where the client supports it. KnowMan's OAuth consent distinguishes read access for searching, reading, and asking from write access for saving links. KnowMan MCP README and VS Code customization overview

Once connected, ask Copilot to search your KnowMan for a topic or to save a URL. KnowMan's six MCP tools include search, ask, item retrieval, saving, recent items, and read-only memories. KnowMan MCP README

Where KnowMan fits

Instruction files hold project guidance. KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps memories such as claims, decisions, and playbooks. Its MCP gives an assistant tools to search and ask about that saved knowledge. KnowMan MCP README

The supplied VS Code documents explain how to configure MCP servers, but do not describe how retrieved MCP knowledge persists between sessions. Ask Copilot to use KnowMan when you want it to search your saved reading. See the MCP server knowledge base guide and knowledge bases for AI agents.

Questions people ask

Which instruction file should I use for GitHub Copilot?

VS Code documents .github/copilot-instructions.md and AGENTS.md for Copilot harnesses. The selected harness determines which instruction files it reads. VS Code custom instructions

Can instructions target only some files?

Yes. An .instructions.md file can use applyTo to match files. In Local sessions, a description can help the agent decide whether to read the file for a task. VS Code custom instructions

How do I connect KnowMan to Copilot?

KnowMan documents a hosted MCP endpoint at https://api.knowman.io/mcp, with OAuth approval or an API key sent as a bearer token. VS Code documents a guided flow for adding MCP servers at user or workspace scope. KnowMan MCP README and VS Code customization overview

Will Copilot remember KnowMan results in future chats?

The supplied VS Code documentation does not describe whether MCP results persist as future instructions. Ask Copilot to search KnowMan when you want it to use your saved reading. VS Code MCP servers

Give your reading a place to live

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.