You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 06-mcp-servers/README.md
+55-11Lines changed: 55 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ Now that you've seen MCP in action, let's set up additional servers. This sectio
125
125
126
126
## MCP Configuration File
127
127
128
-
MCP servers are configured in `~/.copilot/mcp-config.json` (global) or `.copilot/mcp-config.json` (project).
128
+
MCP servers are configured in `~/.copilot/mcp-config.json` (user-level, applies to all projects) or `.vscode/mcp.json` (project-level, applies to just the current workspace).
129
129
130
130
```json
131
131
{
@@ -219,7 +219,9 @@ Context7 gives Copilot access to up-to-date documentation for popular frameworks
Add this to your `~/.copilot/mcp-config.json` and restart Copilot.
225
227
@@ -231,13 +233,40 @@ Add this to your `~/.copilot/mcp-config.json` and restart Copilot.
231
233
232
234
These are optional extras for when you're comfortable with the core servers above.
233
235
234
-
### Building a Custom MCP Server
236
+
### Microsoft Learn MCP Server
235
237
236
-
Want to connect Copilot to your own APIs, databases, or internal tools? You can build a custom MCP server in Python. This is completely optional since the pre-built servers (GitHub, filesystem, Context7) cover most use cases.
238
+
Every MCP server you've seen so far (filesystem, Context7) runs locally on your machine. But MCP servers can also run remotely, meaning you just point Copilot CLI at a URL and it handles the rest. No `npx` or `python`, no local process, no dependencies to install.
237
239
238
-
📖 See the [Custom MCP Server Guide](mcp-custom-server.md) for a complete walkthrough using the book app as an example.
240
+
The [Microsoft Learn MCP Server](https://github.com/microsoftdocs/mcp) is a good example. It gives Copilot CLI direct access to official Microsoft documentation (Azure, Microsoft Foundry and other AI topics, .NET, Microsoft 365, and much more) so it can search docs, fetch full pages, and find official code samples instead of relying on a model's training data.
239
241
240
-
📚 For more background, see the [MCP for Beginners course](https://github.com/microsoft/mcp-for-beginners).
242
+
- ✅ **No API key required**
243
+
- ✅ **No account needed**
244
+
- ✅ **No local install required**
245
+
246
+
**Quick install with `/plugin install`:**
247
+
248
+
Instead of editing your JSON config file manually, you can install it in one command:
249
+
250
+
```bash
251
+
copilot
252
+
253
+
> /plugin install microsoftdocs/mcp
254
+
```
255
+
256
+
This adds the server and its associated agent skills automatically. The skills installed include:
257
+
258
+
-**microsoft-docs**: Concepts, tutorials, and factual lookups
259
+
-**microsoft-code-reference**: API lookups, code samples, and troubleshooting
260
+
-**microsoft-skill-creator**: A meta-skill for generating custom skills about Microsoft technologies
261
+
262
+
**Usage:**
263
+
```bash
264
+
copilot
265
+
266
+
> What's the recommended way to deploy a Python app to Azure App Service? Search Microsoft Learn.
267
+
```
268
+
269
+
📚 Learn more: [Microsoft Learn MCP Server overview](https://learn.microsoft.com/training/support/mcp-get-started)
241
270
242
271
### Web Access with `web_fetch`
243
272
@@ -267,6 +296,14 @@ copilot
267
296
> Fetch and summarize the README from https://github.com/facebook/react
268
297
```
269
298
299
+
### Building a Custom MCP Server
300
+
301
+
Want to connect Copilot to your own APIs, databases, or internal tools? You can build a custom MCP server in Python. This is completely optional since the pre-built servers (GitHub, filesystem, Context7) cover most use cases.
302
+
303
+
📖 See the [Custom MCP Server Guide](mcp-custom-server.md) for a complete walkthrough using the book app as an example.
304
+
305
+
📚 For more background, see the [MCP for Beginners course](https://github.com/microsoft/mcp-for-beginners).
306
+
270
307
</details>
271
308
272
309
<a id="complete-configuration-file"></a>
@@ -296,7 +333,7 @@ Here's a full `mcp-config.json` with filesystem and Context7 servers:
296
333
}
297
334
```
298
335
299
-
Save this as `~/.copilot/mcp-config.json` for global access or `.copilot/mcp-config.json` for project-specific configuration.
336
+
Save this as `~/.copilot/mcp-config.json` for global access or `.vscode/mcp.json` for project-specific configuration.
300
337
301
338
---
302
339
@@ -317,7 +354,7 @@ Now that you have MCP servers configured, let's see what they can do.
317
354
| GitHub repos, issues, and PRs | [GitHub Server](#github-server-built-in) |
318
355
| Browsing project files | [Filesystem Server Usage](#filesystem-server-usage) |
319
356
| Library documentation lookup | [Context7 Server Usage](#context7-server-usage) |
320
-
| Custom server and web_fetch usage |[Beyond the Basics Usage](#beyond-the-basics-usage)|
357
+
| Custom server, Microsoft Learn MCP and web_fetch usage | [Beyond the Basics Usage](#beyond-the-basics-usage) |
321
358
322
359
<details>
323
360
<summary><strong>GitHub Server (Built-in)</strong> - Access repos, issues, PRs, and more</summary>
@@ -475,8 +512,15 @@ Best practices:
475
512
```bash
476
513
copilot
477
514
478
-
> Look up information about "1984" using the book lookup server
479
-
> Search for books by George Orwell
515
+
> Look up information about "1984" using the book lookup server. Search for books by George Orwell
516
+
```
517
+
518
+
**Microsoft Learn MCP**: If you installed the [Microsoft Learn MCP server](#microsoft-learn-mcp-server), you can look up official Microsoft documentation directly:
519
+
520
+
```bash
521
+
copilot
522
+
523
+
> How do I configure managed identity for an Azure Function? Search Microsoft Learn.
480
524
```
481
525
482
526
**Web Fetch**: Use the built-in `web_fetch` tool to pull in content from any URL:
@@ -796,7 +840,7 @@ Ready to go deeper? Follow the [Custom MCP Server Guide](mcp-custom-server.md) t
796
840
| Mistake | What Happens | Fix |
797
841
|---------|--------------|-----|
798
842
| Not knowing GitHub MCP is built-in | Trying to install/configure it manually | GitHub MCP is included by default. Just try: "List the recent commits in this repo" |
799
-
| Looking for config in wrong location | Can't find or edit MCP settings | Config is in `~/.copilot/mcp-config.json` |
843
+
| Looking for config in wrong location | Can't find or edit MCP settings |User-level config is in`~/.copilot/mcp-config.json`, project-level is `.vscode/mcp.json`|
800
844
| Invalid JSON in config file | MCP servers fail to load | Use `/mcp show` to check configuration; validate JSON syntax |
801
845
| Forgetting to authenticate MCP servers |"Authentication failed" errors | Some MCPs need separate auth. Check each server's requirements |
0 commit comments