Back to MCP directory
publicPublicdnsLocal runtime

pythonpete32_mcp-server-template

一个基于TypeScript的MCP服务器,提供与EVM链交互的功能,实现了简单的笔记系统,包含资源管理、笔记创建和摘要生成功能。

article

README

🚀 evm-server MCP 服务器

这是一个基于 TypeScript 的 MCP 服务器,实现了简单的笔记系统。它借助 note:// URI 对笔记资源进行管理,还提供创建笔记与生成摘要的功能,清晰演示了核心 MCP 概念。

🚀 快速开始

开发步骤

  • 安装依赖
npm install
  • 构建服务器
npm run build
  • 带有自动重建功能的开发
npm run watch

安装步骤

要在 Claude Desktop 上使用,请在配置文件中添加以下内容:

  • MacOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows%APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "evm-server": {
      "command": "/path/to/evm-server/build/index.js"
    }
  }
}

调试说明

由于 MCP 服务器通过标准输入输出进行通信,调试可能会比较困难。我们推荐使用 MCP Inspector,它可以通过包脚本运行:

npm run inspector

Inspector 会提供一个可以在浏览器中访问的调试工具 URL。

✨ 主要特性

资源管理

  • 通过 note:// URI 列出和访问笔记。
  • 每个笔记都有标题、内容和元数据。
  • 使用 plain text MIME 类型提供简单的内容访问。

工具功能

  • create_note:创建新的文本笔记。
    • 需要传递标题和内容两个参数。
    • 将笔记存储在服务器状态中。

提示功能

  • summarize_notes:生成所有存储笔记的摘要。
    • 包括所有笔记内容作为嵌入资源。
    • 返回结构化的提示以供 LLM 进行总结。

📦 安装指南

要在 Claude Desktop 上使用该服务器,需在对应系统的配置文件中添加指定配置内容:

  • MacOS:在 ~/Library/Application Support/Claude/claude_desktop_config.json 里添加配置。
  • Windows:在 %APPDATA%/Claude/claude_desktop_config.json 中添加配置。
{
  "mcpServers": {
    "evm-server": {
      "command": "/path/to/evm-server/build/index.js"
    }
  }
}

💻 使用示例

基础用法

在开发过程中,我们可以按以下步骤进行操作:

  • 安装依赖:
npm install
  • 构建服务器:
npm run build
  • 开启带有自动重建功能的开发模式:
npm run watch

高级用法

调试操作

当需要调试 MCP 服务器时,由于其通过标准输入输出进行通信,调试可能较困难。此时可使用 MCP Inspector,通过以下命令运行:

npm run inspector

Inspector 会提供一个可在浏览器中访问的调试工具 URL,方便进行调试。

📚 详细文档

待办事项

  • [ ] 导入依赖项
  • [ ] 添加 evm 工具
  • [ ] 检查 inspectors 中的调试信息
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client