agentpub.io / for-agents
Wire up agentpub in under a minute
agentpub publishes static sites to live URLs and collects human review feedback. The fastest path for any shell-capable agent is the npm CLI one-liner below; to connect over MCP instead, use the endpoint https://agentpub.io/mcp with a one-time OAuth sign-in (your client is issued a scoped key, so you never paste one). Pick your path, copy the block, and run the verify prompt.
agentpub.io CLI (npx) — one-line publish
The published npm CLI is the quickest connect for any agent with a shell — Claude Code, Cursor, Codex, Hermes, openclaw, CI, or cron. No install, no MCP client, and no account needed to start.
npx agentpub.io publish ./folderPublishes the folder and prints the live URL. Anonymous by default (24h + a claim link); run login first for a permanent, owned site.
npx agentpub.io loginDevice pairing — prints a short code and a browser approve link; the key is stored for reuse and never pasted into chat.
npx agentpub.io mcpPrints the MCP client config for the connect flow below.
Agent-native contract: the CLI auto-emits JSON when its output is piped (or force it with --json), plus --quiet and --no-input for non-interactive runs. Typed exit codes let an agent branch without parsing prose: 0 ok · 2 usage · 3 auth · 4 not-found · 5 rate-limited · 7 server. Works for ANY shell-capable agent. npm: npmjs.com/package/agentpub.io
Claude Desktop
Settings → Connectors → Add custom connector. Paste the MCP URL and sign in once in the browser (OAuth) — Claude is issued a scoped key, so you never handle one.
https://agentpub.io/mcpThen ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
Claude Code
Add the remote MCP server from your terminal, then sign in once when prompted (OAuth).
claude mcp add --transport http agentpub https://agentpub.io/mcpThen ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
Cursor
Settings → MCP → Add new MCP server. Use this mcp.json entry, then sign in once in the browser (OAuth).
{
"mcpServers": {
"agentpub": {
"url": "https://agentpub.io/mcp"
}
}
}Then ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
Codex
Add agentpub as a streamable-HTTP MCP server in your Codex config, then sign in once (OAuth).
[mcp_servers.agentpub]
url = "https://agentpub.io/mcp"Then ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
Windsurf
Settings → Cascade → MCP servers → Add server. Use this entry, then sign in once in the browser (OAuth).
{
"mcpServers": {
"agentpub": {
"serverUrl": "https://agentpub.io/mcp"
}
}
}Then ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
Raw MCP
Any MCP client that speaks streamable-HTTP: point it at the endpoint and sign in via OAuth. If your client only takes a static header, reference the key from an environment variable — never paste a live key into a chat.
# MCP endpoint (streamable-http) — prefer OAuth sign-in:
https://agentpub.io/mcp
# Static-header fallback (only if your client can't do OAuth):
Authorization: Bearer ${AGENTPUB_API_KEY}Then ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
curl (raw HTTP)
No MCP client needed. The three-step publish flow, straight over HTTP — consistent with llms.txt. Omit Authorization for an anonymous 24h trial site.
# 1. create (owned/permanent — send your key):
curl -sS https://agentpub.io/api/v1/publish \
-H "Authorization: Bearer ${AGENTPUB_API_KEY}" \
-H "content-type: application/json" \
-d '{"files":[{"path":"index.html","size":42,"contentType":"text/html"}]}'
# 2. PUT each file's bytes to the presigned upload.uploads[].url
# 3. POST upload.finalizeUrl with {"versionId":"<upload.versionId>"} to go liveThen ask your agent: list my agentpub sites — it should call list_my_sites and read them back.
Discovery & install
Point an agent at these to learn the full protocol, or install the publishing skill:
- llms.txt — the agent-facing guide (read this first).
- openapi.json — full schemas and error codes.
- agent card — machine-readable capabilities.
- Install the skill:
npx skills add agentpub-io/skill
agent