Skip to main content

MCP server exposing the Sesame human-in-the-loop approval API as an agent tool

Project description

sesame-mcp

An MCP server that exposes Sesame's human-in-the-loop approval API as an agent tool. Drop it into any MCP-capable agent (Claude Desktop, Claude Code, Cursor, etc.) and that agent gains an approval gate it can call before doing anything destructive or sensitive — with zero integration code on your side.

The server talks only to Sesame's public REST contract over stdio. It does not import the broker, core, or CLI packages.

Tool

request_approval(
    action: str,
    summary: str,
    reason: str | None = None,
    timeout_seconds: int = 300,
) -> dict

It triggers an approval (POST /v1/approvals), then long-polls (GET /v1/approvals/{id}?wait=true) until a human decides or timeout_seconds elapses. A human is notified via Telegram + push and must approve or deny.

Returns:

{ "approval_id": "ap_...", "status": "approved" | "denied" | "expired" | "timeout" | "error", "decided": true }

The agent must only proceed with the action when status == "approved".

Configuration

Set SESAME_API_KEY — create one in the Sesame dashboard (API Keys). That's the only thing required; the server reaches the hosted Sesame broker automatically and fails fast at startup if the key is missing.

Self-hosting only: point SESAME_BROKER_URL at your own broker (defaults to https://getsesame.dev).

Install

uv pip install sesame-mcp        # or: pip install sesame-mcp
sesame-mcp                       # runs the stdio server

Register in an MCP client

Claude Code

claude mcp add sesame \
  --env SESAME_API_KEY=sk_live_xxx \
  -- uvx sesame-mcp

SESAME_API_KEY is the only required env var — the server targets the hosted broker by default. Add --env SESAME_BROKER_URL=... only to self-host or hit a local broker.

uvx sesame-mcp downloads and runs the published package on demand — no prior install needed.

Claude Desktop / generic JSON config

Add to your client's mcpServers block (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "sesame": {
      "command": "sesame-mcp",
      "env": {
        "SESAME_API_KEY": "sk_live_xxx"
      }
    }
  }
}

If sesame-mcp is not on the client's PATH, use uvx:

{
  "mcpServers": {
    "sesame": {
      "command": "uvx",
      "args": ["sesame-mcp"],
      "env": { "SESAME_API_KEY": "sk_live_xxx" }
    }
  }
}

Any MCP-capable agent that loads this server gets the approval gate automatically — no SDK calls, no glue code.

Development

uv run --extra dev ruff check .
uv run --extra dev pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sesame_mcp-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sesame_mcp-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file sesame_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: sesame_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sesame_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5b24168c2dc165242e07eecd08f8f76c41c3fba8c1125395800e866e23cb399e
MD5 d8d22b7fd385a10769fca55ceac6c6cd
BLAKE2b-256 008b8bca5be338660e55f5d72ce26668192c035efef1175309849c98f08b5561

See more details on using hashes here.

File details

Details for the file sesame_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sesame_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sesame_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3475faeee0dce8faa36ac863bda64c802e8914e44534a35c645309a02d663f82
MD5 5c308f005ecd9ace20e79c4bbbc638e2
BLAKE2b-256 5c34aef2310c51b2fd26f59fb53b9f54d8949febcf6e153fe32e771687b91d9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page