MCP协议服务器

一个简单的MCP(Model Context Protocol)服务器,提供友好的问候和工具。

  • by EduardoGHdez
  • Ruby
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 eduardoghdez/ryan-mcp

使用说明

瑞安🤖

一个简单的MCP(模型上下文协议)服务器,提供友好的问候和工具。

安装

全局安装(推荐)

将Ryan安装为全局命令,以便您可以在任何地方使用它:

# Clone and setup
git clone git@github.com:EduardoGHdez/ryan-mcp.git
cd ryan
./bin/setup

# Install globally using rake
rake install

现在你可以跑了 ryan 从您终端的任何地方! 🎉

手动安装

如果您更喜欢手动方法:

gem build ryan.gemspec
gem install ryan-1.0.0.gem

快速开始

  1. 在全球范围内安装Ryan (见上文安装部分)

  2. 测试其工作原理:

    ryan        # Starts the MCP server (Ctrl+C to stop)
    rake test   # Run tests (from project directory)
    

在游标中配置

将此添加到光标MCP设置中:

{
  "mcpServers": {
    "ryan": {
      "command": "ryan"
    }
  }
}

然后问Cursor: “嘿,瑞恩,你能问候爱丽丝吗?”

可用工具

你好_世界 -Ryan用个性化信息直呼某人的名字。

发展

管理安装

  • rake install -在全球范围内构建和安装gem
  • rake uninstall -移除ryan宝石
  • rake reinstall -卸载然后安装(非常适合开发)

测试

  • rake test -运行所有测试
  • rake test_unit -仅运行单元测试
  • rake test_integration -仅运行集成测试

添加新工具

  • 在中添加新工具 lib/ryan/tools/
  • 将它们注册到 lib/ryan/server.rb
  • 更改后,运行 rake reinstall 更新全局命令

项目结构

ryan/
├── bin/ryan              # Executable entry point
├── lib/
│   ├── ryan.rb          # Main library file
│   └── ryan/
│       ├── server.rb    # MCP server implementation
│       ├── version.rb   # Version definition
│       └── tools/       # Tool implementations
├── test/                # Test suite
├── ryan.gemspec        # Gem specification
└── Rakefile            # Build and install tasks

关于MCP

模型上下文协议(MCP)使像克劳德这样的人工智能助手能够与外部工具和数据源连接。Ryan实现了一个可以与任何兼容MCP的客户端一起使用的MCP服务器。

就是这样! 🚀