scout_apm_mcp.rb
Ruby gem providing ScoutAPM API client and MCP (Model Context Protocol) server tools for fetching traces, endpoints, metrics, errors, and insights. Integrates with MCP-compatible clients like Cursor IDE, Claude Desktop, and other MCP-enabled tools.
claude mcp add --transport stdio amkisko-scout_apm_mcp.rb gem exec scout_apm_mcp \ --env RUBY_VERSION="3.4.7" \ --env OP_ENV_ENTRY_PATH="op://Vault Name/Item Name"
How to use
This MCP server provides a Ruby-based ScoutAPM API client wrapped as an MCP server. It exposes tools to fetch traces, endpoints, metrics, errors, and insights from ScoutAPM via the MCP protocol, enabling MCP-enabled clients (like Cursor IDE or Claude Desktop) to interact with ScoutAPM data. The server runs as a Ruby gem and authenticates using API keys sourced from environment variables or 1Password integration (via opdotenv) and, optionally, the 1Password CLI. To use it, configure the MCP client to point at the server and provide credentials through OP_ENV_ENTRY_PATH or environment variables. You can test and inspect its behavior with MCP Inspector before connecting real clients. The server communicates over STDIN/STDOUT, so it can be proxied by the MCP inspector and integrated into your development workflow.
How to install
Prerequisites:
- Ruby 3.1 or higher
- RubyGems (bundler is optional but recommended)
Step-by-step installation:
- Install the ScoutAPM MCP gem:
gem install scout_apm_mcp
- If you use Bundler in a project, you can run the MCP server via Bundler:
bundle exec scout_apm_mcp
- Or install and run the server globally:
gem install scout_apm_mcp
scout_apm_mcp
- Ensure your MCP client configuration points to the server command (see mcp_config for example) and that credentials are available either via OP_ENV_ENTRY_PATH or environment variables like API keys.
- Optional: upgrade to the latest version when needed:
gem update scout_apm_mcp
Additional notes
Tips and common issues:
- Do not store API keys directly in MCP configuration files. Prefer OP_ENV_ENTRY_PATH (1Password integration) or environment variables (API_KEY/SCOUT_APM_API_KEY). The MCP gem will fetch credentials from these sources automatically.
- If you use a Ruby version manager (e.g., mise or rbenv), set RUBY_VERSION to match your environment to ensure the correct Ruby is used when invoking gem exec.
- The MCP server communicates via STDIN/STDOUT. When testing with MCP Inspector, you can verify available tools and their parameters before integrating with clients.
- As of v0.1.3, client methods return extracted data (arrays/hashes) rather than full API response structures. This is a breaking change from earlier versions.
- For Cursor IDE or Claude Desktop, ensure the MCP configuration is loaded and restart the client after changes.
- If you encounter permission or PATH issues running gem exec, ensure your shell can locate the Ruby environment and the gem executable.
- Use the MCP Inspector tool to validate the server's capabilities and view request/response messages during development.
Related MCP Servers
apify
The Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automation tools available on the Apify Store.
wanaku
Wanaku MCP Router
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
mcp_rails_template
A minimal Rails API template for creating MCP (Model Context Protocol) servers with robust tool execution capabilities and examples.
cco
Real-time audit and approval system for Claude Code tool calls.
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools