Skip to content

MCP setup

Connect your agent to RiskReward.

Use the hosted Streamable HTTP endpoint. No RiskReward account, API key, or local server process is required.

Remote MCP endpoint
https://riskreward.pro/mcp

Transport: Streamable HTTP. Authentication: none. The server offers three read-only calculation tools and a methodology resource. Enable it in your client and review its tool list. Your client’s trust prompts and organization policies still apply.

Claude Code

Terminal
claude mcp add --transport http riskreward https://riskreward.pro/mcp

Inspect the connection with claude mcp list. See the official Claude Code MCP guide for installation scopes and managed policies.

Codex

Terminal
codex mcp add riskreward --url https://riskreward.pro/mcp

Inspect the connection with codex mcp list. The equivalent config is available as a TOML snippet.

VS Code

Add this server to the existing .vscode/mcp.json configuration. Preserve any other servers already listed.

.vscode/mcp.json
{
  "servers": {
    "riskreward": {
      "type": "http",
      "url": "https://riskreward.pro/mcp"
    }
  }
}

Download the config. Follow the current VS Code MCP instructions if your agent host uses a different configuration location.

Other remote MCP clients

Enter the endpoint URL above and select HTTP or Streamable HTTP. Clients using an mcpServers object can use the remote server snippet, adapting it to their documented format. No bearer token is needed.

Test the connection

Ask for the available RiskReward tools, then try this complete calculation:

Calculate position size for a 10,000 USDT account risking 1%, entry 100,000, stop 95,000, target 110,000, with entry fee 0.02%, stop fee 0.05%, and target fee 0.02%. Show the returned assumptions and result link.

The expected quantity is approximately 0.0197336 base units, with a 100 USDT fee-inclusive planned loss. Use the full response for precision; do not round an order up without checking its risk.

Official TypeScript client

JavaScript, @modelcontextprotocol/client v2
import {Client, StreamableHTTPClientTransport} from "@modelcontextprotocol/client";
const client = new Client({name: "my-trading-agent", version: "1.0.0"});
await client.connect(new StreamableHTTPClientTransport(
  new URL("https://riskreward.pro/mcp")
));
try {
  const result = await client.callTool({
    name: "calculate_net_risk_reward",
    arguments: {entryPrice: 100, stopPrice: 95, targetPrice: 110,
      quoteCurrency: "USD", fees: {entryPercent: 0.02, stopPercent: 0.05}}
  });
  console.log(result.structuredContent);
} finally {
  await client.close();
}

Troubleshooting

  • A normal browser GET to /mcp may return 405. It is a protocol endpoint; use an MCP client or the JSON API.
  • Older clients should accept both application/json and text/event-stream. The server supports legacy stateless initialization and the current per-request MCP protocol.
  • On invalid input, ask for the missing facts or correct the fields. Do not repeatedly retry the same calculation.
  • On rate limits, respect Retry-After. Share one connection within your agent where practical.

Discovery and supported scope

The registry manifest describes the public endpoint under the RiskReward domain namespace. Listing in a registry does not automatically enable a server in an agent. Integrators choose which servers to connect.

This server performs calculations only. It cannot access a private journal, submit an exchange order, look up a live fee tier, or provide a liquidation price. See the server overview and calculation contracts.