简报·YT
← 返回 GitHub 动态
modelcontextprotocol/servers · 📌 手动指定 已完成

modelcontextprotocol/servers v2.0.0

2026-10-19 06:46 · ⭐ 9.1万 · 模型 gpt-6.1-sol · GitHub Release 原文 ↗
#协议升级 #兼容迁移 #权限修复

modelcontextprotocol/servers v2.0.0

本次发布全面重构服务器以支持新版 MCP 协议,同时兼容旧版客户端,并升级 SDK、收紧运行环境要求及修复文件访问权限问题。

⚠️ 破坏性变更

✨ 新增能力

🛠 修复与改进

▸ Release Notes 英文原文(14851 字符)
## Servers refactored to modern era This release refactors all the servers to support the modern era spec, while still answering legacy era clients as expected. ## Packages | Package | Version | Registry | In this release | | --- | --- | --- | --- | | `@modelcontextprotocol/server-everything` | `2.0.0` | npm | **published** | | `@modelcontextprotocol/server-filesystem` | `2.0.0` | npm | **published** | | `@modelcontextprotocol/server-memory` | `2.0.0` | npm | **published** | | `@modelcontextprotocol/server-sequential-thinking` | `2.0.0` | npm | **published** | | `mcp-server-fetch` | `2026.10.19` | PyPI | **published** | | `mcp-server-git` | `2026.10.19` | PyPI | **published** | | `mcp-server-time` | `2026.10.19` | PyPI | **published** | Release ledger: [v2/chore/5159-release-v2.0.0](https://claude.ai/artifact/G5uY8rqMeKgbr5xmpzSCfi) ## @modelcontextprotocol/server-everything 2.0.0 ### What's Changed * chore: migrate the TypeScript servers to TS SDK v2 (codemod) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5063 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: fold pending changesets into a 1.0.0 CHANGELOG for each TypeScript server by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5083 * Reconcile v2/main with the v1.0.0 release branch: changesets, changelogs, merge of v2/release/1.0.0 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5118 * feat: modern-era TypeScript servers (2026-07-28 + 2025) and the new features in everything by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5131 * ci: validate the TypeScript servers on Node 22, 24 and 26 in parallel by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5147 * chore: version packages by @github-actions[bot] in https://github.com/modelcontextprotocol/servers/pull/5100 * fix: raise the TypeScript servers' Node floor to 24 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5169 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## @modelcontextprotocol/server-filesystem 2.0.0 ### What's Changed * chore: migrate the TypeScript servers to TS SDK v2 (codemod) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5063 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: fold pending changesets into a 1.0.0 CHANGELOG for each TypeScript server by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5083 * fix(filesystem): revoke access when a roots update leaves no valid root by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5095 * fix(filesystem): apply only the newest roots refresh's answer by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5098 * fix(filesystem): hold tool calls while any roots refresh is pending by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5102 * Reconcile v2/main with the v1.0.0 release branch: changesets, changelogs, merge of v2/release/1.0.0 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5118 * feat: modern-era TypeScript servers (2026-07-28 + 2025) and the new features in everything by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5131 * ci: validate the TypeScript servers on Node 22, 24 and 26 in parallel by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5147 * chore: version packages by @github-actions[bot] in https://github.com/modelcontextprotocol/servers/pull/5100 * fix: raise the TypeScript servers' Node floor to 24 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5169 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## @modelcontextprotocol/server-memory 2.0.0 ### What's Changed * chore: migrate the TypeScript servers to TS SDK v2 (codemod) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5063 * memory: expect Node 26's path-suffixed EISDIR message in persistence test by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5078 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: fold pending changesets into a 1.0.0 CHANGELOG for each TypeScript server by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5083 * Reconcile v2/main with the v1.0.0 release branch: changesets, changelogs, merge of v2/release/1.0.0 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5118 * feat: modern-era TypeScript servers (2026-07-28 + 2025) and the new features in everything by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5131 * ci: validate the TypeScript servers on Node 22, 24 and 26 in parallel by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5147 * chore: version packages by @github-actions[bot] in https://github.com/modelcontextprotocol/servers/pull/5100 * fix: raise the TypeScript servers' Node floor to 24 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5169 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## @modelcontextprotocol/server-sequential-thinking 2.0.0 ### What's Changed * chore: migrate the TypeScript servers to TS SDK v2 (codemod) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5063 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: fold pending changesets into a 1.0.0 CHANGELOG for each TypeScript server by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5083 * Reconcile v2/main with the v1.0.0 release branch: changesets, changelogs, merge of v2/release/1.0.0 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5118 * feat: modern-era TypeScript servers (2026-07-28 + 2025) and the new features in everything by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5131 * fix(sequentialthinking): pad the thought box's header row to the border by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5144 * ci: validate the TypeScript servers on Node 22, 24 and 26 in parallel by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5147 * chore: version packages by @github-actions[bot] in https://github.com/modelcontextprotocol/servers/pull/5100 * fix: raise the TypeScript servers' Node floor to 24 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5169 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## Python servers: changes for clients `mcp-server-fetch`, `mcp-server-git` and `mcp-server-time` have no CHANGELOG, so here is what changes for a client in `2026.10.19`. They are now built on the MCP Python SDK's high-level `MCPServer` ([#5175](https://github.com/modelcontextprotocol/servers/pull/5175)). - **Unknown tool:** a JSON-RPC `-32602` error (`Unknown tool: <name>`) in both protocol eras, as the spec requires. It used to be an `isError` result. - **Tool errors** read `Error executing tool <name>: <message>`. Argument-validation errors now use pydantic's wording. Both are still `isError` results. - **Capabilities:** each server now advertises `prompts` and `resources` capabilities (with `listChanged: false`). fetch's `fetch` prompt is the only entry in those lists. - **time:** `get_current_time` and `convert_time` declare an `outputSchema` and return `structuredContent`. The text content is unchanged. - **fetch:** a `prompts/get` result's `description` is now always the prompt's registered description. - **Requires** `mcp>=2.3,<3`. ## mcp-server-fetch 2026.10.19 ### What's Changed * Port fetch, git and time to the MCP Python SDK v2 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5062 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: stamp Python CalVer versions for 2026.10.10 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5084 * fix(fetch): annotate the fetch tool by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5112 * feat(fetch,git,time): serve the 2026-07-28 era beside 2025-11-25 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5126 * chore: stamp Python CalVer versions for 2026.10.18 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5165 * Python servers: build fetch, git and time on MCPServer; unknown tool is -32602 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5175 * chore: stamp Python CalVer versions for 2026.10.19 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5177 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## mcp-server-git 2026.10.19 ### What's Changed * Port fetch, git and time to the MCP Python SDK v2 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5062 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: stamp Python CalVer versions for 2026.10.10 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5084 * feat(fetch,git,time): serve the 2026-07-28 era beside 2025-11-25 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5126 * fix(git): prefix git_show diff headers with a/ and b/ by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5145 * chore: stamp Python CalVer versions for 2026.10.18 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5165 * Python servers: build fetch, git and time on MCPServer; unknown tool is -32602 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5175 * chore: stamp Python CalVer versions for 2026.10.19 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5177 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## mcp-server-time 2026.10.19 ### What's Changed * Port fetch, git and time to the MCP Python SDK v2 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5062 * time: accept only exact IANA timezone keys on every platform by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5077 * chore: v1.0.0 release audit, dependency fixes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5082 * chore: stamp Python CalVer versions for 2026.10.10 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5084 * feat(fetch,git,time): serve the 2026-07-28 era beside 2025-11-25 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5126 * chore: stamp Python CalVer versions for 2026.10.18 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5165 * Python servers: build fetch, git and time on MCPServer; unknown tool is -32602 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5175 * chore: stamp Python CalVer versions for 2026.10.19 by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5177 * Release v2.0.0: merge v2/main into main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5166 ## Repository ### What's Changed * ci(everything): adopt the MCP interface diff (adapted from #3260) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/4975 * docs(release): warn against Update branch on the milestone merge PR by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5093 * ci(release): publish with Node 24's bundled npm instead of installing one by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5105 * ci: bring the main-source guard to main (bootstrap for #5119) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5122 * ci: guard main so a PR into it brings nothing not already on v2/main by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5120 * release:notes: put the release-ledger line under the Packages table by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5132 * docs: record the v2/main ruleset (PRs only, no force-push or deletion) by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5140 * docs: always start PR work in a new git worktree by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5139 * ci: declare read-only GITHUB_TOKEN permissions in python.yml and typescript.yml by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5141 * fix(scripts): double backslashes before a quote in win-shell-args by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5143 * docs: add an AGENTS.md rule for pacing bulk GitHub writes by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5142 * ci: dispatch TypeScript and Python CI on automated version PRs by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5146 * chore: drop "Thanks" from the changesets attribution, keep the author by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5163 * Merge main into v2/main so main-source.yml shares history by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5172 * fix(ci): a superseded dispatched run posts no status, whatever its jobs did by @cliffhall in https://github.com/modelcontextprotocol/servers/pull/5179 ## New Contributors * @github-actions[bot] made their first contribution in https://github.com/modelcontextprotocol/servers/pull/5100 **Full Changelog**: https://github.com/modelcontextprotocol/servers/compare/v1.0.0...v2.0.0 ## Known issue [#5176](https://github.com/modelcontextprotocol/servers/issues/5176): in `mcp-server-git`, the string `"null"` passed as `base_branch` to `git_create_branch`, or as `contains` / `not_contains` to `git_branch`, arrives as no value. This affects only a branch literally named `null`. The cause is the Python SDK ([python-sdk#3055](https://github.com/modelcontextprotocol/python-sdk/issues/3055)). Workarounds: for the filters, pass `refs/heads/null` or the commit SHA. To branch from `null`, `git_checkout` it first, then call `git_create_branch` without `base_branch`.
▸ 主项目介绍 · modelcontextprotocol/servers
▸ README 原文(同步于 2026-07-19 13:25)
# Model Context Protocol servers This repository is a collection of *reference implementations* for the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP), as well as references to community-built servers and additional resources. > [!IMPORTANT] > If you are looking for a list of MCP servers, you can browse published servers on [the MCP Registry](https://registry.modelcontextprotocol.io/). The repository served by this README is dedicated to housing just the small number of reference servers maintained by the MCP steering group. > [!WARNING] > The servers in this repository are intended as **reference implementations** to demonstrate MCP features and SDK usage. They are meant to serve as educational examples for developers building their own MCP servers, not as production-ready solutions. Developers should evaluate their own security requirements and implement appropriate safeguards based on their specific threat model and use case. The servers in this repository showcase the versatility and extensibility of MCP, demonstrating how it can be used to give Large Language Models (LLMs) secure, controlled access to tools and data sources. Typically, each MCP server is implemented with an MCP SDK: - [C# MCP SDK](https://github.com/modelcontextprotocol/csharp-sdk) - [Go MCP SDK](https://github.com/modelcontextprotocol/go-sdk) - [Java MCP SDK](https://github.com/modelcontextprotocol/java-sdk) - [Kotlin MCP SDK](https://github.com/modelcontextprotocol/kotlin-sdk) - [PHP MCP SDK](https://github.com/modelcontextprotocol/php-sdk) - [Python MCP SDK](https://github.com/modelcontextprotocol/python-sdk) - [Ruby MCP SDK](https://github.com/modelcontextprotocol/ruby-sdk) - [Rust MCP SDK](https://github.com/modelcontextprotocol/rust-sdk) - [Swift MCP SDK](https://github.com/modelcontextprotocol/swift-sdk) - [TypeScript MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk) ## 🌟 Reference Servers These servers aim to demonstrate MCP features and the official SDKs. - **[Everything](src/everything)** - Reference / test server with prompts, resources, and tools. - **[Fetch](src/fetch)** - Web content fetching and conversion for efficient LLM usage. - **[Filesystem](src/filesystem)** - Secure file operations with configurable access controls. - **[Git](src/git)** - Tools to read, search, and manipulate Git repositories. - **[Memory](src/memory)** - Knowledge graph-based persistent memory system. - **[Sequential Thinking](src/sequentialthinking)** - Dynamic and reflective problem-solving through thought sequences. - **[Time](src/time)** - Time and timezone conversion capabilities. ### Archived The following reference servers are now archived and can be found at [servers-archived](https://github.com/modelcontextprotocol/servers-archived). - **[AWS KB Retrieval](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/aws-kb-retrieval-server)** - Retrieval from AWS Knowledge Base using Bedrock Agent Runtime. - **[Brave Search](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/brave-search)** - Web and local search using Brave's Search API. Has been replaced by the [official server](https://github.com/brave/brave-search-mcp-server). - **[EverArt](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/everart)** - AI image generation using various models. - **[GitHub](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/github)** - Repository management, file operations, and GitHub API integration. - **[GitLab](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/gitlab)** - GitLab API, enabling project management. - **[Google Drive](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/gdrive)** - File access and search capabilities for Google Drive. - **[Google Maps](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/google-maps)** - Location services, directions, and place details. - **[PostgreSQL](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/postgres)** - Read-only database access with schema inspection. - **[Puppeteer](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/puppeteer)** - Browser automation and web scraping. - **[Redis](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/redis)** - Interact with Redis key-value stores. - **[Sentry](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/sentry)** - Retrieving and analyzing issues from Sentry.io. - **[Slack](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/slack)** - Channel management and messaging capabilities. Now maintained by [Zencoder](https://github.com/zencoderai/slack-mcp-server) - **[SQLite](https://github.com/modelcontextprotocol/servers-archived/tree/main/src/sqlite)** - Database interaction and business intelligence capabilities. ## 🚀 Getting Started ### Using MCP Servers in this Repository TypeScript-based servers in this repository can be used directly with `npx`. For example, this will start the [Memory](src/memory) server: ```sh npx -y @modelcontextprotocol/server-memory ``` Python-based servers in this repository can be used directly with [`uvx`](https://docs.astral.sh/uv/concepts/tools/) or [`pip`](https://pypi.org/project/pip/). `uvx` is recommended for ease of use and setup. For example, this will start the [Git](src/git) server: ```sh # With uvx uvx mcp-server-git # With pip pip install mcp-server-git python -m mcp_server_git ``` Follow [these](https://docs.astral.sh/uv/getting-started/installation/) instructions to install `uv` / `uvx` and [these](https://pip.pypa.io/en/stable/installation/) to install `pip`. ### Using an MCP Client However, running a server on its own isn't very useful, and should instead be configured into an MCP client. For example, here's the Claude Desktop configuration to use the above server: ```json { "mcpServers": { "memory": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"] } } } ``` On Windows, wrap `npx` with `cmd /c`: ```json { "mcpServers": { "memory": { "command": "cmd", "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-memory"] } } } ``` Additional examples of using the Claude Desktop as an MCP client might look like: ```json { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"] }, "git": { "command": "uvx", "args": ["mcp-server-git", "--repository", "path/to/git/repo"] }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" } }, "postgres": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"] } } } ``` On Windows, apply the same wrapper to each `npx`-based entry above by changing `"command"` to `"cmd"` and prepending `"/c", "npx"` to the existing `args`. Leave `uvx` entries unchanged. ## 🛠️ Creating Your Own Server Interested in creating your own MCP server? Visit the official documentation at [modelcontextprotocol.io](https://modelcontextprotocol.io/introduction) for comprehensive guides, best practices, and technical details on implementing MCP servers. ## 📚 Learn More See [ADDITIONAL.md](ADDITIONAL.md) for a curated list of frameworks and resources that simplify building MCP servers and clients. ## 🤝 Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for information about contributing to this repository. ## 📦 Releasing See [RELEASING.md](RELEASING.md) for how packages are published (OIDC trusted publishing from CI — no registry tokens) and how to retry a failed publish. ## 🔒 Security See [SECURITY.md](SECURITY.md) for reporting security vulnerabilities. ## 📜 License This project is licensed under the Apache License, Version 2.0 for new contributions, with existing code under MIT - see the [LICENSE](LICENSE) file for details. ## 💬 Community - [GitHub Discussions](https://github.com/orgs/modelcontextprotocol/discussions) ## ⭐ Support If you find MCP servers useful, please consider starring the repository and contributing new servers or improvements! --- Managed by Anthropic, but built together with the community. The Model Context Protocol is open source and we encourage everyone to contribute their own servers and improvements!
▸ 中文总结(生成于 2026-10-20 03:54)

