MCP Catalogs
首页

MCPSharp vs time

并排对比,帮你在这两个 MCP server 之间做选择。

MCPSharp
by afrise
time
by modelcontextprotocol
Stars★ 369★ 85,748
30天用量
综合分4777
官方
分类
开发者工具AI / LLM 工具
效率工具开发者工具沟通协作
实现语言C#TypeScript
最近提交7 个月前本月

MCPSharp · 概述

MCPSharp 是一个用于构建 MCP 服务器和客户端的 .NET 库。

time · 概述

功能全面的 MCP 服务器,提供时间和时区转换功能,可自动检测系统时区。

MCPSharp · 使用场景

  • 为 Claude Desktop 等 AI 助手构建兼容 MCP 的 API
  • 将现有 .NET 代码作为 MCP 端点暴露,只需最少的配置
  • 与 Microsoft.Extensions.AI 和 Semantic Kernel 生态系统集成

time · 使用场景

  • 协助安排跨时区的国际会议
  • 为基于位置的查询提供实时时间信息
  • 为旅行计划和行程安排提供时间转换

MCPSharp · 安装

安装

dotnet add package MCPSharp

快速开始

using MCPSharp;

public class Calculator
{
    [McpTool("add", "Adds two numbers")]
    public static int Add([McpParameter(true)] int a, [McpParameter(true)] int b)
    {
        return a + b;
    }
}

await MCPServer.StartAsync("CalculatorServer", "1.0.0");

Claude Desktop 配置

添加到 claude_desktop_config.json

{
  "mcpServers": {
    "mcpsharp-example": {
      "command": "dotnet",
      "args": ["run", "--project", "/path/to/your/project.csproj"],
      "env": {}
    }
  }
}

time · 安装

安装选项

**使用 uv(推荐):**

uvx mcp-server-time

**使用 PIP:**

pip install mcp-server-time
python -m mcp_server_time

**为 Claude Desktop 配置:**

{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time"]
    }
  }
}
对比内容由 README + GitHub 公开数据自动生成,定期更新。