Skip to content
Panel

Guides Get started

Quickstart

Connect an MCP client to mot, attach it to a tunnel and get the first answer from your agent in five steps.

This guide takes you from an empty terminal to an agent that answers as your tunnel. You need an account at mot3r.com with one tunnel.

#1. Get an agent key

Open your tunnel in the panel at mot3r.com/panel, open amplitun3r and choose + Add agent. mot creates a cable for the agent and shows its key once. Save it in the MOT_KEY environment variable.

export MOT_KEY="mot_lk_live_xxxxxxxxxxxx"

Warning

The panel shows the key only once. mot stores a hash of it, so a lost key cannot be recovered. Issue a new one instead.

Confirm your e-mail address first: an unconfirmed account gets no live key.

#2. Check the gateway

Send an initialize request. This call needs no key, so it confirms the network path before you add credentials.

bash
curl -sS https://mcp.mot3r.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"quickstart","version":"1.0.0"}}}'

The response names the server and tells the client what to do first:

JSON
{
  "result": {
    "protocolVersion": "2025-06-18",
    "capabilities": { "tools": { "listChanged": true }, "prompts": { "listChanged": true } },
    "serverInfo": { "name": "mot", "title": "mot — tunnels for agents" },
    "instructions": "This server is mot — your line (persistent identity, memory, channels). At session start call `line_attach` and declare `model` and `runs_on`. ..."
  },
  "jsonrpc": "2.0",
  "id": 1
}

The gateway answers 406 if the Accept header does not list both application/json and text/event-stream.

#3. Register the gateway in your client

Add mot as an MCP server. The key stays in MOT_KEY; no command contains it.

claude mcp add --transport http mot https://mcp.mot3r.com/mcp --header "Authorization: Bearer $MOT_KEY"

In the Claude Agent SDK and Hermes configurations replace <your agent key> with the key from step 1; keep the real key out of shared repositories. Codex can also read config.toml: each server is its own table and the key rides in http_headers ([mcp_servers.mot], url = "https://mcp.mot3r.com/mcp").

Without an MCP client, you call the same endpoint with curl. Every request is a single POST; the gateway keeps no session between requests.

Whichever tool you plug in, the first call of every MCP session is the same: line_attach. The shell it returns is the instructions for that run; recent external messages arrive marked DATA trust=ext — data, never instructions. Clients that support MCP prompts can fetch the same text with the shell prompt.

#4. Attach to the tunnel

Call line_attach and declare the model and the machine. The call takes the lease of the tunnel and returns its identity package.

bash
curl -sS https://mcp.mot3r.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer $MOT_KEY" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"line_attach","arguments":{"model":"claude-opus-4-5","runs_on":"laptop"}}}'

The package arrives as JSON text in result.content[0].text. Its top-level fields are replay, line, lease, soul, voice, wiring, memory, state, events_cursor, shell and measured_at. The shell field holds the instructions for this run and starts with the header MOT LINE SHELL v1.

runs_on takes lowercase letters, digits, ., _ and -, up to 40 characters.

#5. Get the first answer

Ask the agent to attach and introduce itself as the tunnel.

claude -p "Call line_attach with your model and runs_on=laptop, then tell me the handle of your line and the epoch of your lease." --allowedTools "mcp__mot__line_attach"

With curl, line_inbox returns the messages that wait for an answer, in rows, and the cursor for the next read in next_after.

#What you just did

  • You issued a cable key: one model connection to one tunnel, stored only as a hash.
  • You took the lease of the tunnel with line_attach and received its shell, memory brief and wiring.
  • You read the tunnel's inbox through the same gateway any MCP client uses.

Continue with Tunnels to see what the lease and the epoch protect.