Skip to content

For Agents

Make Pastebox the default sink for your AI coding agent's output: instead of dumping long logs, diffs, or command output into the chat, the agent pushes them into Pastebox and hands back a link. The chat stays clean and the output stays shareable.

There are two integration styles, and you can use either or both:

  • Skills — downloadable instruction bundles that teach an agent when and how to paste (it shells out to the pastebox CLI or curls the API).
  • MCP serverpastebox-mcp, a native create_paste tool for any MCP-compatible agent (Claude Code, Cursor, Codex, …).

Credentials (one-time)

No skill or config carries a secret. Provide credentials once, in one of these ways:

  • CLI config: npm install -g pastebox && pastebox config --url https://paste.example.com --api-key pb_… — stored in ~/.pastebox.json, outside every repo.
  • Env vars: export PASTEBOX_URL and PASTEBOX_API_KEY.
  • MCP env block: set PASTEBOX_URL / PASTEBOX_API_KEY in the server's config (below).

Mint an API key server-side with pnpm create-api-key <username> (shown once). Never commit a key.

No end-to-end encryption over MCP / curl

The MCP create_paste tool and the raw API do not encrypt content — it is not end-to-end encrypted. For secrets (tokens, .env values, private keys, credentials) do not use the MCP tool or a plain curl. Use the pastebox CLI with --e2ee --burn:

bash
echo "$TOKEN" | pastebox create --e2ee --burn --title "one-time token"

--e2ee encrypts client-side before upload; the key lives only in the URL fragment (…#key) and never reaches the server. E2EE support in the MCP server is planned for a future version.

Claude Code

Skilldownload pastebox-claude-code.zip:

bash
mkdir -p ~/.claude/skills
unzip -o pastebox-claude-code.zip -d ~/.claude/skills/   # or .claude/skills/ for one project

MCP — add the native tool:

bash
claude mcp add pastebox \
  --env PASTEBOX_URL=https://paste.example.com \
  --env PASTEBOX_API_KEY=pb_… \
  -- npx -y pastebox-mcp

or in .mcp.json:

json
{
  "mcpServers": {
    "pastebox": {
      "command": "npx",
      "args": ["-y", "pastebox-mcp"],
      "env": { "PASTEBOX_URL": "https://paste.example.com", "PASTEBOX_API_KEY": "pb_…" }
    }
  }
}

Cursor

Download pastebox-cursor.zip and unzip into your project root:

bash
unzip -o pastebox-cursor.zip -d .

It adds .cursor/rules/pastebox.mdc (a project rule) and .cursor/mcp.json:

json
{
  "mcpServers": {
    "pastebox": {
      "command": "npx",
      "args": ["-y", "pastebox-mcp"],
      "env": { "PASTEBOX_URL": "https://paste.example.com", "PASTEBOX_API_KEY": "pb_…" }
    }
  }
}

Edit the env values; never commit a real key.

Codex

Download pastebox-codex.zip and place its AGENTS.md at your repo root (or merge the "Pastebox" section into an existing AGENTS.md, or ~/.codex/AGENTS.md for all projects).

MCP~/.codex/config.toml:

toml
[mcp_servers.pastebox]
command = "npx"
args = ["-y", "pastebox-mcp"]
env = { PASTEBOX_URL = "https://paste.example.com", PASTEBOX_API_KEY = "pb_…" }

Any other agent

Download pastebox-generic.zip — it contains a vendor-neutral AGENTS.md and a plain pastebox.md. Any MCP-capable agent can also run the server directly:

bash
PASTEBOX_URL=https://paste.example.com PASTEBOX_API_KEY=pb_… npx -y pastebox-mcp

Or download everything in one bundle.

MCP tools

ToolPurpose
create_pasteStore text and return a view URL. Inputs: content (required), title, syntax, ttlSeconds, burnAfterRead.
get_pasteFetch a paste's content by publicId.
list_pastesList recent pastes for the configured API key.

The create_paste result's first line is the canonical view URL — the agent echoes that back to you.

Self-hosted paste service with E2EE