modelcontextprotocol/servers 项目介绍

项目概述

modelcontextprotocol/servers 是 Model Context Protocol(MCP,模型上下文协议)的参考服务器实现集合,展示如何通过 MCP,让大语言模型(LLM)以安全、可控的方式访问外部工具和数据源。

对初次接触的读者,可以把 MCP 服务器理解为连接 AI 应用与具体能力的接口层:文件操作、Git 仓库访问、网页内容获取等能力由服务器提供,支持 MCP 的客户端负责接入和使用这些能力。

该仓库目前专注于维护由 MCP 指导小组维护的少量参考服务器。如果希望查找已发布的 MCP 服务器,应访问 MCP Registry。

项目信息 说明
仓库 modelcontextprotocol/servers
主要语言 TypeScript,仓库也包含 Python 服务器
Star 数 91,386,依据题目提供的数据
项目定位 展示 MCP 特性与官方 SDK 用法的参考实现
许可证 新贡献采用 Apache License 2.0,现有代码采用 MIT,具体以 LICENSE 为准

使用边界:README 明确说明,这些服务器用于教学和开发参考,并非生产就绪的解决方案。 开发者需要根据自己的威胁模型、使用场景和安全要求,评估并实现相应防护措施。

解决什么问题

大语言模型需要借助外部工具和数据,才能完成读取文件、查询仓库、获取网页内容等任务。本项目通过一组具体服务器,展示如何使用 MCP 为模型提供这些能力,并设置相应访问控制。

