Skip to main content
Glama
nobrokerhood-mcp

nobrokerhood-mcp

by smtchahal

nobrokerhood-mcp

A CLI and MCP server for pre-approving deliveries and visitors at your gate via the NoBrokerHood resident app — so you (or an LLM on your behalf) can say "let the Zepto guy in" instead of opening the app.

This is an unofficial client. It is not affiliated with or endorsed by NoBrokerHood.

Install

pip install git+https://github.com/smtchahal/nobrokerhood-mcp.git

(Not yet published to PyPI.)

Related MCP server: Property MCP Server

Authentication

There's no OAuth flow — the client authenticates the same way the mobile app does, with a captured session. Proxy the NoBrokerHood app once (e.g. with mitmproxy or Charles Proxy) and pull the following out of a request:

  • NBH_USER_ID, NBH_SOCIETY_ID, NBH_DEVICE_ID — from the userId / societyId / deviceId request headers

  • NBH_REMEMBER_ME, NBH_JSESSIONID — from the remember-me / JSESSIONID cookies

Copy .env.example to .env and fill these in (or export them directly — the client reads plain environment variables, nothing loads .env for you).

These sessions are long-lived but not eternal; if you start getting auth errors, recapture them.

CLI usage

nbh pre-approve zepto --apartment-id <id>
nbh pre-approve dominos --apartment-id <id> --hours 4
nbh pre-approve amazon --apartment-id <id> --out "25/04/2026 23:59" --vehicle TWO_WHEELER
nbh cancel <visit-id> --apartment-id <id>
nbh list --apartment-id <id>
nbh visits --apartment-id <id>
nbh user-info

Run nbh <command> --help for the full flag list. ~100 delivery brands (Zepto, Blinkit, Swiggy, Dominos, Amazon, couriers, home services, ...) have built-in default approval windows — see nobrokerhood.companies.KNOWN_COMPANIES. Unknown brands default to a 1-hour window.

MCP server

Registers six tools: pre_approve, cancel_visit, list_expected, list_visits, get_user_multiprofile_info, known_companies.

Add to your MCP client config (e.g. .mcp.json for Claude Code):

{
  "mcpServers": {
    "nobrokerhood": {
      "command": "nobrokerhood-mcp",
      "env": {
        "NBH_USER_ID": "...",
        "NBH_SOCIETY_ID": "...",
        "NBH_DEVICE_ID": "...",
        "NBH_REMEMBER_ME": "...",
        "NBH_JSESSIONID": "..."
      }
    }
  }
}

This runs the server over stdio with no authorization layer — appropriate for local use, where the MCP client is the only thing that can spawn the process.

Self-hosting over HTTP

If you want to expose this server remotely (e.g. behind a tunnel, for use from claude.ai instead of a local client), nobrokerhood.server exposes a build_server() factory instead of a fixed server instance, so you can bring your own authorization:

from nobrokerhood.server import build_server

mcp = build_server(
    host="0.0.0.0",
    port=8000,
    streamable_http_path="/mcp",
    token_verifier=my_token_verifier,  # implement mcp.server.auth.provider.TokenVerifier
    auth=my_auth_settings,  # mcp.server.auth.settings.AuthSettings
)
mcp.run(transport="streamable-http")

This package intentionally does not ship an authorization implementation — how you authenticate callers to your server is a separate concern from how this client authenticates to NoBrokerHood.

Library usage

from nobrokerhood import NobrokerhoodClient

client = NobrokerhoodClient()  # reads NBH_* env vars
client.pre_approve("Zepto", apartment_id="...")

See nobrokerhood/client.py for the full API (pre_approve, cancel_visit, list_expected, list_visits, register_device, get_user_multiprofile_info, get_home_content).

Development

pip install -e ".[dev]"
pre-commit install
pytest

License

MIT — see LICENSE.

Available Tools

4 tools
cancel_visitA

Cancel a previously pre-approved visit by its visit ID.

Use this when the user wants to cancel a delivery approval they no longer need. The visit_id is at response["data"][0] from the pre_approve call.

Call get_user_multiprofile_info first to obtain the apartment_id if not already known; skip if the user explicitly provided it.

Args: visit_id: The visit ID string returned when the visit was created. apartment_id: The apartment ID the visit belongs to. Fetch from get_user_multiprofile_info → data.apartments.apartment.id. fields: Dot-notation paths to filter the response. Omit to return everything.

Returns the raw API response dict on success.

Inputs: visit_id (required), apartment_id (required), fields.

get_user_multiprofile_infoA

Fetch the authenticated user's multiprofile information.

Use this when the user asks about their profile, apartments, family members, society details, or pass codes: "what apartments do I have?", "show my profile", "who are my family members?", "what's my pass code?", "which societies am I in?".

Also use this FIRST whenever another tool needs an apartment_id — unless the user explicitly provided the apartment_id, in which case use it directly. Call with fields=["data.apartments.apartment.id", "data.apartments.apartment.name", "data.apartments.apartment.displayName", "data.apartments.apartment.buildingName"] to identify the right apartment before proceeding. If exactly one apartment is returned, use its ID immediately without asking the user to confirm. If multiple apartments are returned, match the user's input against all of: name (full apartment name), displayName (short label), and buildingName (tower/block name) — the user may refer to any of these.

