Skip to main content
Glama
OpenRouter Reasoning MCP

OpenRouter Reasoning MCP

by sawroop1242

OpenRouter Reasoning MCP

Ein zustandsloser Remote-Server für das Model Context Protocol (MCP), der auf Cloudflare Workers läuft.

Er stellt ein Tool bereit, multi_step_reasoning, das einen Prompt an OpenRouter sendet, einen zweiten Verifikationsdurchlauf durchführt und beide Antworten sowie – falls verfügbar – die Reasoning-Felder des Anbieters zurückgibt.

Architektur

MCP client
   │
   │ Streamable HTTP
   ▼
Cloudflare Worker /mcp
   │
   ├── OpenRouter request #1
   │
   └── OpenRouter request #2 (verification)
             │
             ▼
      OpenRouter model
      stealth/ox-alpha

Related MCP server: CRASH - Cascaded Reasoning with Adaptive Step Handling

Voraussetzungen

  • Node.js

  • Ein Cloudflare-Konto

  • Ein OpenRouter-API-Schlüssel

  • Wrangler-Authentifizierung

Lokale Entwicklung

npm install
npx wrangler login
npx wrangler secret put OPENROUTER_API_KEY
npm run dev

Der MCP-Endpunkt ist /mcp.

Bereitstellung

npm install
npx wrangler login
npx wrangler secret put OPENROUTER_API_KEY
npm run typecheck
npm run deploy

Nach der Bereitstellung lautet der Endpunkt:

https://openrouter-reasoning-mcp.<your-subdomain>.workers.dev/mcp

MCP-Client-Konfiguration

Verwenden Sie die bereitgestellte /mcp-URL als Remote-MCP-Server mit Streamable HTTP. Konfigurieren Sie den Endpunkt nicht als den veralteten HTTP+SSE-Transport.

Tool

multi_step_reasoning

Eingabe:

{
  "prompt": "Explain why a binary search is O(log n).",
  "follow_up": "Verify the explanation and correct any mistakes."
}

follow_up ist optional. Der Standardwert ist:

Are you sure? Think carefully and verify your answer.

Sicherheit

Der OpenRouter-Schlüssel wird als Cloudflare-Worker-Secret gespeichert und niemals in Git committet. Der aktuelle Server ist absichtilich unauthentifiziert, d. h., jeder, der den /mcp-Engmt erreichen kann, kann das Tool aufrufen und das konfigurierte OpenRouter-Konto verbrauchen. Fügen Sie MCP-Authentifizierung und -Autorisierung hinzu, bevor Sie dies öffentlich mit einem kostenpflichtigen OpenRouter-Schlüssel nutzen.

Lizenz

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Facilitates two-stage reasoning processes using DeepSeek for detailed analysis and supports multiple response models such as Claude 3.5 Sonnet and OpenRouter, maintaining conversation context and enhancing AI-driven interactions.
      2
      115
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables structured, iterative reasoning for complex problem-solving with features like confidence tracking, revision mechanisms, and branching support. Provides flexible validation and multiple output formats for systematic analysis and decision-making tasks.
      1
      184 npm
      72
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Provides advanced AI reasoning capabilities through step-by-step thinking framework, enabling complex problem-solving with dynamic thought revision, multi-path reasoning, and adaptive planning for sophisticated analysis tasks.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Implements Chain of Thought methodology for extended sequential thinking on complex reasoning tasks. Enables AI clients to break down and solve problems that require deep, step-by-step logical analysis.
      1
      8 npm
      1
      MIT