About MCP REST
MCP REST wraps an MCP client in a REST API for testing MCP connections and tools. It connects to an SSE server and provides endpoints for checking status, listing tools, and calling them.
Key features
- 01Connects to an SSE server
- 02Checks connection status
- 03Lists available tools
- 04Calls tools with arguments
- 05Configurable server URL and port
Use cases
- 01Check whether an MCP server is reachable
- 02Inspect the tools exposed by an SSE server
- 03Test tool calls through HTTP requests
MCP support
It connects to an MCP server over SSE and exposes connection status and tool listing and calls through REST endpoints.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP REST
A REST API wrapper around the Model Context Protocol (MCP) client.
This is so you can play around with MCP without having to have a constant connection up and running.
Just for testing, not to use for real.
Installation
# Install globally
npm install -g mcp-rest
# Or use with npx
npx mcp-rest
Usage
npx mcp-rest [options]
Options
| Option | Description | Default |
|---|---|---|
-t, --type <type> | Connection type: "sse" | sse |
-u, --url <url> | SSE server URL (for sse type) | http://localhost:8000/sse |
-p, --port <port> | Express server port | 3000 |
-d, --debug | Enable debug logging | false |
-h, --help | Display help | |
-V, --version | Display version |
Examples
SSE Mode
# Connect to SSE server at default URL
npx mcp-rest
# Connect to custom SSE server and port
npx mcp-rest --type sse --url http://localhost:9000/sse --port 4000
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/status | GET | Check connection status |
/tools | GET | List all available tools |
/tools/:toolId | POST | Call a specific tool with arguments |
Example API Usage
# Get connection status
curl http://localhost:3000/status
# List all available tools
curl http://localhost:3000/tools
# Call a tool
curl -X POST http://localhost:3000/tools/exampleTool \
-H "Content-Type: application/json" \
-d '{"arguments": {"param1": "value1"}}'
Troubleshooting
If you encounter connection issues:
- Use the
--debugflag to see detailed logs - Check the
/statusendpoint to verify connection status - Ensure your MCP server/process is running and accessible
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.