Skip to main content

Documentation Index

Fetch the complete documentation index at: https://redop.useagents.site/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use HTTP when your server should run as a network service.

Start the HTTP transport

import { Redop } from "@redopjs/redop";

new Redop({
  serverInfo: {
    name: "http-server",
    version: "0.1.0",
  },
})
  .tool("ping", {
    handler: () => ({ pong: true }),
  })
  .listen(3000);

What Redop serves

  • the MCP endpoint is http://localhost:3000/mcp
  • POST /mcp handles JSON-RPC requests
  • GET /mcp opens the event stream used for server notifications
  • DELETE /mcp closes the session

Verify with curl

Start by verifying that initialize responds:
curl -i -X POST http://localhost:3000/mcp \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"manual-check","version":"1.0.0"}}}'
Copy the Mcp-Session-Id response header from that first response. Use that session ID on follow-up HTTP requests:
curl -X POST http://localhost:3000/mcp \
  -H 'Content-Type: application/json' \
  -H 'MCP-Session-Id: your-session-id' \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Redop expects MCP-Session-Id on non-initialize HTTP requests.

Troubleshooting

Turn on transport logging:
.listen({
  port: 3000,
  debug: true,
})