Back to Home
Cronos402 icon

mcp-gateway

by Cronos402

Overview

Acts as an x402 monetization wrapper and proxy for existing Micro-Credential Protocol (MCP) servers, enabling payment-gated access and management capabilities.

Installation

Run Command
tsx src/index.ts

Environment Variables

  • UPSTASH_REDIS_REST_URL
  • UPSTASH_REDIS_REST_TOKEN
  • MCP2_PUBLIC_URL
  • PORT
  • VERCEL
  • DEBUG

Security Notes

The server has a potential Server-Side Request Forgery (SSRF) vulnerability. The `resolveTargetUrl` function, used by the `/mcp` proxy endpoint, can derive the upstream target URL from the `x-cronos402-target-url` header or `target-url` query parameter if no server ID is provided or found. This allows an attacker to direct the gateway to an arbitrary URL, potentially probing internal networks or accessing sensitive internal services. Additionally, the `/register` endpoint, if not properly secured, could allow an untrusted user to register a server with an internal `mcpOrigin` URL, leading to a persistent SSRF vector. There is no explicit validation or allowlisting of target URLs in the code. Therefore, it is not recommended for deployment in environments where untrusted users can access these endpoints without additional security measures.

Similar Servers

Stats

Interest Score0
Security Score4
Cost ClassMedium
Avg Tokens10
Stars0
Forks0
Last Update2026-01-19

Tags

monetizationAPI gatewayproxyx402Cronos