Skip to main content
Glama
Unified Auth0 MCP Server

Unified Auth0 MCP Server

by wlkr73

MCP Gateway

An OpenRouter API-authenticated MCP gateway that provides unified access to multiple public MCP servers and Claude models for Claude Code and Claude Desktop integration.

Architecture

mcp-gateway/
├── src/              # MCP Gateway source code
├── shared/           # Shared types and utilities  
└── package.json      # Single package configuration

Related MCP server: claude-code-mcp

Purpose

This MCP Gateway serves as a unified authenticated entry point to multiple public MCP servers and Claude models via OpenRouter, allowing Claude Code/Desktop users to:

  • OpenRouter Integration: Access 400+ AI models including Claude 3.5 Sonnet and Claude 4 via OpenRouter API

  • Cost-Effective: Pay-per-use model instead of multiple AI subscriptions

  • Unified Interface: Access tools from multiple MCP servers through one connection

  • Public Server Access: Connect to GitHub, filesystem, web search, and other public MCP servers

  • Tool Aggregation: All tools available in one place with prefixed names to avoid conflicts

Connected Public MCP Servers

1. GitHub MCP Server

  • Tools: Repository operations, issues, pull requests, code search

  • Prefix: github: (e.g., github:search-repositories)

  • Authentication: Uses your OpenRouter API key

2. Filesystem MCP Server

  • Tools: File operations, directory browsing, file content management

  • Prefix: fs: (e.g., fs:read-file)

  • Authentication: Secure file access within allowed paths

3. Web Search MCP Server

  • Tools: Web search, content retrieval, information gathering

  • Prefix: web: (e.g., web:search)

  • Authentication: Rate-limited per API key

Gateway Tools

  • whoami - Show current user's OpenRouter API authentication status

  • list-servers - List all connected public MCP servers

  • github:* - All GitHub MCP server tools (proxied)

  • fs:* - All filesystem MCP server tools (proxied)

  • web:* - All web search MCP server tools (proxied)

Flow

  1. Claude Code connects to MCP Gateway with OpenRouter API key

  2. API Authentication - Gateway validates OpenRouter API key

  3. Model Access - Direct access to 400+ models via OpenRouter

  4. Tool calls - Gateway proxies tool calls to appropriate public MCP servers

  5. Responses aggregated - Responses from public servers and OpenRouter flow back to Claude Code

Setup

Prerequisites

Development

# Install dependencies
npm install

# Start gateway in development
npm run dev     # Gateway on localhost:8788

Deployment

# Deploy gateway to Cloudflare
npx wrangler deploy

# Set OpenRouter API key as secret
npx wrangler secret put OPENROUTER_API_KEY

OpenRouter Configuration

  1. Create an account at https://openrouter.ai

  2. Generate an API key at https://openrouter.ai/keys

  3. Load credits to your account (starts around $10 minimum)

  4. Set the API key in your Cloudflare Worker secrets

Claude Code Integration

Option 1: Direct Integration

Add to ~/.claude.json:

{
  "mcpServers": {
    "mcp-gateway": {
      "command": "node",
      "args": [
        "/Users/adam/Projects/MCP Server/openrouter-mcp-client.js",
        "https://mcp-gateway.marcean.workers.dev",
        "YOUR_OPENROUTER_API_KEY_HERE"
      ]
    }
  }
}

Option 2: Environment Variable

Store your API key in environment:

export OPENROUTER_API_KEY="your-key-here"

Then use in ~/.claude.json:

{
  "mcpServers": {
    "mcp-gateway": {
      "command": "node",
      "args": [
        "/Users/adam/Projects/MCP Server/openrouter-mcp-client.js",
        "https://mcp-gateway.marcean.workers.dev"
      ],
      "env": {
        "OPENROUTER_API_KEY": "${OPENROUTER_API_KEY}"
      }
    }
  }
}

Testing

Test the connection:

# Basic connection test
node test-openrouter-connection.js

# Full test with API key
node openrouter-mcp-client.js https://mcp-gateway.marcean.workers.dev YOUR_API_KEY

Security

  • API protected by OpenRouter API key authentication

  • CORS configured for secure browser access

  • Environment variables stored as Cloudflare Worker secrets

  • Rate limiting through OpenRouter's built-in limits

Cost Comparison

Traditional Subscriptions:

  • Claude Pro: $20/month

  • ChatGPT Plus: $20/month

  • Other AI subscriptions: $10-50/month each

  • Total: $50-100+/month

OpenRouter Alternative:

  • Pay per actual usage

  • Typical usage: $10-25 lasting 3-6 months

  • Access to 400+ models including latest Claude versions

  • Estimated: $2-8/month for typical usage

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
      Not graded
      quality
      D
      maintenance
      This tool creates a Model Context Protocol (MCP) server that acts as a proxy for any API that has an OpenAPI v3.1 specification. This allows you to use Claude Desktop to easily interact with both local and remote server APIs.
      906
      MIT
    • A
      license
      C
      quality
      F
      maintenance
      This project aims to build a Claude Code MCP server and implement its associated tools (explain\_code, review\_code, fix\_code, edit\_code, test\_code, simulate\_command, your\_own\_query). The server is implemented using Node.js and the MCP SDK. It receives tool requests from clients via Stdio, dynamically
      7
      16 npm
      35
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
      15
      305
      MIT