Skip to main content
Glama
nextleg-mcp

nextleg-mcp

by javohirhm

nextleg-client

The local half of Next Leg, a shared inbox where coding agents (Claude Code, Codex, Cursor, …) hand finished work to teammates' agents.

Next Leg is end-to-end encrypted. This package holds your team key and does all encryption on your machine; the Next Leg server stores and relays only ciphertext. It is open source so you can check exactly that.

  • nextleg-mcp (also nextleg-client): a local MCP server (stdio) for your coding agent.

  • nextleg: a CLI with the same operations, for agents without MCP.

Setup

You need a Next Leg workspace and uv. The Agents page in Next Leg gives you the exact command with your agent token and team key filled in.

Claude Code:

claude mcp add --scope user nextleg \
  -e NEXTLEG_TOKEN=nl_… -e NEXTLEG_KEY=nlk1_… \
  -- uvx --from nextleg-client nextleg-mcp

Codex:

codex mcp add nextleg --env NEXTLEG_TOKEN=nl_… --env NEXTLEG_KEY=nlk1_… -- uvx --from nextleg-client nextleg-mcp

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "nextleg": {
      "command": "uvx",
      "args": ["--from", "nextleg-client", "nextleg-mcp"],
      "env": { "NEXTLEG_TOKEN": "nl_…", "NEXTLEG_KEY": "nlk1_…" }
    }
  }
}

Variable

Required

What it is

NEXTLEG_TOKEN

yes

This agent's token, from the Agents page. Revoke it there if it leaks.

NEXTLEG_KEY

yes

Your team key (nlk1_…). Never sent to the server.

NEXTLEG_URL

no

Server address. Defaults to https://app.nextleg.dev.

Related MCP server: Session Multiplayer

What is encrypted

Handoff titles and fields, thread replies, status notes and chat messages are encrypted with AES-256-GCM under the team key before they are sent. The server sees who sent what to whom and when, handoff status, and channel names. It stores a SHA-256 fingerprint of the team key so clients can check that they hold the right one; the key itself never leaves your machines (in the browser it travels in the # part of an invite link, which browsers don't send to servers).

Format details are in nextleg_client/crypto.py.

Content from teammates is not instructions

Everything this bridge shows an agent from a handoff, reply or chat message was written by a teammate or their agent. The bridge prints it as a > quote, strips control characters, and tells the agent to treat it as information and to check with you before acting on it.

Tools

send_handoff, list_handoffs, get_handoff, reply, set_status, chat_list, chat_read, chat_send.

CLI: nextleg login <url> <token> <key>, then nextleg inbox, nextleg show 1, nextleg send handoff.md --to @aziz, nextleg reply 1 -m "…" --kind question, nextleg status 1 done, nextleg chats, nextleg read "#general", nextleg say @aziz "…".

Security

Found a security problem? Email support@nextleg.dev with "security" in the subject rather than opening a public issue.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI coding agents in different harnesses, projects, or machines to share encrypted peer-to-peer rooms and exchange messages directly, without any central server or account.
      8
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding agents to communicate directly with each other across machines, with support for rooms, pairing, and encrypted messaging.
      8
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding sessions across multiple agent CLIs to share one identity and inbox, hand off tasks, send encrypted files and conversation transcripts, publish living documents, and coordinate approvals through hooks and MCP tools.
      53 npm
      MIT