# 402-in-a-Box (Vashishta Metered MCP)

> 402-in-a-Box (Vashishta Metered MCP) is a freemium MCP server for developer tools. Metered HTTP 402 paywall and credit packs for MCP servers, billed in INR or USD. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, Web, Self-hosted
- **Website:** https://vashishta.srigenmedia.com/developers/402
- **Repository:** https://github.com/srigenmedia/402-in-a-box
- **MCP Registry name:** io.github.srigenmedia/402-in-a-box
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-20

## About

This server wraps an MCP endpoint with HTTP 402 Payment Required metering, so each call is reserved, executed and then committed or rolled back against a prepaid credit balance. Developers can put any Model Context Protocol server behind this pay-per-call layer rather than building their own billing.

Credits are sold as compute packs through Razorpay for INR and PayPal for USD, with a developer portal that includes a free sandbox allowance for testing. Requests carry a bearer key and an idempotency key, and an optional Kavach spend-hold check can gate larger spends behind a second factor.

The project is aimed at teams that want agents or API clients to pay per use without handling card data or custody of customer funds themselves. The README also describes a deterministic Vedic astrology tool exposed through the same server.

## Features

- **Pay-per-call metering:** Each MCP request reserves credits, runs, then commits or rolls back the charge.
- **HTTP 402 payment flow:** Clients without a key receive a 402 response with payment requirements to top up.
- **Razorpay and PayPal billing:** Compute packs can be bought in INR via Razorpay or in USD via PayPal.
- **Idempotent spend requests:** Requests accept an idempotency key so repeated calls are not charged twice.
- **Spend-hold policy check:** An optional Kavach firewall applies spend policy and two-factor holds before execution.
- **TypeScript and Python SDKs:** Packages are provided for Cloudflare Workers and FastAPI-based MCP servers.

## Good for

- Charging external agents per tool call on an existing MCP server
- Adding a prepaid credit system to a paid API for AI clients
- Testing a metered MCP endpoint with a free sandbox key
- Issuing invoiced compute credits to Indian customers with GST receipts

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http 402-in-a-box https://mcp.vashishta.srigenmedia.com/mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "type": "http",
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://mcp.vashishta.srigenmedia.com/mcp
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "type": "http",
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://mcp.vashishta.srigenmedia.com/mcp
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add 402-in-a-box --url https://mcp.vashishta.srigenmedia.com/mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.402-in-a-box]
url = "https://mcp.vashishta.srigenmedia.com/mcp"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "httpUrl": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http 402-in-a-box https://mcp.vashishta.srigenmedia.com/mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "serverUrl": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "url": "https://mcp.vashishta.srigenmedia.com/mcp",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "type": "streamableHttp",
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "402-in-a-box": {
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://mcp.vashishta.srigenmedia.com/mcp
```

Enter a Name (for example "402-in-a-Box (Vashishta Metered MCP)"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "402-in-a-box": {
      "type": "http",
      "url": "https://mcp.vashishta.srigenmedia.com/mcp"
    }
  }
}
```

## FAQ

### How do clients connect to the server?

Clients connect over streamable HTTP at the published MCP endpoint, passing a bearer key in the Authorization header.

### Which payment providers are supported?

Razorpay handles INR purchases with 18% GST and PayPal handles USD purchases with 0% export LUT treatment.

### Is there a free way to try 402-in-a-Box (Vashishta Metered MCP)?

The developer portal offers a 25-unit free sandbox for testing the metered flow.

### Is crypto payment enabled?

The x402 on-chain facilitator is disabled by default on Indian deployments and is opt-in only for other self-hosters.

### How do I add 402-in-a-Box (Vashishta Metered MCP) to Claude Code?

Run this command in your terminal: claude mcp add --transport http 402-in-a-box https://mcp.vashishta.srigenmedia.com/mcp

### What are the best alternatives to 402-in-a-Box (Vashishta Metered MCP)?

The closest alternatives to 402-in-a-Box (Vashishta Metered MCP) are MCP Monetize - Drop-in Billing & Capability Token Engine, Agent Tollbooth 402, gatefareio, MCP Pay Gate and GeekVault.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Status: checked automatically by AIPoweredBot on 26 November 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCP Monetize - Drop-in Billing & Capability Token Engine](https://ai-powered.com/mcp/mcp-monetize-drop-in-billing-and-capability-token-engine): MCP Monetize - Drop-in Billing & Capability Token Engine is an open-source MCP server for developer tools.
- [Agent Tollbooth 402](https://ai-powered.com/mcp/agent-tollbooth-402): Agent Tollbooth 402 is a freemium MCP server for developer tools.
- [gatefareio](https://ai-powered.com/mcp/gatefareio): gatefareio is an open-source MCP server for developer tools.
- [MCP Pay Gate](https://ai-powered.com/mcp/mcp-pay-gate): MCP Pay Gate is an open-source MCP server for developer tools.
- [GeekVault](https://ai-powered.com/mcp/geekvault): GeekVault is a paid MCP server for developer tools.
- [x402 Tool Shop](https://ai-powered.com/mcp/x402-tool-shop): x402 Tool Shop is a paid MCP server for developer tools.
- [MCP Billing Gateway](https://ai-powered.com/mcp/mcp-billing-gateway): MCP Billing Gateway is an open-source MCP server for finance and payments.
- [Apimesh](https://ai-powered.com/mcp/apimesh): Apimesh is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/402-in-a-box-vashishta-metered-mcp
