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
pasteboxCLI or curls the API). - MCP server —
pastebox-mcp, a nativecreate_pastetool 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_URLandPASTEBOX_API_KEY. - MCP
envblock: setPASTEBOX_URL/PASTEBOX_API_KEYin 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:
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
Skill — download pastebox-claude-code.zip:
mkdir -p ~/.claude/skills
unzip -o pastebox-claude-code.zip -d ~/.claude/skills/ # or .claude/skills/ for one projectMCP — add the native tool:
claude mcp add pastebox \
--env PASTEBOX_URL=https://paste.example.com \
--env PASTEBOX_API_KEY=pb_… \
-- npx -y pastebox-mcpor in .mcp.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:
unzip -o pastebox-cursor.zip -d .It adds .cursor/rules/pastebox.mdc (a project rule) and .cursor/mcp.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:
[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:
PASTEBOX_URL=https://paste.example.com PASTEBOX_API_KEY=pb_… npx -y pastebox-mcpOr download everything in one bundle.
MCP tools
| Tool | Purpose |
|---|---|
create_paste | Store text and return a view URL. Inputs: content (required), title, syntax, ttlSeconds, burnAfterRead. |
get_paste | Fetch a paste's content by publicId. |
list_pastes | List 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.