.NET 10 单文件 MCP 服务器目录
概览
一个静态站点目录,包含.NET 10的单文件MCP(模型上下文协议)服务器。这些服务器用C#编写,并可支持任何支持本地MCP连接的LLM。 每个服务器都是一个文件。它安装到一个项目里,而不是安装到你的机器里。从项目根开始: 服务器文件是每个MCP客户端共享的。配置文件则不是——请选择你的: (也称Claude Desktop、Cursor、Windsurf)写道.mcp.json: Codex 只加载可信项目的配置,所以你的个人 ~/.codex/config.toml 也需要 [projects.''],其中 trust_level = “trusted”。在 Windows 上使用普通的 C:\Users... 路径,而不是扩展的 \?\C:...表单——当项目配置不匹配时,Codex 会默默忽略这两个配置。不要提交那个信任条目,也不要为项目安装运行 codex mcp add:它会全局注册服务器。完整步骤见 https://anymcp.net/install/codex.md. 提交 .mcp-servers/date-times-mcp。
概述(AI 翻译)
一个静态站点目录,包含.NET 10的单文件MCP(模型上下文协议)服务器。这些服务器用C#编写,并可支持任何支持本地MCP连接的LLM。
使用服务器
每个服务器都是一个文件。它安装到一个项目里,而不是安装到你的机器里。从根节点出发 项目:
服务器文件是每个MCP客户端共享的。配置文件则不是——请选择你的:
Claude 代码(也称 Claude Desktop、Cursor、Windsurf)读作 .mcp.json:
手稿写道.codex/config.toml:
Codex 只会从可信项目加载项目配置,所以你的个人 ~/.codex/config.toml
还需要[projects.' '],其中trust_level = "trusted"。在Windows上使用普通
C:\Users\... 路径,而非扩展的 \\?\C:\... 形式——Codex 默默无视项目配置
当两者不匹配时。不要提交那个信任条目,也不要为项目运行codex mcp add
安装:它会全局注册服务器。完整步骤在 。
提交.mcp-servers/date-times-mcp.cs和客户端配置,以及所有克隆项目的人
获取服务器。路径是相对的,所以它适用于所有操作系统。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
AnyMCP - MCP Server Catalog
A static site catalog of single-file MCP (Model Context Protocol) servers for .NET 10. These servers written with C# and works with any LLM that supports local MCP connections.
Using a server
Every server is one file. It installs into a project, not into your machine. From the root of the project:
mkdir -p .mcp-servers
curl -fsSL -o .mcp-servers/date-times-mcp.cs https://anymcp.net/servers/date-times-mcp/date-times-mcp.cs
dotnet build .mcp-servers/date-times-mcp.cs -v q
The server file is shared by every MCP client. The configuration file is not — pick yours:
Claude Code (also Claude Desktop, Cursor, Windsurf) reads .mcp.json:
claude mcp add date-times-mcp --scope project -- dotnet run ./.mcp-servers/date-times-mcp.cs -v q
Codex reads .codex/config.toml:
[mcp_servers.date-times-mcp]
command = "dotnet"
args = [
"run",
"./.mcp-servers/date-times-mcp.cs",
"-v",
"q",
]
startup_timeout_sec = 60
Codex loads a project config only from a trusted project, so your personal ~/.codex/config.toml
also needs [projects.''] with trust_level = "trusted". On Windows use the plain
C:\Users\... path, not the extended \\?\C:\... form — Codex silently ignores the project config
when the two don’t match. Don’t commit that trust entry, and don’t run codex mcp add for a project
install: it registers the server globally instead. Full steps at .
Commit .mcp-servers/date-times-mcp.cs and your client’s config, and everyone who clones the project
gets the server. The path is relative, so it works on every operating system.
The build adds no bin or obj directory to the project: a file-based app is not a project, so the
SDK caches the compiled output under your temp directory. .gitignore needs no new line.
-v q is required: standard output carries the JSON-RPC stream, and without it the build
output can reach that stream and break the connection.
Use --scope user with an absolute path instead to install a server for every project.
The full procedure, including the .NET 10 SDK prerequisite and the configuration shape for each client, is at . Every server also has its own page:
| Resource | URL |
|---|---|
| Catalog index for agents | |
| Catalog as JSON | |
| Claude Code setup | |
| Codex setup | |
| One server, for an agent | https://anymcp.net/servers//index.md |
| One server, raw C# | https://anymcp.net/servers//.cs |
Contributing
Want to add your MCP server to the catalog? See CONTRIBUTING.md for detailed instructions.
Adding New Servers
Create a .cs file in the mcp/ directory with YAML front matter in comments:
// ---
// id: my-server
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →