Skip to content

Commit 21f6ec1

Browse files
authored
Merge branch 'main' into meta-on-resources
2 parents 6add6c4 + 6a4dc0f commit 21f6ec1

File tree

9 files changed

+54
-51
lines changed

9 files changed

+54
-51
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/sdk/java/mcp-server.mdx

Lines changed: 10 additions & 9 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

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

docs/specification/draft/basic/authorization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ requests that appear legitimate to resource servers.
257257
Clients and servers **MUST** implement secure token storage and follow OAuth best practices,
258258
as outlined in [OAuth 2.1, Section 7.1](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-12#section-7.1).
259259

260-
MCP authorization servers SHOULD issue short-lived access tokens token to reduce the impact of leaked tokens.
260+
MCP authorization servers SHOULD issue short-lived access tokens to reduce the impact of leaked tokens.
261261
For public clients, MCP authorization servers **MUST** rotate refresh tokens as described in [OAuth 2.1 Section 4.3.1 "Refresh Token Grant"](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-12#section-4.3.1).
262262

263263
### Communication Security

docs/specification/draft/changelog.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ the previous revision, [2025-03-26](/specification/2025-03-26).
1111

1212
1. Removed support for JSON-RPC **[batching](https://www.jsonrpc.org/specification#batch)**
1313
(PR [#416](https://github.com/modelcontextprotocol/specification/pull/416))
14-
2. Added support for [structured tool output](server/tools#structured-content)
14+
2. Added support for [structured tool output](/specification/draft/server/tools#structured-content)
1515
(PR [#371](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/371))
16-
3. Classified MCP servers as [OAuth Resource Servers](basic/authorization#authorization-server-discovery),
16+
3. Classified MCP servers as [OAuth Resource Servers](/specification/draft/basic/authorization#authorization-server-discovery),
1717
adding protected resource metadata to discover the corresponding Authorization server.
1818
(PR [#338](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/338))
19-
4. Clarified [security considerations](basic/authorization#security-considerations) and best practices
20-
in the authorization spec and in a new [security best practices page](basic/security_best_practices).
21-
5. Added support for **[elicitation](client/elicitation)**, enabling servers to request additional
19+
4. Clarified [security considerations](/specification/draft/basic/authorization#security-considerations) and best practices
20+
in the authorization spec and in a new [security best practices page](/specification/draft/basic/security_best_practices).
21+
5. Added support for **[elicitation](/specification/draft/client/elicitation)**, enabling servers to request additional
2222
information from users during interactions.
2323
(PR [#382](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/382))
2424
6. Added support for **[resource links](/specification/draft/server/tools#resource-links)** in

docs/specification/draft/server/tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ or data. In this case, the tool will return a URI that can be subscribed to or f
252252

253253
#### Embedded Resources
254254

255-
[Resources](resources) **MAY** be embedded to provide additional context
255+
[Resources](/specification/draft/server/resources) **MAY** be embedded to provide additional context
256256
or data using a suitable [URI scheme](./resources#common-uri-schemes). Servers that use embedded resources **SHOULD** implement the `resources` capability:
257257

258258
```json

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
]
2222
},
2323
"scripts": {
24-
"validate:schema": "tsc",
24+
"check": "npm run check:schema && npm run check:docs",
25+
"check:schema": "npm run check:schema:ts && npm run check:schema:json",
26+
"check:schema:ts": "tsc",
27+
"check:schema:json": "for f in schema/*/schema.ts; do typescript-json-schema --defaultNumberType integer --required --skipLibCheck \"$f\" \"*\" | cat | cmp \"${f%ts}json\" - || exit 1; done",
28+
"check:docs": "npm run check:docs:format && npm run check:docs:links",
29+
"check:docs:format": "prettier --check \"**/*.{md,mdx}\"",
30+
"check:docs:links": "cd docs && mintlify broken-links",
2531
"generate:json": "for f in schema/*/schema.ts; do typescript-json-schema --defaultNumberType integer --required --skipLibCheck \"$f\" \"*\" -o \"${f%ts}json\"; done",
26-
"serve:docs": "cd docs && mintlify dev",
2732
"format": "prettier --write \"**/*.{md,mdx}\"",
28-
"format:check": "prettier --check \"**/*.{md,mdx}\"",
29-
"check-links": "cd docs && mintlify broken-links"
33+
"serve:docs": "cd docs && mintlify dev"
3034
},
3135
"devDependencies": {
3236
"ajv": "^8.17.1",

0 commit comments

Comments
 (0)