Connect your AI agent to pinfra
Two real paths: a remote MCP server that works with any agent, or the CLI installed on your machine to publish real folders.
What you need
A pinfra account. From there, pick one: give your agent a key for the remote MCP server (works with any client), or install the CLI if your agent has a terminal and you need to publish a folder.
Option A — remote MCP (recommended for any agent)
platform.pinfra.app/mcp is an MCP server that runs inside the platform: nothing to install, no Go toolchain. It works with any client that speaks MCP over HTTP (Claude Desktop, Claude Code, or another). You need a personal key (Settings → "Keys to connect tools", or the one pinfra login already saved to ~/.pinfra/config.json):
claude mcp add --transport http pinfra https://platform.pinfra.app/mcp \ --header "Authorization: Bearer <tu-clave>"
The --header/-H syntax is claude mcp add's own — for another client, look up how it adds an HTTP header when connecting a remote server.
⚠ publicar_aplicacion is listed (same name, same description) but always refuses over this transport: there's no project folder the platform can reach. If the model calls it, it'll suggest pinfra publish instead.
Option B — the CLI on your machine (to publish folders)
An agent WITH a terminal (Claude Code, Cursor, Codex, Gemini CLI) can do more than the remote MCP server: pinfra publish reads your project folder straight off the disk it runs on, something a server running inside the platform can never do.
Install
Mac / Linux
Windows (PowerShell)
Connect your computer
Opens your browser to confirm with one click. For CI or a headless environment, pinfra login --key accepts a personal key with no prompt.
Link the folder (once)
Saves the link in .infra.json: after this, publish/status/logs no longer need --app.
Publish
See the published app's logs
agente.md — the one-line onboarding
If your agent can read a URL and run commands, this is the fastest way to start: paste this line and let it follow the steps on its own. It's the condensed version of this guide, written for an agent to read, not a human.
Ask your agent
With either option set up, try asking your agent, in your own words:
- "Publish this folder as my-store"
- "What address is my-store published at?"
- "Check what apps I have and publish the changes to the appointments one"
What your agent can do today, by option
| Remote MCP | Local CLI | |
|---|---|---|
| See your apps | Yes — listar_aplicaciones | Yes — pinfra apps |
| Check a publish's status | Yes — estado_de_la_aplicacion | Yes — pinfra status |
| Publish | No — always refuses, suggests pinfra publish | Yes — pinfra publish |
| See the container's logs | No — no such tool over MCP | Yes — pinfra logs |
| See and go back to an earlier version | Yes — list_versions and restore_version | No — no command yet; restore it from the app's page on pinfra.app |
Security
- The key is stored hashed server-side — you see it once when you create it, and after that we only keep its short fingerprint.
- You can revoke it at any time from Settings → "Keys to connect tools": it stops working immediately.
- The key only travels over https:// (localhost is the only exception, for development).
- Never paste it by hand into a file headed to a repository (a committed .env, a script, etc.) — pass it via environment variable, or let pinfra login save it for you.
Common issues
"publicar_aplicacion" always refuses over remote MCP
Expected: the remote MCP server has no access to any folder on your computer. To actually publish, install the CLI (Option B) and run pinfra publish.
Your agent has no terminal
Use Option A (remote MCP): it works with Claude Desktop and any other client with nothing to install, even though it can't publish folders.
"There's already a publish in progress for this app"
Something is publishing right now. Ask your agent to check estado_de_la_aplicacion (MCP) or pinfra status (CLI) until it finishes.
pinfra logs --follow doesn't update live
It doesn't stream yet: the flag is accepted but shows a one-shot result. To "watch" logs today, repeat pinfra logs --since 30s in a loop.