mcpField
M
MCP REST

MCP REST

Local
github.com/ivanboringDeveloper Tools0Updated 81w ago

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

  1. 01Connects to an SSE server
  2. 02Checks connection status
  3. 03Lists available tools
  4. 04Calls tools with arguments
  5. 05Configurable server URL and port

Use cases

  1. 01Check whether an MCP server is reachable
  2. 02Inspect the tools exposed by an SSE server
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"rest": {
"command": "npx",
"args": [
"-y",
"mcp-rest"
]
}
}
}
Run commandnpx -y mcp-rest

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-rest

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP 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
OptionDescriptionDefault
-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 port3000
-d, --debugEnable debug loggingfalse
-h, --helpDisplay help
-V, --versionDisplay 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

EndpointMethodDescription
/statusGETCheck connection status
/toolsGETList all available tools
/tools/:toolIdPOSTCall 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:

  1. Use the --debug flag to see detailed logs
  2. Check the /status endpoint to verify connection status
  3. Ensure your MCP server/process is running and accessible

License

MIT

Comments

Markdown supported

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.