对于开发者,它主要回答两个问题:

  • 如何接入现有能力: 将服务器配置到 Claude Desktop 等 MCP 客户端中,让客户端可以使用其提供的工具和数据。
  • 如何实现自己的服务器: 通过参考代码学习 MCP 特性、官方 SDK 用法以及不同能力的实现方式。

核心技术架构与实现思路

客户端连接服务器,服务器提供具体能力

README 展示的基本使用关系是:

MCP 客户端 → MCP 服务器 → 工具或数据源

例如,Claude Desktop 可以连接 Filesystem 服务器访问允许目录中的文件,也可以连接 Git 服务器操作指定仓库。

在 README 的客户端配置示例中,每个服务器通过以下信息接入:

  • command:启动服务器的命令,例如 npx 或 uvx。
  • args:启动参数,例如软件包名称、允许访问的目录或 Git 仓库路径。
  • env:按需提供的环境变量,例如访问凭据。

因此,单独启动服务器只是准备步骤;通常还需要把它配置到 MCP 客户端中,才能实际使用其能力。

使用官方 SDK 实现服务器

项目中的服务器通常基于 MCP SDK 实现。README 列出了 C#、Go、Java、Kotlin、PHP、Python、Ruby、Rust、Swift 和 TypeScript 的官方 SDK。

