Action MCP Example 🚀
@seuros
关于 Action MCP Example 🚀
A minimal Rails API template for creating MCP (Model Context Protocol) servers with robust tool execution capabilities and examples.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp_rails_template": {
"command": "npx",
"args": [
"@modelcontextprotocol/inspector",
"--url",
"http://localhost:8080/mcp"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Action MCP Example 🚀?
A simple Ruby on Rails application demonstrating how to integrate and use the ActionMCP gem. It is intended for developers who want to see how to define MCP components (prompts, resource templates, tools) within a Rails project.
How to use Action MCP Example 🚀?
Clone the repository, run bin/setup, copy .env.example to .env and fill in required values (e.g., API keys). Set up PostgreSQL (e.g., via make up for Docker on port 5466), then start the Rails server with bin/rails s. The ActionMCP server runs on port 62770, proxied by Nginx at /mcp. You can test interactively using the MCP Inspector: npx @modelcontextprotocol/inspector --url http://localhost:8080/mcp.
Key features of Action MCP Example 🚀
- JWT‑based authentication with predefined test users
- Adventure story prompt generator
- Gemfile dependency resource template (JSON over
gemfile://{environment}) - Weather forecast tool via Open‑Meteo API
- RuboCop style analysis tool for Ruby snippets
- Dependency info tool (production, test, runtime)
- Ruby code static analysis tool (classes, modules, methods)
Use cases of Action MCP Example 🚀
- Generate a short narrative adventure story from a hero name and genre
- Fetch weather data for given latitude/longitude coordinates
- Analyze a Ruby code snippet for style offenses using RuboCop
- Retrieve project dependencies (Gemfile) as structured JSON
- Index and query Ruby source files for classes, modules, and methods
FAQ from Action MCP Example 🚀
What are the runtime requirements?
Ruby (see .ruby-version) and PostgreSQL (or Docker for a temporary instance). The ActionMCP gem is sourced from https://github.com/seuros/mcp.
How does authentication work?
JWT tokens are used. Test users (e.g., [email protected] / password123) are loaded from fixtures. Tokens can be generated in the Rails console. A pre‑configured .mcp.json file with a long‑lived token is provided.
Where does the MCP server run?
The ActionMCP server runs as a standalone server on port 62770 (via mcp.ru). Nginx proxies /mcp requests to this server.
What MCP components are included?
Prompts: epic_adventure_prompt.rb. Resource Templates: gemfile_template.rb. Tools: dependency_info_tool.rb, fetch_weather_by_location_tool.rb, rubocop_tool.rb, ruby_code_analyzer_tool.rb.
How can I test the MCP server interactively?
Use the MCP Inspector: npx @modelcontextprotocol/inspector --url http://localhost:8080/mcp. Make sure Docker is running (docker compose up) before executing the inspector command.
开发工具 分类下的更多 MCP 服务器
test
cloudwegoThe ultimate LLM/AI application development framework in Go.
Burp Suite MCP Server Extension
PortSwiggerMCP Server for Burp
test
prysmaticlabsGo implementation of Ethereum proof of stake
Golf
golf-mcpProduction-Ready MCP Server Framework • Build, deploy & scale secure AI agent infrastructure • Includes Auth, Observability, Debugger, Telemetry & Runtime • Run real-world MCPs powering AI Agents
mcp-excalidraw
yctimlinMCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.
评论