Skip to main content

machina-mcp

Machina as an MCP server. Use Machina's x402-powered agent services directly from Claude Desktop, Cursor, or any MCP-compatible AI host — no x402 integration required.

Payments happen automatically on every tool call. Configure once, pay per use.

Tools

Tool What it does Cost
url_extract Fetch any URL → clean Markdown $0.005
scan_python Scan Python code for security vulnerabilities $0.020
validate_email Validate a single email (syntax, MX, SMTP) $0.007
validate_email_bulk Validate up to 100 emails $0.500
domain_intel DNS, WHOIS, SSL, tech stack for a domain $0.050
pdf_inspect PDF page count + metadata FREE
pdf_extract PDF → Markdown (≤50 pages) $0.050
pdf_extract_large PDF → Markdown (≤200 pages) $0.180

Payments are in USDC on Base (Coinbase's L2). Gas fees are fractions of a cent.


Quick Start

1. Install

pip install machina-mcp

2. Get a wallet + fund it

You need an Ethereum wallet with a small USDC balance on Base mainnet.

Option A — New wallet (easiest):

python -c "from eth_account import Account; a = Account.create(); print('Address:', a.address); print('Key:', a.key.hex())"

Copy the address and send it $1–5 USDC on Base via Coinbase or bridge.base.org.

Option B — Existing wallet: Export your private key from MetaMask: Account Details → Export Private Key.

3. Set your key

export MACHINA_WALLET_KEY=0xYOUR_PRIVATE_KEY

4. Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "machina": {
      "command": "machina-mcp",
      "env": {
        "MACHINA_WALLET_KEY": "0xYOUR_PRIVATE_KEY"
      }
    }
  }
}

Restart Claude Desktop. The 8 Machina tools will appear automatically.


Usage Examples

Once connected, ask Claude:

  • "Extract the content from https://example.com" → uses url_extract
  • "Scan this Python code for security issues: [paste code]" → uses scan_python
  • "Check if john@example.com is a real email" → uses validate_email
  • "Get DNS and WHOIS info for openai.com" → uses domain_intel
  • "How many pages is this PDF?" → uses pdf_inspect (free)
  • "Extract text from report.pdf" → uses pdf_extract

Configuration

Env var Required Default Description
MACHINA_WALLET_KEY ✅ — Ethereum private key (hex, 0x-prefixed)
MACHINA_NETWORK ❌ eip155:8453 CAIP-2 network ID (Base mainnet)
MACHINA_BASE_URL ❌ https://mach402.dev Machina API base URL

Testnet mode (free, mock payments):

export MACHINA_NETWORK=eip155:84532
export MACHINA_BASE_URL=https://mach402.dev  # testnet endpoints at same URL when TESTNET_MODE=true

How payments work

  1. Your agent calls a Machina MCP tool (e.g. url_extract)
  2. The MCP server sends the request to mach402.dev
  3. Machina responds with a 402 Payment Required + exact USDC amount
  4. The MCP server signs and sends the x402 payment automatically using your wallet key
  5. Machina verifies payment on-chain and returns the result
  6. The result is passed back to your agent

The agent never sees any of this — it just calls a tool and gets a result.


Running standalone (for testing)

# Test with MCP Inspector
npx @modelcontextprotocol/inspector machina-mcp

# Or run directly
export MACHINA_WALLET_KEY=0x...
machina-mcp

Pricing

Machina charges per call in USDC on Base mainnet. Payments are settled on-chain via Coinbase CDP. There are no subscriptions, no minimums, no monthly fees.

A $5 USDC balance covers ~1,000 URL extractions or ~250 Python code scans.



License

MIT

Metadata

Release files for machina-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for machina-mcp 0.1.1
File Size Uploaded Provenance Actions
machina_mcp-0.1.1.tar.gz 8.4 kB Without provenance Details for machina_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for machina-mcp 0.1.1
File Interpreter ABI Platform Actions
machina_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for machina_mcp-0.1.1-py3-none-any.whl

Total release size: 18.5 kB

Release files / machina_mcp-0.1.1.tar.gz

Download URL machina_mcp-0.1.1.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca0fa0eb822dfc869a167a30cd1a6088ddaab16510cc8ec9f569848ecb78d17f
BLAKE2b-256 checksum
How to use checksums
9a205d2131fdab20bdd8c6e310e3e84d3947034d9ef0cb7ed13c0fa76a71eedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / machina_mcp-0.1.1-py3-none-any.whl

Download URL machina_mcp-0.1.1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3c91a32fa09ee4a01e5bd625af4bc0d3f62d970e99306711d63d87d8c321a7d
BLAKE2b-256 checksum
How to use checksums
f515bffa476d5e76d0268aad9e89d25f0b3d7045433715c2c04585482052520c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for machina-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page