AI Agents

MCP Server

Connect every 1FRX tool to Claude, GPT-4o, and any MCP-compatible AI agent — no separate infrastructure required. The MCP endpoint is built right into the 1FRX API.

Zero extra infrastructure. The MCP server runs as a Vercel Edge Function at https://1frx.com/api/mcp — same deployment, same domain, no separate server to manage.

What is MCP?

The Model Context Protocol is an open standard that lets AI assistants discover and call external tools. Once connected, your AI agent can generate images, build PDFs, produce audio, take screenshots, and parse documents — just by asking in natural language.

1FRX implements the Streamable HTTP transport (MCP spec 2025-03-26), which works over a single POST endpoint and is compatible with Claude.ai, Claude Desktop, GPT-4o with tools, and any MCP client library.

MCP endpoint

POST https://1frx.com/api/mcp
GET  https://1frx.com/api/mcp   ← health / tool discovery

No authentication is required to call the MCP endpoint itself — it authenticates to the underlying paid APIs using the ONFRX_API_KEY environment variable set in your Vercel project. See Setup below.

Tools exposed

generate_image

Render a social card, OG image, or announcement banner from a template and data payload. Returns a CDN URL.

generate_pdf

Build a pixel-perfect invoice, certificate, report, or letter. Returns a CDN URL to the PDF.

generate_audio

Turn any text into speech via ElevenLabs voices. Returns a CDN URL to the audio file.

take_screenshot

Capture a full-page or viewport screenshot of any public URL. Supports device emulation and dark mode.

parse_document

Extract structured JSON from a PDF, JPEG, PNG, or WebP using Claude Vision. Supports custom schemas.

Setup — add ONFRX_API_KEY to Vercel

The MCP endpoint calls your own paid APIs on your behalf. It needs a valid 1FRX API key to do so.

  1. Generate an API key at 1frx.com/dashboard.html. Use the pro plan to unlock all tools.
  2. Add it to Vercel. Go to your Vercel project → Settings → Environment Variables:
    NameValueEnvironments
    ONFRX_API_KEY Your sk_live_... key Production, Preview, Development
  3. Redeploy (Vercel picks up new env vars on the next deploy — trigger one from the dashboard or push any commit).
  4. Verify. Visit https://1frx.com/api/mcp in your browser. You should see:
    {
      "name": "1frx-tools",
      "version": "1.0.0",
      "transport": "streamable-http",
      "endpoint": "/api/mcp",
      "tools": ["generate_image","generate_pdf","generate_audio","take_screenshot","parse_document"]
    }

Connect to Claude.ai

  1. Open Claude.ai → Settings → Integrations
  2. Click Add integration → enter the URL:
    https://1frx.com/api/mcp
  3. Save. Claude will discover the 5 tools automatically. Start a new conversation and try: "Generate a social card for my product launch — use socialSquare, title 'Launch Day', brand color #5ee3ff."

Connect to Claude Desktop

Claude Desktop supports MCP servers via HTTP as well as stdio. To connect via HTTP, edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "1frx": {
      "type": "http",
      "url": "https://1frx.com/api/mcp"
    }
  }
}

Restart Claude Desktop after saving.

Connect to any MCP client

Any client that implements the MCP Streamable HTTP transport can connect. The endpoint accepts standard JSON-RPC 2.0 messages:

Discover tools

POST https://1frx.com/api/mcp
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}

Call a tool

POST https://1frx.com/api/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "generate_image",
    "arguments": {
      "template": "ogCard",
      "data": {
        "title": "Launch Day",
        "subtitle": "AI-powered PDF generation is live",
        "brand_color": "#5ee3ff"
      }
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"url\": \"https://cdn.1frx.com/images/a3f9b2c1.png\",\n  \"template\": \"ogCard\",\n  \"width\": 1200,\n  \"height\": 630,\n  \"format\": \"png\"\n}"
      }
    ]
  }
}

Example agent prompts

Social media card

"Generate a 1080×1080 social card using the socialSquare template.
Title: 'New Feature Drop', subtitle: 'AI PDF generation in one API call',
brand_color #5ee3ff, dark background."

Invoice

"Build an invoice PDF for Acme Corp. Invoice INV-2024-001, today's date.
Line items: Web Design $2,500, Hosting Setup $300. My company is 1FRX Ltd."

Competitor screenshot

"Take a full-page desktop screenshot of stripe.com/pricing with ads blocked."

Document parse

"Here's a bank statement PDF. Extract all transactions as JSON with date,
description, and amount fields."

Authentication model

The MCP endpoint itself is unauthenticated — any agent that knows the URL can call it. The ONFRX_API_KEY env var is your service key, used server-side to call the underlying paid APIs. It never leaves your Vercel environment.

If you want to restrict access to the MCP endpoint (e.g. for a private team deployment), add a simple bearer token check at the top of api/mcp.js before the main handler logic.