MCP Servers: A Mental Model
Understand Model Context Protocol — servers as tool providers.
What You Will Learn
- Understand MCP conceptually.
- Run an MCP server locally.
- Call it from Copilot.
- Distinguish MCP from Extensions.
- Plan MCP adoption.
Why This Matters
MCP (Model Context Protocol) is the underlying protocol for tools Copilot can call. Understanding it unlocks custom tooling without building full Extensions.
Concept Explained
MCP is a protocol for exposing tools to AI models. An MCP server provides tools (functions Copilot can call); Copilot invokes them when relevant. Like Extensions, but more flexible and often local.
How It Works
Run an MCP server (locally or remote). Configure Copilot to connect to it. Copilot can now invoke the server's tools when relevant to your question.
Step-by-Step Tutorial
1. Understand MCP
Protocol for exposing tools to AI models. Servers provide tools; models invoke them.2. Run a server locally
Many open-source MCP servers exist (filesystem, GitHub, Slack, etc.).3. Configure Copilot
Add the MCP server to your Copilot config.4. Use
Ask questions that the server's tools can help answer.5. Distinguish from Extensions
MCP is the protocol; Extensions are pre-built. MCP is more flexible.Real-World Example
A developer ran a local MCP server exposing their team's internal API. Asked Copilot 'what's the status of deploy #142?' — Copilot invoked the MCP tool, fetched live data, answered. No full Extension build needed.
Example Prompts / Commands / Code
# In VS Code settings (or .mcp.json):
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN" }
}
}
}
Feature Extensions MCP servers
-----------------------------------------------------------
Build effort High (manifest, host) Low (run a server)
Hosting Cloud Local or remote
Use case Production, shared Personal, team
Customization Code changes Config changes
Best for Org-wide tools Personal/team workflows
Common Mistakes
- Confusing MCP with Extensions — they're related but different.
- Running untrusted MCP servers — security risk.
- Exposing too much filesystem access — security risk.
- Not understanding the protocol before adopting.
Best Practices
- Start with well-known open-source MCP servers.
- Run locally first; production later (see PR-26).
- Limit filesystem and API access scopes.
- Use MCP for personal/team workflows; Extensions for org-wide.
- Understand the protocol before adopting.
Troubleshooting
| Problem | How to Fix |
|---|---|
| MCP server won't start | Check the command. Verify npx/node is installed. Check logs. |
| Copilot can't see MCP tools | Verify config. Restart VS Code. |
Practical Exercise
Your Turn
Install and run the filesystem MCP server locally. Configure Copilot to use it. Ask a question that requires file reading.
Professional Challenge
Run an MCP server exposing your team's internal API. Document the setup. Share with teammates.
Key Takeaways
- MCP is a protocol for exposing tools to AI models.
- Servers provide tools; Copilot invokes them.
- Run locally first; production later.
- Lower build effort than Extensions.
- Limit scopes for security.
Frequently Asked Questions
Is MCP the same as Copilot Extensions?
Do I need MCP if I use Extensions?
Further Reading
Official References
SEO Metadata
SEO title: MCP Servers: A Mental Model
Meta description: Understand Model Context Protocol — servers as tool providers.
Primary keyword: mcp servers
Secondary keywords: mcp servers: a mental model
Search intent: Informational
URL slug: /mcp-servers-mental-model-copilot
Categories: AI Tools, GitHub Copilot
Tags: GitHub Copilot, Intermediate, MCP, Model Context Protocol, Tooling, IMCSEIAN, Tutorial, IMCSEIAN
Featured image concept: IMCSEIAN lesson card for MCP Servers: A Mental Model
Comments
Comments
Post a Comment