Connect Claude Code

Wire the Pileless MCP server into Claude Code and your agent can push decisions to your inbox — then resume itself when you decide. About two minutes.

1. Get your Pileless API key

Each agent authenticates with a workspace API key (ak_…). Grab one from Pileless → Settings → API keys — create a key and copy it (shown only once). Set it as PILELESS_API_KEY in your environment, or drop it in the config below.

Prefer a file over an env var? Put the key in ~/.pileless/config.json as {"api_key": "ak_…"} — the MCP server reads it automatically.

2. Add the MCP server to Claude Code

Add Pileless to your MCP servers — either with the CLI:

claude mcp add pileless -- npx -y @pileless/mcp

…or by hand in your Claude Code config (~/.claude.json or the project .mcp.json):

{
  "mcpServers": {
    "pileless": {
      "command": "npx",
      "args": ["-y", "@pileless/mcp"],
      "env": { "PILELESS_API_KEY": "ak_…" }
    }
  }
}

3. Verify the connection

Restart Claude Code and run /mcp — you should see pileless connected with its tools. Or just ask your agent: "create a test pile to approve, and give me the link." A pile should land in your inbox.

4. Use it

Now your agent piles instead of stopping to ask. Tell it (or put in your project's agent instructions):

When you're about to send, post, publish, refund, or commit something —
or you have 2+ options for me to choose from — create a Pileless pile
and wait for my decision instead of guessing.

The agent calls pile.create, optionally pile.wait_for_resolution, and resumes the moment you decide.

Tools reference

ToolWhat it does
pile.createSubmit a new pile of decisions (one or many items).
pile.add_itemAppend an item to an open pile (live-pile model).
pile.sealClose a pile to further appends.
pile.wait_for_resolutionLong-poll for the human's decisions (default 60s).
pile.statusProbe a pile's current state.
pile.capture_urlCapture a URL's content into a pile item.

Next: connect Codex →