能力标签
MCP工具
🔌
MCP工具

MCP工具

基于 Ruby · 让 AI 助手直接操作你的系统与工具
英文名:action_mcp
⭐ 115 Stars 🍴 20 Forks 💻 Ruby 📄 MIT 🏷 AI 7.5分
7.5AI 综合评分
mcpaiauthenticationclaudegatewaygemruby
✦ AI Skill Hub 推荐

AI Skill Hub 推荐使用:MCP工具 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。

📚 深度解析

MCP工具 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 MCP工具,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。MCP工具 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 MCP工具 评为 AI 评分 7.5 分,属于同类工具中的优质选择。

📋 工具概览

MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 115
开发语言
Ruby
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
20

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/seuros/action_mcp

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "mcp--": {
      "command": "npx",
      "args": ["-y", "action_mcp"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 MCP工具 执行以下任务...
Claude: [自动调用 MCP工具 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "mcp__": {
      "command": "npx",
      "args": ["-y", "action_mcp"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 66/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

ActionMCP

ActionMCP is a Ruby gem focused on providing Model Context Protocol (MCP) capability to Ruby on Rails applications, specifically as a server.

ActionMCP is designed for production Rails environments and does not support STDIO transport. STDIO is not included because it is not production-ready and is only suitable for desktop or script-based use cases. Instead, ActionMCP is built for robust, network-based deployments.

The client functionality in ActionMCP is intended to connect to remote MCP servers, not to local processes via STDIO.

It offers base classes and helpers for creating MCP applications, making it easier to integrate your Ruby/Rails application with the MCP standard.

With ActionMCP, you can focus on your app's logic while it handles the boilerplate for MCP compliance.

Introduction

Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to large language models (LLMs).

Think of it as a universal interface for connecting AI assistants to external data sources and tools.

MCP allows AI systems to plug into various resources in a consistent, secure way, enabling two-way integration between your data and AI-powered applications.

This means an AI (like an LLM) can request information or actions from your application through a well-defined protocol, and your app can provide context or perform tasks for the AI in return.

ActionMCP is targeted at developers building MCP-enabled Rails applications. It simplifies the process of integrating Ruby and Rails apps with the MCP standard by providing a set of base classes and an easy-to-use server interface.

Show detailed information about a specific profile

bin/rails action_mcp:show_profile[admin]

Requirements

  • Ruby: 3.4.8+ or 4.0.0+
  • Rails: 8.1.1+
  • Database: PostgreSQL, MySQL, or SQLite3

ActionMCP is tested against Ruby 3.4.8 and 4.0.0 with Rails 8.1.1+.

Install dependencies

bundle install

IMPORTANT: Use ActionMCP.server — it initializes required subsystems.

Installation

To start using ActionMCP, add it to your project:

```bash

Getting Started & Setup

Installing ActionMCP

ActionMCP includes generators to help you set up your project quickly. The install generator creates all necessary base classes and configuration files:

```bash

Install ActionMCP with base classes and configuration

bin/rails generate action_mcp:install ```

This will create: - app/mcp/prompts/application_mcp_prompt.rb - Base prompt class - app/mcp/tools/application_mcp_tool.rb - Base tool class - app/mcp/resource_templates/application_mcp_res_template.rb - Base resource template class - app/mcp/application_gateway.rb - Gateway for authentication - config/mcp.yml - Configuration file with example settings for all environments - mcp/config.ru - Standalone Rack server configuration - bin/mcp - Server binstub (prefers Falcon, falls back to Puma)

Note: Authentication and authorization are not included. You are responsible for securing the endpoint.

Production Deployment of MCPS0

In production, MCPS0 (the MCP server) is a standard Rack application. You can run it using any Rack-compatible server (such as Puma, Unicorn, or Passenger).

For best performance and concurrency, it is highly recommended to use a modern, synchronous server like Falcon. Falcon is optimized for streaming and concurrent workloads, making it ideal for MCP servers. You can still use Puma, Unicorn, or Passenger, but Falcon will generally provide superior throughput and responsiveness for real-time and streaming use cases.

You have several main options for exposing the server:

Deployment

  • Use Falcon for optimal performance with streaming workloads
  • Deploy on dedicated ports or Unix sockets
  • Use reverse proxies (Nginx, Apache) for SSL termination
  • Implement health checks for your MCP endpoints
  • Use mcp_vanilla.ru to avoid middleware conflicts

Use Cases

Profiles are particularly useful for:

  1. Multi-tenant applications: Use different profiles for different customer tiers with Dorp or other gems
  2. Access control: Create profiles for different user roles (admin, staff, public)
  3. Performance optimization: Use a minimal profile for high-traffic endpoints
  4. Testing environments: Use specific test profiles in your test environment
  5. Progressive enhancement: Start with a minimal profile and gradually add capabilities

By leveraging profiles, you can maintain a single ActionMCP codebase while providing tailored MCP capabilities for different contexts.

Client Usage

ActionMCP includes a client for connecting to remote MCP servers. The client handles session management, protocol negotiation, and provides a simple API for interacting with MCP servers.

For comprehensive client documentation, including examples, session management, transport configuration, and API usage, see CLIENTUSAGE.md.

Generate base classes and configuration

bin/rails generate action_mcp:install

Advanced Configuration

Configuration

ActionMCP is configured via config.action_mcp in your Rails application.

By default, the name is set to your application's name and the version defaults to "0.0.1" unless your app has a version file.

You can override these settings in your configuration (e.g., in config/application.rb):

module Tron
  class Application < Rails::Application
    config.action_mcp.name = "Friendly MCP (Master Control Program)"  # defaults to Rails.application.name
    config.action_mcp.version = "1.2.3"                               # defaults to "0.0.1"
    config.action_mcp.logging_enabled = true                          # defaults to true
    config.action_mcp.logging_level = :info                           # defaults to :info, can be :debug, :info, :warn, :error, :fatal

    # Server instructions - helps LLMs understand the server's purpose
    config.action_mcp.server_instructions = [
      "Use this server to access and control Tron system programs",
      "Helpful for managing system processes and user data"
    ]
  end
end

For dynamic versioning, consider adding the rails_app_version gem.

Configuration

You can configure the session store type in your Rails configuration or config/mcp.yml:

```ruby

config/application.rb or environment files

Rails.application.configure do config.action_mcp.session_store_type = :active_record # or :volatile end


Or in `config/mcp.yml`:
yaml

The session store is automatically selected based on configuration

Thread Pool Configuration

You can configure the thread pool in your config/mcp.yml:

production:
  # Thread pool configuration
  min_threads: 10    # Minimum number of threads to keep in the pool
  max_threads: 20    # Maximum number of threads the pool can grow to
  max_queue: 500     # Maximum number of tasks that can be queued

The thread pool will automatically: - Start with min_threads threads - Scale up to max_threads as needed - Queue tasks up to max_queue limit - Use caller's thread if queue is full (fallback policy)

1. Create `mcp/config.ru`

The install generator (rails generate action_mcp:install) creates this automatically. If you need to create it manually:

```ruby

Load the full Rails environment to access models, DB, Redis, etc.

require_relative "../config/environment"

$stdout.sync = true

Show configuration and statistics

bundle exec rails action_mcp:info bundle exec rails action_mcp:stats

Show profile configuration

bundle exec rails action_mcp:show_profile[profile_name] ```

Configuring Profiles

Profiles are configured via a config/mcp.yml file in your Rails application. If this file doesn't exist, ActionMCP will use default settings from the gem.

Example configuration:

default:
  tools:
    - all  # Include all tools
  prompts:
    - all  # Include all prompts
  resources:
    - all  # Include all resources
  options:
    list_changed: false
    logging_enabled: true
    logging_level: info
    resources_subscribe: false

api_only:
  tools:
    - calculator
    - weather
  prompts: []  # No prompts for API
  resources:
    - user_profile
  options:
    list_changed: false
    logging_level: warn

admin:
  tools:
    - all
  options:
    logging_level: debug
    list_changed: true
    resources_subscribe: true

Each profile can specify: - tools: Array of tool names to include (use all to include all tools) - prompts: Array of prompt names to include (use all to include all prompts) - resources: Array of resource names to include (use all to include all resources) - options: Additional configuration options: - list_changed: Whether to send change notifications - logging_enabled: Whether to enable logging - logging_level: The logging level to use - resources_subscribe: Whether to enable resource subscriptions

List all available profiles with their configurations

bin/rails action_mcp:list_profiles

Core Components

ActionMCP provides three core abstractions to streamline MCP server development:

Component Development

  • 📋 TOOLS.MD - Complete guide to developing MCP tools
  • Generator usage and best practices
  • Property definitions, validation, and consent management
  • Output schemas for structured responses
  • Error handling, testing, and security considerations
  • Advanced features like additional properties and authentication context
  • 📝 PROMPTS.MD - Prompt template development guide
  • Creating reusable prompt templates
  • Multi-step conversations and mixed content types
  • Argument validation and prompt chaining
  • 🔗 RESOURCE_TEMPLATES.md - Resource template implementation
  • URI template patterns and parameter extraction
  • Dynamic resource resolution and collections
  • Callbacks and validation patterns

Client & Integration

  • 🔌 CLIENTUSAGE.MD - Complete client implementation guide
  • Session management and resumability
  • Transport configuration and connection handling
  • Tool, prompt, and resource collections
  • Production deployment patterns
  • 🔐 GATEWAY.md - Authentication gateway guide
  • Implementing ApplicationGateway
  • Identifier handling via ActionMCP::Current
  • Auth patterns, error handling, and hardening tips

Accessing Current User in Components

Once authenticated, the current user (and other identifiers) are available in your tools, prompts, and resource templates:

class MyTool < ApplicationMCPTool
  def perform
    # Access the authenticated user
    if current_user
      render text: "Hello, #{current_user.name}!"
    else
      render text: "Hi Stranger! It's been a while "
    end
  end
end

List all MCP components

bundle exec rails action_mcp:list

List specific component types

bundle exec rails action_mcp:list_tools bundle exec rails action_mcp:list_prompts bundle exec rails action_mcp:list_resources bundle exec rails action_mcp:list_profiles

Troubleshooting & Production

💡 Pro Tip: Start with the component-specific guides (TOOLS.MD, PROMPTS.MD, RESOURCE_TEMPLATES.md) for hands-on development, then reference the Hitchhiker's Guide for protocol details and CLIENTUSAGE.MD for integration patterns.

Error Handling and Troubleshooting

ActionMCP provides comprehensive error handling following the JSON-RPC 2.0 specification:

🎯 aiskill88 AI 点评 A 级 2026-05-28

高质量的MCP工具,支持多种功能

⚡ 核心功能

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

参考项目文档和示例代码
💡 AI Skill Hub 点评

总体来看,MCP工具 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 MCP工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 action_mcp
原始描述 开源MCP工具:Rails Engine with MCP compliant Spec.。⭐115 · Ruby
Topics mcpaiauthenticationclaudegatewaygemruby
GitHub https://github.com/seuros/action_mcp
License MIT
语言 Ruby
🔗 原始来源
🐙 GitHub 仓库  https://github.com/seuros/action_mcp

收录时间:2026-05-28 · 更新时间:2026-05-28 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。