Args: fields: Dot-notation paths to include in the response. Always specify fields to avoid fetching the full profile (which includes family, notification settings, and other data rarely needed). Omit only if the user explicitly asks for their complete profile information. Examples: - ["data.apartments.apartment.id", "data.apartments.apartment.name", "data.apartments.apartment.displayName", "data.apartments.apartment.buildingName"] → compact apartment list for matching and obtaining an apartment_id - ["data.user.person.name", "data.user.person.phone"] → just the primary user's contact info - ["data.passCodes"] → just the pass codes map

Returns the raw API response dict containing:

  • user: primary user details (name, email, phone, photo)

  • family: list of family members registered under the account

  • apartments: all apartments the user has access to, each with apartment details, area/block info, society info, ownership type (OWNER/TENANT), and residency tag

  • passCodes: map of apartmentId → entry pass code

  • notifcationSettings: all notification toggle states

  • hasMultipleProfile: whether the user has profiles across multiple apartments

Inputs: fields.

list_expectedA

List pre-approved deliveries that are currently pending arrival.

These are the user's active pre-approvals at their apartment.

Use this when the user asks about pre-approved deliveries that haven't arrived yet: "what have I pre-approved?", "show my pending deliveries", "what deliveries am I expecting?", "did I approve anything?", "list my approvals". Do NOT use for historical/past gate activity — use list_visits for that.

Call get_user_multiprofile_info first to obtain the apartment_id if not already known; skip if the user explicitly provided it.

Args: apartment_id: The apartment ID to list visits for. Fetch from get_user_multiprofile_info → data.apartments.apartment.id. page: Page number, 1-indexed. Default 1. page_size: Number of results per page. Default 5. sort_order: "asc" (soonest first, default) or "desc" (latest first). fields: Dot-notation paths to filter the response. Omit to return everything.

Returns the raw API response dict containing a list of pre-approved visits awaiting arrival, each with a visit ID, company name, and time window.

Inputs: apartment_id (required), page, fields, page_size, +1 more.

list_visitsA

List current, past (expired), and denied visits for an apartment.

Use this when the user asks about gate activity (current, historical, or denied): "who's at the gate?", "who came today?", "show past visitors", "any denied entries?", "who visited recently?", "what deliveries came in?", "what deliveries are coming today?". Do NOT use for pending pre-approvals that haven't arrived — use list_expected for that.

Returns all categories in one call. Each category is a separate list:

  • data.current: visitors presently at the gate (checked in, not yet out)

  • data.expired: completed past visits (checked in and checked out)

  • data.denied: entry attempts that were denied at the gate

  • data.pending: pre-approved visits not yet arrived (overlaps with list_expected)

Each visit entry includes: company, visitor name/phone, inTime, outTime, gate name, approvedBy, approvalType, visitorType, and approval status. Company is at the top-level company field and also at visitorProfile.company.

Call get_user_multiprofile_info first to obtain the apartment_id if not already known. Skip if the user explicitly provided it.

Args: apartment_id: The apartment ID to list visits for. Fetch from get_user_multiprofile_info → data.apartments.apartment.id. page: Page number, 1-indexed. Default 1. Applies to all lists. page_size: Number of results per page. Default 10. fields: Dot-notation paths to filter the response. Strongly recommended — omitting returns all four categories with full visitor data, which is large. Use fields to fetch only what the query needs: ["data.current"] → who's at the gate right now ["data.expired"] → today's completed visits ["data.current", "data.expired"] → active + past visits ["data.expired.company", "data.expired.inTime"] → company + entry time ["data.currentTotal", "data.expiredTotal", "data.deniedTotal"] → counts only Omit only if the user explicitly wants everything.

Returns the raw API response dict.

Inputs: apartment_id (required), page, fields, page_size.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a distinct purpose: cancel a visit, list pending pre-approvals, list all visits, and fetch user profile. Overlap between list_expected and list_visits is explicitly addressed in the descriptions, so no ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case: cancel_visit, list_expected, list_visits, get_user_multiprofile_info. The naming is uniform and predictable.

    Tool Count5/5

    With 4 tools, the server is scoped appropriately for managing pre-approved deliveries and apartment visits. Each tool serves a necessary function without unnecessary bloat.

    Completeness4/5

    The tool set covers core operations: fetch profile, list pending, list all visits, and cancel. Minor gaps like a single-visit detail tool or search functionality are acceptable for the focused domain.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables automated trading on Kotak Neo from AI environments with secure credential vault, TOTP generation, and smart order commands.
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to operate property management systems via natural language, covering repair orders, owner info, payments, notices, and inspections. Features a full agentic workflow with human-in-the-loop and observability.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLM clients to securely read and write Frappe/ERPNext data under a real user's permissions, with audited calls and granular access control.
      1
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to manage residential move-in and move-out workflows by evaluating society bylaws, reserving service elevators, verifying dues and owner approvals, issuing and validating digital gate passes with OTPs, and syncing resident occupancy directories through role-based tools.
      MIT