Action

v1.0.0Developer Toolsstable

Rails Engine with MCP compliant Spec.

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

What is Action?

Action 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 authentication and gateway
HTTP and JSON-RPC support
Language model integration
seuros

Maintainer

LicenseMIT
Languageruby
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx action

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

ActionMCP (the action gem) is a Rails Engine that transforms any Rails application into a production-ready MCP server, implementing the full Model Context Protocol specification including JSON-RPC 2.0 transport, session management, capability negotiation, and authentication. It allows Rails developers to expose their application's tools, prompts, and resources to AI agents and LLM clients without building a separate server, using familiar Rails conventions like generators, ActiveRecord, and middleware. It is the backend framework of choice for teams that want to add MCP capabilities to existing Rails services.

Prerequisites

  • Ruby 3.4.8 or later
  • Rails 8.1.1 or later
  • PostgreSQL, MySQL, or SQLite3 database
  • An MCP-compatible client that supports HTTP/SSE transport (STDIO is not supported)
  • Bundler for gem dependency management
1

Add actionmcp to your Gemfile

Add the gem and run bundle install. Then run the install generator to create migrations, base classes, and the MCP rack 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 server identity

Set your server name and version in config/application.rb. These values are advertised to MCP clients during the initial capability handshake.

# config/application.rb
config.action_mcp.name = "My App MCP Server"
config.action_mcp.version = "1.0.0"
config.action_mcp.logging_enabled = true
3

Add server instructions in config/mcp.yml

Define instructions that help LLMs understand the purpose of your server and how to interact with it. These are sent during session initialization.

# config/mcp.yml
shared:
  server_instructions:
    - "Use this server to manage project workflows and access business data"
  pagination_page_size: 10
4

Generate a tool

Use the Rails generator to scaffold a tool class. Implement the perform method to call your existing Rails models and services.

bin/rails generate action_mcp:tool SearchRecords

# app/mcp/tools/search_records_tool.rb
class SearchRecordsTool < ApplicationMCPTool
  tool_name "search_records"
  description "Search records by keyword"
  property :query, type: "string", required: true
  def perform
    records = Record.search(query).limit(10)
    render(text: records.to_json)
  end
end
5

Start the server

Launch the MCP server on a dedicated port. Use bin/mcp in development or Falcon in production for best performance.

# Development
bin/mcp

# Production with Falcon
bundle exec falcon serve --bind http://0.0.0.0:62770 --config mcp/config.ru
6

Connect an MCP client

Configure your MCP client to connect to the server URL. Pass the bearer token in the Authorization header if you have set up gateway authentication.

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

Action Examples

Client configuration

MCP client config for an ActionMCP server running over HTTP on port 62770.

{
  "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 through ActionMCP.

- "Search for all orders placed in the last 7 days"
- "Create a new support ticket with priority high for user [email protected]"
- "List the top 10 most viewed products this month"
- "Run the user activity report for the week of June 1st"

Troubleshooting Action

Middleware conflicts with Devise, Warden, or Rack::Cors causing 401 errors

Use the vanilla rack config to bypass conflicting middleware: bundle exec rails s -c mcp_vanilla.ru -p 62770. The install generator creates both mcp/config.ru and mcp_vanilla.ru for exactly this scenario.

MCP client cannot connect — 'STDIO transport not supported'

ActionMCP only supports HTTP/SSE network transport, not STDIO. Configure your client with a url key pointing to http://your-host:62770/mcp instead of a command/args configuration block.

Database errors during migration install

Ensure the database exists before running migrations: bin/rails db:create. Then run bin/rails action_mcp:install:migrations followed by bin/rails db:migrate. Confirm your database.yml has the correct credentials.

Frequently Asked Questions about Action

What is Action?

Action 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?

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

Which AI clients work with Action?

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

Is Action free to use?

Yes, Action 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": { "command": "npx", "args": ["-y", "action"] } } }

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

Read the full setup guide →

Ready to use Action?

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