Skip to content

Commit a1ccb64

Browse files
authored
Merge branch 'main' into feature/distill-token-optimization
2 parents cebaf79 + b1e1eb1 commit a1ccb64

76 files changed

Lines changed: 6557 additions & 2203 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/claude.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
actions: read
2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 1
3232

‎.github/workflows/python.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
outputs:
1515
packages: ${{ steps.find-packages.outputs.packages }}
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Find Python packages
2020
id: find-packages
@@ -31,13 +31,13 @@ jobs:
3131
name: Test ${{ matrix.package }}
3232
runs-on: ubuntu-latest
3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v6
3535

3636
- name: Install uv
3737
uses: astral-sh/setup-uv@v3
3838

3939
- name: Set up Python
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version-file: "src/${{ matrix.package }}/.python-version"
4343

@@ -68,13 +68,13 @@ jobs:
6868
name: Build ${{ matrix.package }}
6969
runs-on: ubuntu-latest
7070
steps:
71-
- uses: actions/checkout@v4
71+
- uses: actions/checkout@v6
7272

7373
- name: Install uv
7474
uses: astral-sh/setup-uv@v3
7575

7676
- name: Set up Python
77-
uses: actions/setup-python@v5
77+
uses: actions/setup-python@v6
7878
with:
7979
python-version-file: "src/${{ matrix.package }}/.python-version"
8080

@@ -91,7 +91,7 @@ jobs:
9191
run: uv build
9292

9393
- name: Upload artifacts
94-
uses: actions/upload-artifact@v4
94+
uses: actions/upload-artifact@v6
9595
with:
9696
name: dist-${{ matrix.package }}
9797
path: src/${{ matrix.package }}/dist/
@@ -112,7 +112,7 @@ jobs:
112112

113113
steps:
114114
- name: Download artifacts
115-
uses: actions/download-artifact@v4
115+
uses: actions/download-artifact@v7
116116
with:
117117
name: dist-${{ matrix.package }}
118118
path: dist/

