# ifPNG MCP stdio bridge

A dependency-free stdio → HTTP bridge for the ifPNG MCP server.

**Most people do not need this.** Claude, Claude Code, Cursor, VS Code and the
Claude Agent SDK all speak remote MCP over HTTP: point them at
`https://ifpng.com/api/mcp` and sign in — no key required. See
[the MCP guide](https://ifpng.com/mcp/server-docs). This bridge exists for hosts
that can only launch a local stdio subprocess, where there is no browser to
complete a sign-in and an API key is the practical option.

It forwards every JSON-RPC message verbatim and writes replies back to stdout.
There is no tool logic in it, so it never needs updating when the server's tools
change. It runs on plain Node ≥ 18 with no install step — keeping a
credential-handling script off the npm dependency graph entirely.

## Usage

```json
{
  "mcpServers": {
    "ifpng": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-bridge/ifpng-mcp-stdio.mjs"],
      "env": { "IFPNG_API_KEY": "ifpng_mcp_YOURKEY" }
    }
  }
}
```

| Variable | Required | Default |
|---|---|---|
| `IFPNG_API_KEY` | yes | — |
| `IFPNG_MCP_URL` | no | `https://ifpng.com/api/mcp` |

Create a key at [ifpng.com/dashboard?tab=mcp](https://ifpng.com/dashboard?tab=mcp).
An active Pro subscription is required.

## Notes

- Diagnostics go to stderr only; stdout is the JSON-RPC channel and must stay clean.
- Server-side errors (expired subscription, revoked key, rate limit) are passed
  through with their original message, so the agent can explain what happened
  instead of reporting a generic failure.
- Keep the key in your client's `env` block or a secret manager — not in a file
  you commit.
