Action MCP

v1.0.0Developer Toolsstable

Rails Engine with MCP compliant Spec.

aiauthenticationclaudegatewaygem
Share:
113
Stars
0
Downloads
0
Weekly
0/5

What is Action MCP?

Action MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to rails engine with mcp compliant spec.

Rails Engine with MCP compliant Spec.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Rails Engine with MCP compliant Spec.

Use Cases

Rails engine integration
Authentication gateway
MCP-compliant specification
seuros

Maintainer

LicenseMIT
Languageruby
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx action-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Action MCP

ActionMCP is a Ruby gem that turns any Rails application into a fully MCP-compliant server without requiring a separate process. It ships as a Rails Engine that adds tools, prompts, and resources to your existing app, handling JSON-RPC 2.0 transport, session management, and authentication out of the box. Teams building Rails-backed services use it to expose their application's business logic directly to AI agents and LLM clients via the Model Context Protocol.

Prerequisites

  • Ruby 3.4.8 or later (Rails 8.1.1+ required)
  • An existing Rails application with PostgreSQL, MySQL, or SQLite3
  • Bundler for gem management
  • An MCP-compatible client that supports HTTP/SSE transport (STDIO transport is not supported by ActionMCP)
1

Add the gem to your Rails app

Add actionmcp to your Gemfile and run bundle install. Then install the required database migrations and run the generator to scaffold the base configuration files.

bundle add actionmcp
bundle install
bin/rails action_mcp:install:migrations
bin/rails generate action_mcp:install
bin/rails db:migrate
2

Configure the MCP server identity

Set your server name, version, and logging preferences in config/application.rb. These values are returned during capability negotiation with MCP clients.

# config/application.rb
config.action_mcp.name = "My Rails MCP Server"
config.action_mcp.version = "1.0.0"
config.action_mcp.logging_enabled = true
config.action_mcp.logging_level = :info
3

Generate and implement a tool

Use the Rails generator to scaffold a new MCP tool, then implement the perform method with your business logic. Tools are the primary way AI clients invoke actions in your app.

bin/rails generate action_mcp:tool SearchProducts

# app/mcp/tools/search_products_tool.rb
class SearchProductsTool < ApplicationMCPTool
  tool_name "search_products"
  description "Search the product catalog by keyword"
  property :query, type: "string", required: true
  def perform
    results = Product.search(query)
    render(text: results.map(&:name).join(", "))
  end
end
4

Set up authentication

Create a Gateway class to authenticate incoming MCP requests. The gateway extracts a bearer token from the request, resolves the user, and makes it available inside tools via current_user.

# app/mcp/application_gateway.rb
class ApplicationGateway < ActionMCP::Gateway
  identified_by :user
  def authenticate!
    token = extract_bearer_token
    user = User.find_by(api_token: token)
    raise ActionMCP::Unauthorized unless user
    { user: user }
  end
end
5

Start the MCP server

Run the MCP server on a dedicated port. In development the bin/mcp script uses Falcon if available, falling back to Puma. In production use Falcon for best performance.

# Development
bin/mcp

# Or explicitly with Puma on port 62770
bundle exec rails s -c mcp/config.ru -p 62770
6

Configure an MCP client to connect

Point your MCP client at the running server URL. ActionMCP uses HTTP/SSE transport, so use the url field rather than a command/args block.

{
  "mcpServers": {
    "my-rails-app": {
      "url": "http://localhost:62770/mcp",
      "headers": {
        "Authorization": "Bearer your-api-token"
      }
    }
  }
}

Action MCP Examples

Client configuration

MCP client config connecting to an ActionMCP server over HTTP with bearer token authentication.

{
  "mcpServers": {
    "my-rails-app": {
      "url": "http://localhost:62770/mcp",
      "headers": {
        "Authorization": "Bearer your-api-token"
      }
    }
  }
}

Prompts to try

Example prompts once your Rails tools are exposed via ActionMCP.

- "Search the product catalog for wireless keyboards"
- "Create a new order for user ID 42 with product IDs [1, 5, 9]"
- "What are the top 5 most recent support tickets?"
- "Run the monthly sales report for March 2025"

Troubleshooting Action MCP

Middleware conflicts causing 401 or session errors with Devise or Warden

Use the mcp_vanilla.ru rack config instead of the default: bundle exec rails s -c mcp_vanilla.ru -p 62770. This bypasses conflicting middleware stacks from Devise, Ahoy, Rack::Cors, and similar gems.

STDIO transport connection attempts fail immediately

ActionMCP does not support STDIO transport — it is designed for network deployments using HTTP/SSE. Configure your MCP client to connect via URL (http://localhost:62770/mcp) rather than a command/args invocation.

Database migration errors during install

Ensure your database is created and accessible before running migrations: bin/rails db:create then bin/rails action_mcp:install:migrations && bin/rails db:migrate. Check that your database.yml credentials are correct.

Frequently Asked Questions about Action MCP

What is Action MCP?

Action MCP is a Model Context Protocol (MCP) server that rails engine with mcp compliant spec. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Action MCP?

Follow the installation instructions on the Action MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Action MCP?

Action MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Action MCP free to use?

Yes, Action MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "action-mcp": { "command": "npx", "args": ["-y", "action-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Action MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides