Skip to content

Commit 1a82890

Browse files
Merge branch 'main' into spec/sampling-includecontext
2 parents b30d764 + 38b69e0 commit 1a82890

File tree

12 files changed

+262
-12
lines changed

12 files changed

+262
-12
lines changed

docs/clients.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ This page provides an overview of applications that support the Model Context Pr
4040
| [FLUJO][FLUJO] |||||||| Support for resources, Prompts and Roots are coming soon |
4141
| [Genkit][Genkit] | ⚠️ ||||||| Supports resource list and lookup through tools. |
4242
| [Glama][Glama] |||||||| Supports tools. |
43+
| [Gemini CLI][Gemini CLI] |||||||| Supports tools. |
4344
| [GenAIScript][GenAIScript] |||||||| Supports tools. |
45+
| [GitHub Copilot coding agent][GitHubCopilotCodingAgent] |||||||| Supports tools. |
4446
| [Goose][Goose] |||||||| Supports tools. |
4547
| [gptme][gptme] |||||||| Supports tools. |
4648
| [HyperAgent][HyperAgent] |||||||| Supports tools. |
@@ -85,6 +87,7 @@ This page provides an overview of applications that support the Model Context Pr
8587
| [Zed][Zed] |||||||| Prompts appear as slash commands |
8688
| [Zencoder][Zencoder] |||||||| Supports tools |
8789

90+
8891
{/* prettier-ignore-end */}
8992

9093
[Resources]: /docs/concepts/resources
@@ -122,8 +125,10 @@ This page provides an overview of applications that support the Model Context Pr
122125
[FlowDown]: https://github.com/Lakr233/FlowDown
123126
[FLUJO]: https://github.com/mario-andreschak/flujo
124127
[Glama]: https://glama.ai/chat
128+
[Gemini CLI]: https://goo.gle/gemini-cli
125129
[Genkit]: https://github.com/firebase/genkit
126130
[GenAIScript]: https://microsoft.github.io/genaiscript/reference/scripts/mcp-tools/
131+
[GitHubCopilotCodingAgent]: https://docs.github.com/en/enterprise-cloud@latest/copilot/concepts/about-copilot-coding-agent
127132
[Goose]: https://block.github.io/goose/docs/goose-architecture/#interoperability-with-extensions
128133
[JetBrains AI Assistant]: https://plugins.jetbrains.com/plugin/22282-jetbrains-ai-assistant
129134
[Kilo Code]: https://github.com/Kilo-Org/kilocode
@@ -515,6 +520,16 @@ Programmatically assemble prompts for LLMs using [GenAIScript](https://microsoft
515520
- Goose allows you to extend its functionality by [building your own MCP servers](https://block.github.io/goose/docs/tutorials/custom-extensions).
516521
- Includes built-in tools for development, web scraping, automation, memory, and integrations with JetBrains and Google Drive.
517522

523+
### GitHub Copilot coding agent
524+
525+
Delegate tasks to [GitHub Copilot coding agent](https://docs.github.com/en/copilot/concepts/about-copilot-coding-agent) and let it work in the background while you stay focused on the highest-impact and most interesting work
526+
527+
**Key features:**
528+
529+
- Delegate tasks to Copilot from GitHub Issues, Visual Studio Code, GitHub Copilot Chat or from your favorite MCP host using the GitHub MCP Server
530+
- Tailor Copilot to your project by [customizing the agent's development environment](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/customizing-the-development-environment-for-copilot-coding-agent#preinstalling-tools-or-dependencies-in-copilots-environment) or [writing custom instructions](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/best-practices-for-using-copilot-to-work-on-tasks#adding-custom-instructions-to-your-repository)
531+
- [Augment Copilot's context and capabilities with MCP tools](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp), with support for both local and remote MCP servers
532+
518533
### gptme
519534

520535
[gptme](https://github.com/gptme/gptme) is a open-source terminal-based personal AI assistant/agent, designed to assist with programming tasks and general knowledge work.

docs/community/sep-guidelines.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ We intend SEPs to be the primary mechanisms for proposing major new features, fo
1111

1212
Because the SEPs are maintained as text files in a versioned repository (GitHub Issues), their revision history is the historical record of the feature proposal.
1313

14+
## What qualifies a SEP?
15+
16+
The goal is to reserve the SEP process for changes that are substantial enough to require broad community discussion, a formal design document, and a historical record of the decision-making process. A regular GitHub issue or pull request is often more appropriate for smaller, more direct changes.
17+
18+
Consider proposing a SEP if your change involves any of the following:
19+
20+
- **A New Feature or Protocol Change**: Any change that adds, modifies, or removes features in the Model Context Protocol. This includes:
21+
- Adding new API endpoints or methods.
22+
- Changing the syntax or semantics of existing data structures or messages.
23+
- Introducing a new standard for interoperability between different MCP-compatible tools.
24+
- Significant changes to how the specification itself is defined, presented, or validated.
25+
- **A Breaking Change**: Any change that is not backwards-compatible.
26+
- **A Change to Governance or Process**: Any proposal that alters the project's decision-making, contribution guidelines (like this document itself).
27+
- **A Complex or Controversial Topic**: If a change is likely to have multiple valid solutions or generate significant debate, the SEP process provides the necessary framework to explore alternatives, document the rationale, and build community consensus before implementation begins.
28+
1429
## SEP Types
1530

1631
There are three kinds of SEP:
@@ -44,7 +59,7 @@ The standard SEP workflow is:
4459
1. You, the SEP author, create a well-formatted GitHub Issue with the proposal and SEP tags
4560
2. Find a Core Maintainer or Maintainer to sponsor your proposal. Core Maintainers and Maintainers will regularly go over the list of open proposals to determine which proposals to sponsor. Once a sponsor is found, the sponsor is "assigned" to the issue and a milestone is assigned. The tag `draft` is added. At this point a unique SEP number is assigned.
4661
3. The sponsor will review and may request changes before formal review, based on community feedback. Once ready for review, the tag `in-review` is added.
47-
4. Once sponsored, the SEP enters formal review by the core team
62+
4. Once tagged `in-review`, the SEP enters formal review by the core team
4863
5. The SEP may be accepted, rejected, or returned for revision.
4964
6. If the SEP has not found a sponsor within three months, core-maintainers are free to close the SEP as `dormant`.
5065

docs/docs/tools/inspector.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npx @modelcontextprotocol/inspector <command> <arg1> <arg2>
2121

2222
#### Inspecting servers from NPM or PyPi
2323

24-
A common way to start server packages from [NPM](https://npmjs.com) or [PyPi](https://pypi.com).
24+
A common way to start server packages from [NPM](https://npmjs.com) or [PyPi](https://pypi.org).
2525

2626
<Tabs>
2727

docs/faqs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ MCP servers are developed and maintained by:
6161
- Enterprise development teams building servers for their internal systems
6262
- Software providers making their applications AI-ready
6363

64-
Once an open source MCP server is created for a data source, it can be used by any MCP-compatible AI application, creating a growing ecosystem of connections. See our [list of example servers](https://modelcontextprotocol.io/examples), or [get started building your own server](https://modelcontextprotocol.io/quickstart/server).
64+
Once an open source MCP server is created for a data source, it can be used by any MCP-compatible AI application, creating a growing ecosystem of connections. See our [list of example servers](/examples), or [get started building your own server](/quickstart/server).

docs/quickstart/server.mdx

Lines changed: 102 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In this tutorial, we'll build a simple MCP weather server and connect it to a ho
99

1010
Many LLMs do not currently have the ability to fetch the forecast and severe weather alerts. Let's use MCP to solve that!
1111

12-
We'll build a server that exposes two tools: `get-alerts` and `get-forecast`. Then we'll connect the server to an MCP host (in this case, Claude for Desktop):
12+
We'll build a server that exposes two tools: `get_alerts` and `get_forecast`. Then we'll connect the server to an MCP host (in this case, Claude for Desktop):
1313

1414
<Frame>
1515
<img src="/images/weather-alerts.png" />
@@ -46,6 +46,36 @@ This quickstart assumes you have familiarity with:
4646
- Python
4747
- LLMs like Claude
4848

49+
### Logging in MCP Servers
50+
51+
When implementing MCP servers, be careful about how you handle logging:
52+
53+
**For STDIO-based servers:** Never write to standard output (stdout). This includes:
54+
55+
- `print()` statements in Python
56+
- `console.log()` in JavaScript
57+
- `fmt.Println()` in Go
58+
- Similar stdout functions in other languages
59+
60+
Writing to stdout will corrupt the JSON-RPC messages and break your server.
61+
62+
**For HTTP-based servers:** Standard output logging is fine since it doesn't interfere with HTTP responses.
63+
64+
### Best Practices
65+
66+
1. Use a logging library that writes to stderr or files.
67+
68+
### Quick Examples
69+
70+
```python
71+
# ❌ Bad (STDIO)
72+
print("Processing request")
73+
74+
# ✅ Good (STDIO)
75+
import logging
76+
logging.info("Processing request")
77+
```
78+
4979
### System requirements
5080

5181
- Python 3.10 or higher installed.
@@ -345,6 +375,36 @@ This quickstart assumes you have familiarity with:
345375
- TypeScript
346376
- LLMs like Claude
347377

378+
### Logging in MCP Servers
379+
380+
When implementing MCP servers, be careful about how you handle logging:
381+
382+
**For STDIO-based servers:** Never write to standard output (stdout). This includes:
383+
384+
- `print()` statements in Python
385+
- `console.log()` in JavaScript
386+
- `fmt.Println()` in Go
387+
- Similar stdout functions in other languages
388+
389+
Writing to stdout will corrupt the JSON-RPC messages and break your server.
390+
391+
**For HTTP-based servers:** Standard output logging is fine since it doesn't interfere with HTTP responses.
392+
393+
### Best Practices
394+
395+
1. Use a logging library that writes to stderr or files, such as `logging` in Python.
396+
2. For JavaScript, be especially careful - `console.log()` writes to stdout by default
397+
398+
### Quick Examples
399+
400+
```javascript
401+
// ❌ Bad (STDIO)
402+
console.log("Server started");
403+
404+
// ✅ Good (STDIO)
405+
console.error("Server started"); // stderr is safe
406+
```
407+
348408
### System requirements
349409

350410
For TypeScript, make sure you have the latest version of Node installed.
@@ -543,7 +603,7 @@ The tool execution handler is responsible for actually executing the logic of ea
543603
```typescript
544604
// Register weather tools
545605
server.tool(
546-
"get-alerts",
606+
"get_alerts",
547607
"Get weather alerts for a state",
548608
{
549609
state: z.string().length(2).describe("Two-letter state code (e.g. CA, NY)"),
@@ -591,7 +651,7 @@ server.tool(
591651
);
592652

593653
server.tool(
594-
"get-forecast",
654+
"get_forecast",
595655
"Get weather forecast for a location",
596656
{
597657
latitude: z.number().min(-90).max(90).describe("Latitude of the location"),
@@ -798,6 +858,26 @@ Let's get started with building our weather server!
798858
For more information, see the [MCP Server Boot Starter](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-server-boot-starter-docs.html) reference documentation.
799859
For manual MCP Server implementation, refer to the [MCP Server Java SDK documentation](/sdk/java/mcp-server).
800860

861+
### Logging in MCP Servers
862+
863+
When implementing MCP servers, be careful about how you handle logging:
864+
865+
**For STDIO-based servers:** Never write to standard output (stdout). This includes:
866+
867+
- `print()` statements in Python
868+
- `console.log()` in JavaScript
869+
- `fmt.Println()` in Go
870+
- Similar stdout functions in other languages
871+
872+
Writing to stdout will corrupt the JSON-RPC messages and break your server.
873+
874+
**For HTTP-based servers:** Standard output logging is fine since it doesn't interfere with HTTP responses.
875+
876+
### Best Practices
877+
878+
1. Use a logging library that writes to stderr or files.
879+
2. Ensure any configured logging library will not write to STDOUT
880+
801881
### System requirements
802882

803883
- Java 17 or higher installed.
@@ -1490,6 +1570,25 @@ This quickstart assumes you have familiarity with:
14901570
- LLMs like Claude
14911571
- .NET 8 or higher
14921572

1573+
### Logging in MCP Servers
1574+
1575+
When implementing MCP servers, be careful about how you handle logging:
1576+
1577+
**For STDIO-based servers:** Never write to standard output (stdout). This includes:
1578+
1579+
- `print()` statements in Python
1580+
- `console.log()` in JavaScript
1581+
- `fmt.Println()` in Go
1582+
- Similar stdout functions in other languages
1583+
1584+
Writing to stdout will corrupt the JSON-RPC messages and break your server.
1585+
1586+
**For HTTP-based servers:** Standard output logging is fine since it doesn't interfere with HTTP responses.
1587+
1588+
### Best Practices
1589+
1590+
1. Use a logging library that writes to stderr or files
1591+
14931592
### System requirements
14941593

14951594
- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) or higher installed.

docs/specification/2025-06-18/server/prompts.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ Messages in a prompt can contain:
186186
- `role`: Either "user" or "assistant" to indicate the speaker
187187
- `content`: One of the following content types:
188188

189+
<Note>
190+
All content types in prompt messages support optional
191+
[annotations](/specification/2025-06-18/server/resources#annotations) for
192+
metadata about audience, priority, and modification times.
193+
</Note>
194+
189195
#### Text Content
190196

191197
Text content represents plain text messages:

docs/specification/2025-06-18/server/resources.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,36 @@ Resources can contain either text or binary data:
305305
}
306306
```
307307

308+
### Annotations
309+
310+
Resources, resource templates and content blocks support optional annotations that provide hints to clients about how to use or display the resource:
311+
312+
- **`audience`**: An array indicating the intended audience(s) for this resource. Valid values are `"user"` and `"assistant"`. For example, `["user", "assistant"]` indicates content useful for both.
313+
- **`priority`**: A number from 0.0 to 1.0 indicating the importance of this resource. A value of 1 means "most important" (effectively required), while 0 means "least important" (entirely optional).
314+
- **`lastModified`**: An ISO 8601 formatted timestamp indicating when the resource was last modified (e.g., `"2025-01-12T15:00:58Z"`).
315+
316+
Example resource with annotations:
317+
318+
```json
319+
{
320+
"uri": "file:///project/README.md",
321+
"name": "README.md",
322+
"title": "Project Documentation",
323+
"mimeType": "text/markdown",
324+
"annotations": {
325+
"audience": ["user"],
326+
"priority": 0.8,
327+
"lastModified": "2025-01-12T15:00:58Z"
328+
}
329+
}
330+
```
331+
332+
Clients can use these annotations to:
333+
334+
- Filter resources based on their intended audience
335+
- Prioritize which resources to include in context
336+
- Display modification times or sort by recency
337+
308338
## Common URI Schemes
309339

310340
The protocol defines several standard URI schemes. This list not

docs/specification/2025-06-18/server/tools.mdx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
203203

204204
**Unstructured** content is returned in the `content` field of a result, and can contain multiple content items of different types:
205205

206+
<Note>
207+
All content types (text, image, audio, resource links, and embedded resources)
208+
support optional
209+
[annotations](/specification/2025-06-18/server/resources#annotations) that
210+
provide metadata about audience, priority, and modification times. This is the
211+
same annotation format used by resources and prompts.
212+
</Note>
213+
206214
#### Text Content
207215

208216
```json
@@ -219,9 +227,16 @@ Tool results may contain [**structured**](#structured-content) or **unstructured
219227
"type": "image",
220228
"data": "base64-encoded-data",
221229
"mimeType": "image/png"
230+
"annotations": {
231+
"audience": ["user"],
232+
"priority": 0.9
233+
}
234+
222235
}
223236
```
224237

238+
This example demonstrates the use of an optional Annotation.
239+
225240
#### Audio Content
226241

227242
```json
@@ -243,10 +258,16 @@ or data. In this case, the tool will return a URI that can be subscribed to or f
243258
"uri": "file:///project/src/main.rs",
244259
"name": "main.rs",
245260
"description": "Primary application entry point",
246-
"mimeType": "text/x-rust"
261+
"mimeType": "text/x-rust",
262+
"annotations": {
263+
"audience": ["assistant"],
264+
"priority": 0.9
265+
}
247266
}
248267
```
249268

269+
Resource links support the same [Resource annotations](/specification/2025-06-18/server/resources#annotations) as regular resources to help clients understand how to use them.
270+
250271
<Info>
251272
Resource links returned by tools are not guaranteed to appear in the results
252273
of a `resources/list` request.
@@ -264,11 +285,18 @@ or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers t
264285
"uri": "file:///project/src/main.rs",
265286
"title": "Project Rust Main File",
266287
"mimeType": "text/x-rust",
267-
"text": "fn main() {\n println!(\"Hello world!\");\n}"
288+
"text": "fn main() {\n println!(\"Hello world!\");\n}",
289+
"annotations": {
290+
"audience": ["user", "assistant"],
291+
"priority": 0.7,
292+
"lastModified": "2025-05-03T14:30:00Z"
293+
}
268294
}
269295
}
270296
```
271297

298+
Embedded resources support the same [Resource annotations](/specification/2025-06-18/server/resources#annotations) as regular resources to help clients understand how to use them.
299+
272300
#### Structured Content
273301

274302
**Structured** content is returned as a JSON object in the `structuredContent` field of a result.

docs/specification/draft/client/elicitation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ sequenceDiagram
198198

199199
## Request Schema
200200

201-
The `requestedSchema` field allows servers to define the structure of the expected response using a restricted subset of JSON Schema. To simplify implementation for clients, elicitation schemas are limited to flat objects with primitive properties only:
201+
The `requestedSchema` field allows servers to define the structure of the expected response using a restricted subset of JSON Schema. To simplify client user experience, elicitation schemas are limited to flat objects with primitive properties only:
202202

203203
```json
204204
"requestedSchema": {
@@ -279,7 +279,7 @@ Clients can use this schema to:
279279
2. Validate user input before sending
280280
3. Provide better guidance to users
281281

282-
Note that complex nested structures, arrays of objects, and other advanced JSON Schema features are intentionally not supported to simplify client implementation.
282+
Note that complex nested structures, arrays of objects, and other advanced JSON Schema features are intentionally not supported to simplify client user experience.
283283

284284
## Response Actions
285285

docs/specification/draft/server/prompts.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ Messages in a prompt can contain:
186186
- `role`: Either "user" or "assistant" to indicate the speaker
187187
- `content`: One of the following content types:
188188

189+
<Note>
190+
All content types in prompt messages support optional
191+
[annotations](/specification/2025-06-18/server/resources#annotations) for
192+
metadata about audience, priority, and modification times.
193+
</Note>
194+
189195
#### Text Content
190196

191197
Text content represents plain text messages:

0 commit comments

Comments
 (0)