{
  "name": "postbot",
  "title": "Postbot",
  "description": "Send real physical letters in the Czech Republic from an AI agent.",
  "version": "0.1.0",
  "homepage": "https://postbot.cz/pro-agenty",
  "icons": [{ "src": "https://postbot.cz/favicon.svg", "mimeType": "image/svg+xml" }],
  "remotes": [{ "type": "streamable-http", "url": "https://postbot.cz/mcp" }],
  "transports": {
    "streamable-http": { "url": "https://postbot.cz/mcp" },
    "stdio": { "command": "npx", "args": ["-y", "@postbotcz/mcp"] }
  },
  "env": [
    "POSTBOT_TEST",
    "POSTBOT_CP_USER",
    "POSTBOT_CP_PASSWD",
    "POSTBOT_FROM_NAME",
    "POSTBOT_FROM_STREET",
    "POSTBOT_FROM_HOUSE",
    "POSTBOT_FROM_CITY",
    "POSTBOT_FROM_ZIP"
  ],
  "authentication": {
    "type": "oauth2",
    "authorization_servers": ["https://postbot.cz"],
    "resource_metadata": "https://postbot.cz/.well-known/oauth-protected-resource/mcp",
    "scopes_supported": ["letters:send", "letters:read"],
    "description": "The /mcp endpoint is an OAuth 2.1 resource server. Interactive clients discover the flow from the 401 WWW-Authenticate header and /.well-known/oauth-protected-resource; dynamic client registration (RFC 7591) is supported. A human approves a consent screen (Google login), and the issued token acts on that account. Headless agents skip OAuth and use the REST endpoint POST /api/send with a funded API key (Authorization: Bearer pb_...). Sending debits prepaid CZK credit; top up at https://postbot.cz/api/topup."
  },
  "tools": [
    {
      "name": "send_letter_cz",
      "description": "Mail a real paper letter in the Czech Republic (ordinary or registered). On /mcp it needs OAuth sign-in with the letters:send scope and debits the account's prepaid CZK credit per send. A pb_ API key does not reach /mcp; it works on REST POST /api/send."
    },
    {
      "name": "get_letter_status",
      "description": "Look up the status of a sent letter by ČP order code. On /mcp it needs OAuth sign-in with the letters:read scope."
    },
    {
      "name": "list_letters",
      "description": "Page through the letters sent from the signed-in account, newest first (cursor pagination, never the letter content). Hosted /mcp only; needs OAuth sign-in with the letters:read scope."
    }
  ]
}
