Back to Home
Cronos402 icon

mcp

by Cronos402

Overview

Core Model Context Protocol (MCP) server that enables x402 payment-gated tool execution on the Cronos blockchain for AI clients.

Installation

Run Command
tsx src/index.ts

Environment Variables

  • BETTER_AUTH_SECRET
  • GITHUB_CLIENT_ID
  • GITHUB_CLIENT_SECRET
  • DATABASE_URL
  • NODE_ENV
  • PORT
  • VLAYER_WEB_PROOF_API
  • VLAYER_CLIENT_ID
  • VLAYER_BEARER_TOKEN
  • MCP_DATA_URL
  • MCP_DATA_SECRET
  • CRONOS_FACILITATOR_URL
  • CRONOS_DEFAULT_NETWORK

Security Notes

1. Server-Side Request Forgery (SSRF) Risk: The server acts as a proxy, and the `targetUrl` for proxying can be specified via a base64-encoded header (`x-cronos402-target-url`) or query parameter. There is no explicit server-side validation or whitelisting of this `targetUrl` before the proxy request is made (outside of the optional VLayer hook's domain filtering), which could allow an attacker to make arbitrary requests from the server's context to internal or external systems. 2. Payment Signing Vulnerability (Latent): The `X402WalletHook` for USDC.e payments explicitly notes that 'private key access is not secure' and comments out the insecure signing logic, returning an error. However, the `createAndSignTransfer` function in `eip3009-signer.ts` exists and accepts a private key. If the `TODO` for implementing secure wallet integration is not handled carefully (e.g., by ensuring client-side signing via WalletConnect/MetaMask instead of server-side private key usage), this could become a critical vulnerability in future development. 3. Positive Security Measures: The `SecurityHook` actively removes common sensitive headers (e.g., Authorization, API keys, Cookies) from proxied requests, which is a good practice. Environment variables are validated using Zod, and database interactions use Drizzle ORM, which mitigates common injection risks. OAuth and API key management are handled by `better-auth`.

Similar Servers

Stats

Interest Score0
Security Score5
Cost ClassMedium
Avg Tokens500
Stars0
Forks0
Last Update2026-01-16

Tags

MCPx402CronosPaymentsWeb3AI Tools