Action
Rails Engine with MCP compliant Spec.
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
Maintainer
Works with
Installation
Manual Installation
npx actionConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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:migrateConfigure 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 = trueAdd 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: 10Generate 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
endStart 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.ruConnect 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.
Action Alternatives — Similar Developer Tools Servers
Looking for alternatives to Action? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Action in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.