Skip to content

Commit 2f7e2a6

Browse files
authored
Merge branch 'main' into add-systemprompt-client
2 parents bc46178 + 06b5527 commit 2f7e2a6

File tree

19 files changed

+386
-220
lines changed

19 files changed

+386
-220
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818

1919
- run: npm ci
2020

21-
- run: npm run validate:schema
21+
- name: Check TypeScript definitions
22+
run: npm run check:schema:ts
2223

23-
- run: npm run generate:json
2424
- name: Verify that `npm run generate:json` did not change outputs (if it did, please re-run it and re-commit!)
25-
run: git diff --exit-code
25+
run: npm run check:schema:json

.github/workflows/markdown-format.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ jobs:
2525
run: npm ci
2626

2727
- name: Check markdown formatting
28-
run: npm run format:check
28+
run: npm run check:docs:format
29+
30+
- name: Check markdown links
31+
run: npm run check:docs:links

CONTRIBUTING.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,34 @@ npm install # install dependencies
3333
## Making Changes
3434

3535
Note that schema changes are made to `schema.ts`, and `schema.json` is generated from
36-
`schema.ts`. You should validate your `schema.ts` changes first and then generate the
37-
`schema.json`.
36+
`schema.ts`.
3837

3938
1. Create a new branch:
4039

4140
```bash
4241
git checkout -b feature/your-feature-name
4342
```
4443

45-
2. Make your changes
46-
3. Validate your changes:
44+
2. Make your changes.
4745

48-
```bash
49-
npm run validate:schema # validate schema
50-
```
51-
52-
4. Generate the `schema.json`:
46+
3. Validate schema changes and generate `schema.json`:
5347

5448
```bash
55-
npm run generate:json # generate JSON schema
49+
npm run check:schema:ts
50+
npm run generate:json
5651
```
5752

58-
5. Run docs locally (optional):
53+
4. Validate documentation changes and apply formatting:
5954

6055
```bash
61-
npm run serve:docs
56+
npm run check:docs
57+
npm run format
6258
```
6359

64-
6. Format/lint your changes:
60+
5. Preview documentation locally (optional):
6561

6662
```bash
67-
npm run format:check # check formatting
68-
npm run format # apply formatting
63+
npm run serve:docs
6964
```
7065

7166
### Documentation Guidelines
@@ -77,7 +72,7 @@ When contributing to the documentation:
7772
- Include code examples where appropriate
7873
- Use proper MDX formatting and components
7974
- Test all links and code samples
80-
- You may run `npm run check-links` to look for broken internal links.
75+
- You may run `npm run check:docs:links` to look for broken internal links.
8176
- Use appropriate headings: "When to use", "Steps", and "Tips" for tutorials
8277
- Place new pages in appropriate sections (concepts, tutorials, etc.)
8378
- Update `docs.json` when adding new pages

docs/clients.mdx

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

