-
Notifications
You must be signed in to change notification settings - Fork 498
docs: add MCP server usage documentation #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add comprehensive documentation for configuring and using MCP servers with the Copilot SDK across all supported languages (Node.js, Python, Go, .NET). This includes: - Configuration examples for local/stdio and remote HTTP/SSE servers - Complete reference for all configuration options - Troubleshooting guide for common issues - Links to related resources and issues Closes github#36
bd0bd16 to
f51aebc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive documentation for configuring and using MCP (Model Context Protocol) servers with the GitHub Copilot SDK.
Changes:
- New documentation file explaining MCP server types, configuration for all 4 SDKs, complete configuration reference, and troubleshooting guidance
- Updates to getting-started guide with links to the new MCP documentation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| docs/mcp.md | Comprehensive MCP documentation with examples for Node.js, Python, Go, and .NET SDKs, configuration reference tables, and troubleshooting guide |
| docs/getting-started.md | Added links to new MCP documentation in the "Connect to MCP Servers" section and "Learn More" section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/mcp.md
Outdated
|
|
||
| const client = new CopilotClient(); | ||
| const session = await client.createSession({ | ||
| model: "gpt-4.1", |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model value "gpt-4.1" is inconsistent with the rest of the codebase and may not be valid. According to the Python SDK types in python/copilot/types.py line 200, valid models are: "gpt-5", "claude-sonnet-4", "claude-sonnet-4.5", "claude-haiku-4.5". The rest of the documentation and examples in this repository use "gpt-5". Consider changing this to "gpt-5" to maintain consistency.
| model: "gpt-4.1", | |
| model: "gpt-5", |
docs/mcp.md
Outdated
| await client.start() | ||
|
|
||
| session = await client.create_session({ | ||
| "model": "gpt-4.1", |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model value "gpt-4.1" is inconsistent with the rest of the codebase and may not be valid. According to the Python SDK types in python/copilot/types.py line 200, valid models are: "gpt-5", "claude-sonnet-4", "claude-sonnet-4.5", "claude-haiku-4.5". The rest of the documentation and examples in this repository use "gpt-5". Consider changing this to "gpt-5" to maintain consistency.
docs/mcp.md
Outdated
| defer client.Stop() | ||
|
|
||
| session, err := client.CreateSession(&copilot.SessionConfig{ | ||
| Model: "gpt-4.1", |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model value "gpt-4.1" is inconsistent with the rest of the codebase and may not be valid. According to the Python SDK types in python/copilot/types.py line 200, valid models are: "gpt-5", "claude-sonnet-4", "claude-sonnet-4.5", "claude-haiku-4.5". The rest of the documentation and examples in this repository use "gpt-5". Consider changing this to "gpt-5" to maintain consistency.
docs/mcp.md
Outdated
| await using var client = new CopilotClient(); | ||
| await using var session = await client.CreateSessionAsync(new SessionConfig | ||
| { | ||
| Model = "gpt-4.1", |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The model value "gpt-4.1" is inconsistent with the rest of the codebase and may not be valid. According to the Python SDK types in python/copilot/types.py line 200, valid models are: "gpt-5", "claude-sonnet-4", "claude-sonnet-4.5", "claude-haiku-4.5". The rest of the documentation and examples in this repository use "gpt-5". Consider changing this to "gpt-5" to maintain consistency.
docs/mcp.md
Outdated
| await using var session = await client.CreateSessionAsync(new SessionConfig | ||
| { | ||
| Model = "gpt-4.1", | ||
| McpServers = new Dictionary<string, McpServerConfig> |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type annotation is incorrect. According to the .NET SDK types in dotnet/src/Types.cs line 335, McpServers is defined as Dictionary<string, object>?, not Dictionary<string, McpServerConfig>. The McpServerConfig type doesn't exist in the .NET SDK - instead, the dictionary values should be typed as object to allow either McpLocalServerConfig or McpRemoteServerConfig.
| McpServers = new Dictionary<string, McpServerConfig> | |
| McpServers = new Dictionary<string, object> |
Added a Quick Start section with a complete, tested example using @modelcontextprotocol/server-filesystem. This provides users with a copy-paste working example they can try immediately.
- Changed 'gpt-4.1' to 'gpt-5' for consistency with codebase - Fixed .NET McpServers type to Dictionary<string, object>
546a77e to
a78408b
Compare
Summary
This PR adds comprehensive documentation for configuring and using MCP (Model Context Protocol) servers with the Copilot SDK, addressing the request in #36.
Changes
New file:
docs/mcp.md- Complete MCP documentation including:Updated:
docs/getting-started.mdReferences
Test plan
python/copilot/types.pyandnodejs/src/types.ts