ExMCP Test Server

ExMCP Test Server

在Elixir中实现的mcp server测试。

概述

ExMCP 是一个用 Elixir 实现的 MCP(模型上下文协议)测试服务器,用于实验和测试该协议。

安装与启动

前提条件

  • Elixir 1.14+
  • Mix

安装依赖

mix deps.get

本地运行

mix run --no-halt

部署与配置

创建发行版

mix release

配置 Claude Desktop

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "ex-mcp-test": {
      "command": "path/to/your/release/bin/my_app",
      "args": [
        "start"
      ]
    }
  }
}

开发

运行测试

mix test

支持的 MCP 方法

  • initialize - 初始化服务器
  • notifications/initialized - 处理初始化通知
  • prompts/list - 列出可用提示
  • resources/list - 列出可用资源
  • tools/list - 列出可用工具
  • tools/call - 调用特定工具

文档

  • OpenRPC 规范位于 priv/static/mcp-openrpc.json
  • 遵循 MIT 许可证