docs/docs.json

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,7 @@
5858
]
5959
}
6060
]
61-
},
62-
{
63-
"tab": "SDKs",
64-
"icon": "book-open",
65-
"groups": [
66-
{
67-
"group": "Java",
68-
"pages": [
69-
"sdk/java/mcp-overview",
70-
"sdk/java/mcp-client",
71-
"sdk/java/mcp-server"
72-
]
73-
}
74-
]
75-
},
61+
},
7662
{
7763
"tab": "Specification",
7864
"icon": "book",

docs/docs/concepts/transports.mdx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,7 @@ Use stdio when:
129129

130130
### Streamable HTTP
131131

132-
<Warning>
133-
134-
The SSE Transport has been [**replaced**](http://modelcontextprotocol.io/specification/2025-03-26/changelog#major-changes) with a more
135-
flexible [Streamable HTTP](http://modelcontextprotocol.io/specification/2025-03-26/basic/transports) transport. Refer to the [Specification](http://modelcontextprotocol.io/specification/2025-03-26/basic/transports)
136-
and latest SDKs for the most recent information.
137-
138-
</Warning>
139-
140-
SSE transport enables server-to-client streaming with HTTP POST requests for client-to-server communication.
132+
The Streamable HTTP transport uses HTTP POST requests for client-to-server communication and optional Server-Sent Events (SSE) streams for server-to-client communication.
141133

142134
Use Streamable HTTP when:
143135

docs/quickstart/client.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "For Client Developers"
33
description: "Get started building your own client that can integrate with all MCP servers."
44
---
55

6-
In this tutorial, you'll learn how to build a LLM-powered chatbot client that connects to MCP servers. It helps to have gone through the [Server quickstart](/quickstart/server) that guides you through the basic of building your first server.
6+
In this tutorial, you'll learn how to build an LLM-powered chatbot client that connects to MCP servers. It helps to have gone through the [Server quickstart](/quickstart/server) that guides you through the basics of building your first server.
77

88
<Tabs>
99
<Tab title="Python">
@@ -598,7 +598,7 @@ async connectToServer(serverScriptPath: string) {
598598
command,
599599
args: [serverScriptPath],
600600
});
601-
this.mcp.connect(this.transport);
601+
await this.mcp.connect(this.transport);
602602

603603
const toolsResult = await this.mcp.listTools();
604604
this.tools = toolsResult.tools.map((tool) => {
@@ -640,7 +640,6 @@ async processQuery(query: string) {
640640
});
641641

642642
const finalText = [];
643-
const toolResults = [];
644643

645644
for (const content of response.content) {
646645
if (content.type === "text") {
@@ -653,7 +652,6 @@ async processQuery(query: string) {
653652
name: toolName,
654653
arguments: toolArgs,
655654
});
656-
toolResults.push(result);
657655
finalText.push(
658656
`[Calling tool ${toolName} with args ${JSON.stringify(toolArgs)}]`
659657
);
@@ -1474,6 +1472,7 @@ Then, add the required dependencies to your project:
14741472
dotnet add package ModelContextProtocol --prerelease
14751473
dotnet add package Anthropic.SDK
14761474
dotnet add package Microsoft.Extensions.Hosting
1475+
dotnet add package Microsoft.Extensions.AI
14771476
```
14781477

14791478
## Setting up your API key

docs/quickstart/server.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ Create a new boot starter application using the `spring-ai-starter-mcp-client` d
10851085
```
10861086

10871087
and set the `spring.ai.mcp.client.stdio.servers-configuration` property to point to your `claude_desktop_config.json`.
1088-
You can re-use the existing Anthropic Desktop configuration:
1088+
You can reuse the existing Anthropic Desktop configuration:
10891089

10901090
```properties
10911091
spring.ai.mcp.client.stdio.servers-configuration=file:PATH/TO/claude_desktop_config.json
@@ -1573,7 +1573,7 @@ await app.RunAsync();
15731573

15741574
<Note>
15751575

1576-
When creating the `ApplicationHostBuilder`, ensure you use `CreateEmptyApplicationBuilder` instead of `CreateDefaultBuilder`. This ensures that the server does not write any additional messages to the console. This is only neccessary for servers using STDIO transport.
1576+
When creating the `ApplicationHostBuilder`, ensure you use `CreateEmptyApplicationBuilder` instead of `CreateDefaultBuilder`. This ensures that the server does not write any additional messages to the console. This is only necessary for servers using STDIO transport.
15771577

15781578
</Note>
15791579

docs/sdk/java/mcp-server.mdx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ The server supports both synchronous and asynchronous APIs, allowing for flexibl
4242
McpSyncServer syncServer = McpServer.sync(transportProvider)
4343
.serverInfo("my-server", "1.0.0")
4444
.capabilities(ServerCapabilities.builder()
45-
.resources(true) // Enable resource support
46-
.tools(true) // Enable tool support
47-
.prompts(true) // Enable prompt support
48-
.logging() // Enable logging support
49-
.completions() // Enable completions support
45+
.resources(false, true) // Enable resource support
46+
.tools(true) // Enable tool support
47+
.prompts(true) // Enable prompt support
48+
.logging() // Enable logging support
49+
.completions() // Enable completions support
5050
.build())
5151
.build();
5252

@@ -68,10 +68,11 @@ syncServer.close();
6868
McpAsyncServer asyncServer = McpServer.async(transportProvider)
6969
.serverInfo("my-server", "1.0.0")
7070
.capabilities(ServerCapabilities.builder()
71-
.resources(true) // Enable resource support
72-
.tools(true) // Enable tool support
73-
.prompts(true) // Enable prompt support
74-
.logging() // Enable logging support
71+
.resources(false, true) // Enable resource support
72+
.tools(true) // Enable tool support
73+
.prompts(true) // Enable prompt support
74+
.logging() // Enable logging support
75+
.completions() // Enable completions support
7576
.build())
7677
.build();
7778

@@ -507,7 +508,7 @@ var mcpServer = McpServer.async(mcpServerTransportProvider)
507508
</Tabs>
508509

509510
The `McpSchema.CompletionReference` definition defines the type (`PromptRefernce` or `ResourceRefernce`) and the identifier for the completion specification (e.g handler).
510-
The handler function processes requests and returns the complition response.
511+
The handler function processes requests and returns the completion response.
511512
The first argument is `McpAsyncServerExchange` for client interaction, and the second argument is a `CompleteRequest` instance.
512513

513514
Check the [using completion](/sdk/java/mcp-client#using-completion) to learn how to use the completion capabilities on the client side.

docs/specification/2025-03-26/basic/lifecycle.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,17 @@ available during the session.
144144

145145
Key capabilities include:
146146

147-
| Category | Capability | Description |
148-
| -------- | -------------- | ---------------------------------------------------------------------------------------- |
149-
| Client | `roots` | Ability to provide filesystem [roots](/specification/2025-03-26/client/roots) |
150-
| Client | `sampling` | Support for LLM [sampling](/specification/2025-03-26/client/sampling) requests |
151-
| Client | `experimental` | Describes support for non-standard experimental features |
152-
| Server | `prompts` | Offers [prompt templates](/specification/2025-03-26/server/prompts) |
153-
| Server | `resources` | Provides readable [resources](/specification/2025-03-26/server/resources) |
154-
| Server | `tools` | Exposes callable [tools](/specification/2025-03-26/server/tools) |
155-
| Server | `logging` | Emits structured [log messages](/specification/2025-03-26/server/utilities/logging) |
156-
| Server | `completions` | Supports argument [autocompletion](/specification/2025-03-26/server/utilites/completion) |
157-
| Server | `experimental` | Describes support for non-standard experimental features |
147+
| Category | Capability | Description |
148+
| -------- | -------------- | ----------------------------------------------------------------------------------------- |
149+
| Client | `roots` | Ability to provide filesystem [roots](/specification/2025-03-26/client/roots) |
150+
| Client | `sampling` | Support for LLM [sampling](/specification/2025-03-26/client/sampling) requests |
151+
| Client | `experimental` | Describes support for non-standard experimental features |
152+
| Server | `prompts` | Offers [prompt templates](/specification/2025-03-26/server/prompts) |
153+
| Server | `resources` | Provides readable [resources](/specification/2025-03-26/server/resources) |
154+
| Server | `tools` | Exposes callable [tools](/specification/2025-03-26/server/tools) |
155+
| Server | `logging` | Emits structured [log messages](/specification/2025-03-26/server/utilities/logging) |
156+
| Server | `completions` | Supports argument [autocompletion](/specification/2025-03-26/server/utilities/completion) |
157+
| Server | `experimental` | Describes support for non-standard experimental features |
158158

159159
Capability objects can describe sub-capabilities like:
160160

0 commit comments

Comments
 (0)