‎.github/workflows/readme-pr-check.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
pull-requests: write
1818
steps:
1919
- name: Check files and comment if README-only
20-
uses: actions/github-script@v7
20+
uses: actions/github-script@v8
2121
with:
2222
script: |
2323
const { owner, repo } = context.repo;
@@ -46,7 +46,7 @@ jobs:
4646
body: [
4747
'Thanks for your contribution!',
4848
'',
49-
'**We are no longer accepting PRs to add new servers to the README.** The server lists are deprecated and will eventually be removed entirely, replaced by the registry.',
49+
'**We are no longer accepting PRs to add new servers to the README.** The third-party server list has been removed from this README in favor of the [MCP Server Registry](https://registry.modelcontextprotocol.io/).',
5050
'',
5151
'👉 **To add a new MCP server:** Please publish it to the [MCP Server Registry](https://github.com/modelcontextprotocol/registry) instead. You can browse published servers at [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/).',
5252
'',
@@ -63,7 +63,7 @@ jobs:
6363
pull-requests: write
6464
steps:
6565
- name: Swap labels and minimize comments
66-
uses: actions/github-script@v7
66+
uses: actions/github-script@v8
6767
with:
6868
script: |
6969
const { owner, repo } = context.repo;

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
npm_packages: ${{ steps.create-npm-packages.outputs.npm_packages}}
1616
pypi_packages: ${{ steps.create-pypi-packages.outputs.pypi_packages}}
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
with:
2020
fetch-depth: 0
2121

@@ -43,7 +43,7 @@ jobs:
4343
cat RELEASE_NOTES.md
4444
4545
- name: Release notes
46-
uses: actions/upload-artifact@v4
46+
uses: actions/upload-artifact@v6
4747
with:
4848
name: release-notes
4949
path: RELEASE_NOTES.md
@@ -74,7 +74,7 @@ jobs:
7474
outputs:
7575
changes_made: ${{ steps.commit.outputs.changes_made }}
7676
steps:
77-
- uses: actions/checkout@v4
77+
- uses: actions/checkout@v6
7878
with:
7979
fetch-depth: 0
8080

@@ -118,15 +118,15 @@ jobs:
118118
id-token: write # Required for trusted publishing
119119
runs-on: ubuntu-latest
120120
steps:
121-
- uses: actions/checkout@v4
121+
- uses: actions/checkout@v6
122122
with:
123123
ref: ${{ needs.create-metadata.outputs.version }}
124124

125125
- name: Install uv
126126
uses: astral-sh/setup-uv@v5
127127

128128
- name: Set up Python
129-
uses: actions/setup-python@v5
129+
uses: actions/setup-python@v6
130130
with:
131131
python-version-file: "src/${{ matrix.package }}/.python-version"
132132

@@ -158,11 +158,11 @@ jobs:
158158
environment: release
159159
runs-on: ubuntu-latest
160160
steps:
161-
- uses: actions/checkout@v4
161+
- uses: actions/checkout@v6
162162
with:
163163
ref: ${{ needs.create-metadata.outputs.version }}
164164

165-
- uses: actions/setup-node@v4
165+
- uses: actions/setup-node@v6
166166
with:
167167
node-version: 22
168168
cache: npm
@@ -204,10 +204,10 @@ jobs:
204204
permissions:
205205
contents: write
206206
steps:
207-
- uses: actions/checkout@v4
207+
- uses: actions/checkout@v6
208208

209209
- name: Download release notes
210-
uses: actions/download-artifact@v4
210+
uses: actions/download-artifact@v7
211211
with:
212212
name: release-notes
213213

‎.github/workflows/typescript.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
outputs:
1515
packages: ${{ steps.find-packages.outputs.packages }}
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818
- name: Find JS packages
1919
id: find-packages
2020
working-directory: src
@@ -30,9 +30,9 @@ jobs:
3030
name: Test ${{ matrix.package }}
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
3434

35-
- uses: actions/setup-node@v4
35+
- uses: actions/setup-node@v6
3636
with:
3737
node-version: 22
3838
cache: npm
@@ -53,9 +53,9 @@ jobs:
5353
name: Build ${{ matrix.package }}
5454
runs-on: ubuntu-latest
5555
steps:
56-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v6
5757

58-
- uses: actions/setup-node@v4
58+
- uses: actions/setup-node@v6
5959
with:
6060
node-version: 22
6161
cache: npm
@@ -84,8 +84,8 @@ jobs:
8484
id-token: write
8585

8686
steps:
87-
- uses: actions/checkout@v4
88-
- uses: actions/setup-node@v4
87+
- uses: actions/checkout@v6
88+
- uses: actions/setup-node@v6
8989
with:
9090
node-version: 22
9191
cache: npm

‎CLAUDE.md‎

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code when working with code in this repository.
4+
5+
## Project Overview
6+
7+
Official MCP reference server implementations. This is an npm workspaces monorepo containing 7 servers (4 TypeScript, 3 Python) under `src/`. Each server is a standalone package published to npm or PyPI.
8+
9+
## Monorepo Structure
10+
11+
```
12+
src/
13+
everything/ TS @modelcontextprotocol/server-everything (reference server, all MCP features)
14+
filesystem/ TS @modelcontextprotocol/server-filesystem (file operations with Roots access control)
15+
memory/ TS @modelcontextprotocol/server-memory (knowledge graph persistence)
16+
sequentialthinking/ TS @modelcontextprotocol/server-sequential-thinking (step-by-step reasoning)
17+
fetch/ Py mcp-server-fetch (web content fetching)
18+
git/ Py mcp-server-git (git repository operations)
19+
time/ Py mcp-server-time (timezone queries and conversion)
20+
```
21+
22+
## Build & Test Commands
23+
24+
### TypeScript servers
25+
26+
```bash
27+
# Single server
28+
cd src/<server> && npm ci && npm run build && npm test
29+
30+
# All TS servers from root
31+
npm install && npm run build
32+
```
33+
34+
- Build: `tsc` (target ES2022, module Node16, strict mode)
35+
- Tests: **vitest** with `@vitest/coverage-v8` (required for new tests)
36+
- Node version: **22**
37+
38+
### Python servers
39+
40+
```bash
41+
cd src/<server> && uv sync --frozen --all-extras --dev
42+
43+
# Run tests (if tests/ or test/ directory exists)
44+
uv run pytest
45+
46+
# Type checking
47+
uv run pyright
48+
49+
# Linting
50+
uv run ruff check .
51+
```
52+
53+
- Build system: **hatchling** (`uv build`)
54+
- Package manager: **uv** (not pip)
55+
- Python version: **>= 3.10** (per-server `.python-version` file)
56+
- Type checking: **pyright** (enforced in CI)
57+
- Linting: **ruff**
58+
59+
## Code Style
60+
61+
### TypeScript
62+
63+
- ES modules with `.js` extension in import paths
64+
- Strict TypeScript typing for all functions and variables
65+
- Zod schemas for tool input validation
66+
- 2-space indentation, trailing commas in multi-line objects
67+
- camelCase for variables/functions, PascalCase for types/classes, UPPER_CASE for constants
68+
- kebab-case for file names and registered tools/prompts/resources
69+
- Verb-first tool names (e.g., `get-file-info`, not `file-info`)
70+
- Imports grouped: external first, then internal
71+
72+
### Python
73+
74+
- Type hints enforced via pyright
75+
- Async/await patterns (especially in fetch server with pytest-asyncio)
76+
- Follow existing module layout per server
77+
78+
## Contributing Guidelines
79+
80+
**Accepted:** Bug fixes, usability improvements, enhancements demonstrating MCP protocol features (Resources, Prompts, Roots -- not just Tools).
81+
82+
**Selective:** New features outside a server's core purpose or highly opinionated additions.
83+
84+
**Not accepted:** New server implementations (use the [MCP Server Registry](https://github.com/modelcontextprotocol/registry)), README server listing changes.
85+
86+
## CI/CD Pipeline
87+
88+
Both TypeScript and Python workflows use **dynamic package detection** (find + jq matrix strategy):
89+
90+
1. `detect-packages` -- finds all `package.json` / `pyproject.toml` under `src/`
91+
2. `test` -- runs tests per package
92+
3. `build` -- compiles and type-checks per package
93+
4. `publish` -- on release events only (npm for TS, PyPI trusted publishing for Python)
94+
95+
## MCP Protocol Reference
96+
97+
The repo is configured with an MCP docs server (`.mcp.json`) pointing to `https://modelcontextprotocol.io/mcp`. For schema details, reference `https://github.com/modelcontextprotocol/modelcontextprotocol/tree/main/schema` which contains versioned schemas in JSON and TypeScript formats.
98+
99+
## Key Patterns
100+
101+
- Each server registers capabilities via `registerTools(server)`, `registerResources(server)`, `registerPrompts(server)` functions
102+
- Tool annotations: set `readOnlyHint`, `idempotentHint`, `destructiveHint` per MCP spec
103+
- Transport support: stdio (default), SSE (deprecated), Streamable HTTP
104+
- All PRs are reviewed against the [PR template](.github/pull_request_template.md) checklist -- ensure MCP docs are read, security best practices followed, and changes tested with an LLM client

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ We accept changes through [the standard GitHub flow model](https://docs.github.c
66

77
## Server Listings
88

9-
We are **no longer accepting PRs** to add server links to the README. Please publish your server to the [MCP Server Registry](https://github.com/modelcontextprotocol/registry) instead. Follow the [quickstart guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/quickstart.mdx).
9+
The README no longer contains a list of third-party MCP servers — that list has been retired in favor of the [MCP Server Registry](https://github.com/modelcontextprotocol/registry). To make your server discoverable, follow the [quickstart guide](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/quickstart.mdx) to publish it there.
1010

11-
You can browse published servers using the simple UI at [https://registry.modelcontextprotocol.io/](https://registry.modelcontextprotocol.io/).
11+
You can browse published servers at [https://registry.modelcontextprotocol.io/](https://registry.modelcontextprotocol.io/).
1212

1313
## Server Implementations
1414

0 commit comments

Comments
 (0)