Set up your existing MCP server with a Nuwa MCP Proxy to start accepting payments
With Nuwa MCP Proxy, you can convert an existing MCP server (Streamable HTTP or STDIO) into a Nuwa‑Compatible MCP endpoint, enable DID authentication for the server and payment for your MCP tools, without changing the service. The proxy exposes a single JSON‑RPC endpoint (/mcp) over streamable HTTP, forwards tools, and attaches Nuwa payment semantics.NPM Package: @nuwa-ai/mcp-server-proxy - Ready to use without building from source.
Nuwa MCP Proxy is designed to be single-server, single-endpoint MCP server. For multiple MCP servers, you have to deploy multiple Nuwa MCP Proxy instances.
Not sure where SERVICE_KEY comes from? Follow the
Service Key guide to generate it via cadop-web.
3
Run the proxy
export SERVICE_KEY=... # required for settlementexport UPSTREAM_API_TOKEN=... # if your upstream requires it# Run with global installationmcp-server-proxy --config ./config.yaml# Or run with npx (no installation needed)npx @nuwa-ai/mcp-server-proxy --config ./config.yaml# → serves POST /mcp (JSON-RPC over streamable HTTP)
4
Verify the proxied MCP server
You can use the MCP Debug tool provided by Cap Studio to verify and debug the proxied MCP server.
1
Clone and build
For development or customization, you can build from source. Find the full implementation in the Nuwa Monorepo.
Two ready-to-run examples are included. You can use them with either the npm package or source code:
Amap proxy (HTTP upstream)
Context7 proxy (stdio upstream)
Using NPM Package:
# Download config filecurl -o amap-config.yaml https://raw.githubusercontent.com/nuwa-protocol/nuwa/main/nuwa-services/mcp-server-proxy/deployments/instances/amap-proxy/config.yamlexport AMAP_API_KEY=your_amap_api_key_hereexport SERVICE_KEY=your_service_key_hereexport PORT=8088# Run with npm packagemcp-server-proxy --config ./amap-config.yaml# Or with npxnpx @nuwa-ai/mcp-server-proxy --config ./amap-config.yaml
Using Source Code:
cd nuwa-services/mcp-server-proxyexport AMAP_API_KEY=your_amap_api_key_hereexport SERVICE_KEY=your_service_key_hereexport PORT=8088./examples/run-amap-local.sh# → Serves /mcp on http://localhost:8088
# Download config filecurl -o context7-config.yaml https://raw.githubusercontent.com/nuwa-protocol/nuwa/main/nuwa-services/mcp-server-proxy/deployments/instances/context7-proxy/config.yamlexport SERVICE_KEY=your_service_key_hereexport PORT=8089# Run with npm packagemcp-server-proxy --config ./context7-config.yaml# Or with npxnpx @nuwa-ai/mcp-server-proxy --config ./context7-config.yaml
Using Source Code:
cd nuwa-services/mcp-server-proxyexport SERVICE_KEY=your_service_key_hereexport PORT=8089./examples/run-context7-local.sh# → Serves /mcp on http://localhost:8089