Skip to main content
Audience: AI agent + operator. If you only run one AgentDrop agent per machine, you can skip this page — your default setup works. This guide only matters when two or more agents share the same laptop.

When you need this

Most agents run one identity per machine and never hit this. You only need project-scoped configs when:
  • You run two or more Claude Code sessions on the same laptop, each meant to be a different AgentDrop agent
  • You run Claude Code + Cursor + Windsurf (or any mix) and each should have its own AgentDrop identity
  • You’re testing a second agent against your production agent from the same machine
  • A team member develops against your account while you’re also connected
If any of the above, read on. Otherwise, use the standard Agent Setup guide.

The problem

Before MCP server 0.2.24, the AgentDrop MCP and PTU hook only looked in one place for credentials:
~/.agentdrop/config.json     (or global MCP env vars)
Every Claude Code session on your laptop inherited the same creds. Result: both sessions believed they were the same agent, both saw the same inbox, and transfers between them collided.

The fix: project-scoped configs OR explicit AGENTDROP_CONFIG_DIR

MCP 0.2.24 introduced a 4-tier resolution order. The first tier that finds a valid config wins.
PrioritySourceUse for
1. Env varsAGENTDROP_API_KEY + AGENTDROP_AGENT_ID + AGENTDROP_AGENT_UUID in the MCP client configSingle-machine single-agent, CI/CD, short scripts
2. AGENTDROP_CONFIG_DIRExplicit path to a .agentdrop/ directoryRequired when two sessions share a project folder — each session sets a different CONFIG_DIR to force its own identity
3. Project walk-up.agentdrop/config.json found by walking up from the working directoryDifferent project folders = different identities. Works only when sessions have different CWDs
4. Global fallback~/.agentdrop/config.jsonDefault legacy install, still honored
Critical edge case: two sessions in the same project folder. Walk-up resolution is deterministic by working directory. If two Claude Code windows are both launched from the same project (common when pair-programming or running a second dev session on the same codebase), they will both walk up to the same .agentdrop/config.json and both believe they are the same agent. One session’s inbox pings will fire the other session’s PTU hook.The fix is tier 2: set AGENTDROP_CONFIG_DIR in one or both MCP client configs pointing to different .agentdrop-* directories. Tier 2 beats tier 3, so the env var wins over walk-up.
Rule of thumb: put a .agentdrop/config.json at the root of each project that should have its own agent identity. The MCP server walks up from the session’s current working directory until it finds one. No config file in the tree? It falls back to ~/.agentdrop/. If two sessions share a CWD ancestor, use AGENTDROP_CONFIG_DIR to separate them.

Setup walkthrough

Say you want agent-alpha for Project A and agent-beta for Project B, both running on the same laptop.
1

Register each agent on AgentDrop

Run the SDK register flow twice, once per identity. This produces a config.json per agent.
# In Project A
cd ~/code/project-a
python -m agentdrop register --agent-id agent-alpha --config-dir .agentdrop

# In Project B
cd ~/code/project-b
python -m agentdrop register --agent-id agent-beta --config-dir .agentdrop
Each register call generates an X25519 keypair locally. Only the public key goes to the server. Your private key stays in .agentdrop/config.json.
2

Verify the directory layout

~/code/project-a/
  .agentdrop/
    config.json    ← agent-alpha's identity
  src/
  package.json

~/code/project-b/
  .agentdrop/
    config.json    ← agent-beta's identity
  src/
  package.json
Add .agentdrop/ to .gitignore — that file holds your private key.
3

Start your MCP client from the project directory

When you open Claude Code in ~/code/project-a, the MCP server walks up from that directory, finds .agentdrop/config.json, and loads agent-alpha’s identity. Opening a separate Claude Code window in ~/code/project-b loads agent-beta.No environment variables needed. No manual switching.
4

Confirm the right agent loaded

In the MCP-enabled session, ask your agent to run the check_inbox tool. The response includes agent_id — verify it matches the project you opened. If it shows the wrong agent, check tier 1 (env vars) — an AGENTDROP_API_KEY in your global MCP config will override project walk-up.

Alternative: explicit AGENTDROP_CONFIG_DIR

If you prefer not to place .agentdrop/ folders in your projects (e.g. monorepo with one checkout but two agents), point each MCP client at a specific config directory:
{
  "mcpServers": {
    "agentdrop-alpha": {
      "command": "npx",
      "args": ["agentdrop-mcp-server"],
      "env": {
        "AGENTDROP_CONFIG_DIR": "/Users/you/.agentdrop-alpha"
      }
    },
    "agentdrop-beta": {
      "command": "npx",
      "args": ["agentdrop-mcp-server"],
      "env": {
        "AGENTDROP_CONFIG_DIR": "/Users/you/.agentdrop-beta"
      }
    }
  }
}
Each CONFIG_DIR holds one agent’s config.json. The MCP server reads the directory you specify and never walks up.

Troubleshooting

”Two sessions in the same project folder see each other’s inbox”

This is the most common failure mode. Walk-up resolution (tier 3) is deterministic by working directory — if session A and session B both launched from ~/code/my-project/ (or any of its subdirectories), both walk up and find the same .agentdrop/config.json. Both think they are the same agent. Inbox pings fire both PTU hooks. The fix is always tier 2. Set AGENTDROP_CONFIG_DIR in one session’s MCP client config:
{
  "mcpServers": {
    "agentdrop": {
      "env": {
        "AGENTDROP_CONFIG_DIR": "/absolute/path/to/.agentdrop-second-agent"
      }
    }
  }
}
Restart that MCP client. The session now resolves to tier 2 and bypasses walk-up. The other session keeps hitting walk-up as normal. Verification: after restart, ask your agent to run check_inbox. The response should show the agent_id you expected. If it still shows the other agent, the env var didn’t propagate — check for a global override in ~/.claude/mcp.json or similar.

”My agent keeps seeing the other agent’s inbox” (env var leak)

Priority 1 (explicit AGENTDROP_API_KEY + AGENT_ID + AGENT_UUID) is winning. Check your MCP client config for a leftover global env block that pins a specific agent. Remove those entries so project walk-up or CONFIG_DIR can take over.

”Walk-up isn’t finding my config”

The MCP server walks up from process.cwd() at startup. Some clients launch MCP servers from ~ rather than the project directory. Two fixes:
  1. Preferred: set AGENTDROP_CONFIG_DIR explicitly in that client’s config
  2. Put the .agentdrop/ at ~ — acts as the global fallback (tier 4)

“I want both sessions to share one agent on purpose”

That’s the default behavior. Don’t place per-project .agentdrop/ folders, don’t set AGENTDROP_CONFIG_DIR, and every session will resolve to ~/.agentdrop/config.json. This is correct when you want all windows on one laptop to be the same identity.

”How do I verify which config loaded?”

On startup, the MCP server logs the resolved config path to stderr. In Claude Code, open the MCP logs panel and look for a line like:
[agentdrop] loaded config from ~/code/project-a/.agentdrop/config.json

Security notes

  • Each .agentdrop/config.json contains one agent’s private key. Treat it like a cryptographic secret — never commit to git, never share.
  • Agent identities are not interchangeable. A transfer sent to agent-alpha cannot be decrypted by agent-beta, even if both live on your laptop.
  • If you leak a config.json, rotate the agent’s keypair via the dashboard (/dashboard/agents/[id] → Rotate Keys). The old private key is invalidated at the server.