rig
Rig MCP Server Example (April 7, 2025)
claude mcp add --transport stdio rggh-rig-mcp-server cargo run
How to use
This MCP server demonstrates a Rust-based MCP implementation that exposes a Server-Sent Events (SSE) transport for communication between an MCP server and client, along with an example Add tool that sums two numbers. The project integrates with the RIG agent to prompt an OpenAI model using the tool, illustrating end-to-end tool invocation and response generation within an MCP ecosystem. To use it, first run the server with cargo run and then connect an MCP inspector via SSE to observe and interact with the available tools. The example also shows how a client initializes, lists registered tools, and invokes the Add tool from the RIG-enabled prompt flow.
Once the server is running, you can start the inspector in a separate terminal using the provided command. The inspector connects to the SSE transport and exposes a web UI at the inspector URL, allowing you to view the registered tools, send prompts to the RIG agent, and observe the resulting tool calls and responses. This setup provides a practical workflow for testing MCP tooling in a Rust-based server environment with a web-based inspector.
How to install
Prerequisites:
- Rust toolchain (rustup and cargo)
- Node.js and npm for the MCP Inspector
- Optional: Git to clone the repository
Step-by-step installation:
-
Clone the repository: git clone https://github.com/RGGH/rig-mcp-server.git cd rig-mcp-server
-
Install Rust dependencies and build/runs the server: cargo build --release cargo run
-
Install the MCP Inspector (Node.js): npm i -g @modelcontextprotocol/inspector
-
Start the inspector for SSE transport (in a new terminal): npx @modelcontextprotocol/inspector sse http://127.0.0.1:3001/sse
-
Verify the inspector UI is accessible at the address shown in the console (commonly http://localhost:5173).
Notes:
- Ensure no port conflicts with the default MCP server ports (the example logs show port 3000 for the proxy and 5173 for the inspector UI).
- You may need to adjust network/firewall settings to allow local connections between the server, the proxy, and the inspector.
Additional notes
Tips and common issues:
- If cargo run fails due to missing crates, run cargo update to refresh dependencies.
- Ensure the SSE endpoint URL used by the inspector matches the server's actual transport URL (e.g., http://127.0.0.1:3001/sse).
- The Add tool is registered as a simple numeric operation; verify the tool signature in the code and the inspector UI to ensure proper parameter names (a and b).
- When integrating with RIG, ensure your OpenAI API keys or equivalent credentials are configured in the environment variables or configuration as required by the agent setup.
- If the inspector UI cannot connect, check that Node.js and npm versions are compatible with @modelcontextprotocol/inspector and that there are no port-blocking firewall rules.
Related MCP Servers
rust -schema
A type-safe implementation of the official Model Context Protocol (MCP) schema in Rust.
turbovault
MCP server that transforms your Obsidian vault into an intelligent knowledge system
tsrs
tushare rust mcp server
mcp-loxone
An opinionated Model Context Protocol (MCP) server for controlling Loxone home automation systems.
ultrafast
High-performance, ergonomic Model Context Protocol (MCP) implementation in Rust
firecrawl -zed
Firecrawl MCP Server for Zed