这些 SDK 为不同语言的开发者提供实现 MCP 服务器的入口;该仓库则通过具体示例展示协议能力及 SDK 的使用方式。

通过不同服务器展示协议能力

参考实现覆盖了工具、资源和提示词等 MCP 能力。其中,Everything 明确用于集中展示和测试这些特性,其他服务器则围绕文件、网页、版本控制、记忆和时间等具体场景展开。

当前参考服务器

服务器 主要功能
Everything 提供提示词、资源和工具的参考与测试服务器
Fetch 获取并转换网页内容,便于 LLM 使用
Filesystem 提供文件操作,支持可配置的访问控制
Git 读取、搜索和操作 Git 仓库
Memory 提供基于知识图谱的持久化记忆系统
Sequential Thinking 通过思考序列支持动态、反思式的问题求解
Time 提供时间与时区转换能力

值得关注的技术特点

覆盖多种 MCP 能力

Everything 同时包含提示词、资源和工具,为学习 MCP 的不同能力提供了集中参考;其他服务器展示这些能力如何应用于具体任务。

展示访问控制的实现方向

Filesystem 支持配置允许访问的文件目录,README 的启动示例也明确传入了允许目录。开发者可以据此了解如何为文件访问划定范围,但仍需自行评估实际部署所需的安全措施。

提供基于知识图谱的持久化记忆示例

Memory 展示了使用知识图谱构建持久化记忆系统的方式。README 没有进一步介绍其内部数据结构、检索机制或性能指标,深入理解需要阅读对应实现。

支持便捷启动和客户端配置

TypeScript 服务器可以通过 npx 启动;Python 服务器可以通过 uvx 或 pip 使用,README 推荐使用 uvx 简化安装与运行。项目还提供了 Claude Desktop 配置示例和 Windows 下的命令适配说明。

README 未提供性能基准、吞吐量数据或与同类项目的系统性对比,其重点是功能演示与开发参考。

快速上手

启动 TypeScript 实现的 Memory 服务器:

npx -y @modelcontextprotocol/server-memory

启动 Python 实现的 Git 服务器:

uvx mcp-server-git

也可以通过 pip 安装并运行:

pip install mcp-server-git
python -m mcp_server_git

以 Claude Desktop 接入 Memory 为例,配置如下:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Windows 下需要通过 cmd /c 调用 npx:

{
  "mcpServers": {
    "memory": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

使用 Filesystem 或 Git 等服务器时,还需要按对应说明配置允许访问的目录或目标仓库路径。

归档状态与后续学习

部分早期参考服务器已迁移到 servers-archived,包括 GitHub、GitLab、PostgreSQL、SQLite、Puppeteer、Redis、Google Drive 等。README 中的部分客户端配置仍引用了这些已归档服务器,阅读时需要结合归档状态判断。

其中,Brave Search 已由其官方服务器替代,Slack 服务器目前由 Zencoder 维护。

继续学习可参考: