Skip to main content
Glama
MCP Server Playground
by psaboia

MCP 服务器游乐场

铁匠徽章

此代码库是一个使用 TypeScript 构建 MCP 服务器的实验平台。它是构建 MCP 服务器教程和视频的个性化版本,旨在作为学习资源和测试与 Calude Desktop 和 Cursor IDE 集成的平台。

背景

该项目基于以下材料:

原始教程提供了基础,我对其进行了扩展。除了教程中的示例之外,我还计划添加其他工具和功能,以将这段代码发展成为一个强大的 MCP 服务器实验平台。

Related MCP server: mcp-boilerplate

特征

  • **基于 TypeScript 的服务器:**利用 TypeScript 实现更好的结构和错误检查。

  • **模块化设计:**易于通过新命令、功能和集成进行扩展。

  • **集成就绪:**设计用于与 Calude Desktop 和 Cursor IDE 配合使用,以改善开发体验。

  • **可扩展的游乐场:**一个沙盒环境,用于试验教程示例之外的其他工具和修改。

入门

先决条件

  • Node.js(v12 或更高版本)

  • npm(或 Yarn,根据您的偏好)

  • TypeScript(如果未全局安装)

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 MCP Server Playground:

npx -y @smithery/cli install mcp-server-playground --client claude

安装

  1. 克隆存储库:

    git clone <repo_url>
    cd mcp-server-playground
  2. 安装依赖项:

    npm install
  3. 构建项目:

    npm run build

配置

该项目使用环境变量。请创建一个.env文件来设置您的配置选项。如果以后提供了示例文件 ( .env.example ),请将其用作模板。

发展

  • IDE 集成:

    • 设计用于与 Cursor IDE 和 Calude Desktop 顺利协作。

    • 利用这些 IDE 支持的内置工具和扩展来最大限度地提高生产力。

  • 扩展项目:

    • 随意添加新命令、集成或修改现有功能。

    • 服务器的模块化结构使得插入附加工具和功能变得容易。

项目结构

mcp-server-playground/
├── src/                # Source code directory
│   └── index.ts       # Main server implementation
├── build/             # Compiled JavaScript files
├── package.json       # Project dependencies and scripts
├── tsconfig.json     # TypeScript configuration
└── README.md         # Project documentation

可用脚本

  • npm run build - 编译 TypeScript 代码并设置适当的权限

  • npm run prepare运行构建脚本(对 git hooks 有用)

  • npm run watch - 监视 TypeScript 文件中的更改

  • npm run inspector - 运行 MCP 检查器工具

贡献

欢迎贡献!如果您有任何建议、改进或新的集成,请 fork 此代码库并创建包含您更改的拉取请求 (PR)。

参考

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

笔记

本项目是一个沙盒环境,旨在测试 MCP 服务器的各种适配和集成。随着新工具和新理念的开发,我们将进行更新和扩展。

路线图

  • [ ] 实现教程示例之外的其他工具集成

  • [ ] 为每个工具添加全面的文档

  • [ ] 创建与 Calude Desktop 的示例集成

  • [ ] 开发用于 Cursor IDE 集成的自定义工具

  • [ ] 添加测试框架和示例

Available Tools

2 tools
calculate_sumB

Add two numbers together

Inputs: a (required), b (required).

httpbin_jsonC

Returns data about slide show

Inputs: a.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.5/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: calculate_sum performs a mathematical addition operation, while httpbin_json returns data about a slide show. There is no overlap or ambiguity between these functions, making it easy for an agent to select the correct tool.

    Naming Consistency3/5

    The naming is mixed: calculate_sum uses a verb_noun pattern, but httpbin_json is more of a noun-based name with a prefix. While both are readable, they don't follow a consistent convention, which could cause minor confusion in a larger set.

    Tool Count2/5

    With only 2 tools, this server feels thin and under-scoped for a 'Playground' purpose, which typically implies a broader set of utilities. The tools are too few to meaningfully explore or test MCP capabilities, suggesting an incomplete implementation.

    Completeness1/5

    The tool surface is severely incomplete for a 'Playground' domain, which should offer diverse functionalities. There are obvious gaps, such as missing basic operations like subtraction, multiplication, or other HTTP-related tools, making it inadequate for comprehensive agent workflows.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A TypeScript-based server project that can be integrated with Cursor IDE as an MCP (Model Control Protocol) server, enabling enhanced development capabilities.
      133
      ISC
    • A
      license
      A
      quality
      A
      maintenance
      Production-ready template for building MCP servers with TypeScript, featuring example tools and resources, and Claude Desktop integration.
      1
      10 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A TypeScript template for building MCP servers, enabling developers to create custom tools for AI assistants like Claude.
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      A TypeScript MCP server boilerplate with example tools (calculator, greet) and resources (system info), ready for extension and integration with Cursor.
      ISC