MCP Server for AI Agent Integration

    Connect any MCP-compatible AI client to URBLD

    URBLD ships a production MCP (Model Context Protocol) server with OAuth 2.1, dynamic client registration, and tenant-isolated tool execution. Point ChatGPT, Claude Desktop, Cursor, or any MCP client at the endpoint and your users can act on URBLD data as themselves.

    What is URBLD's MCP endpoint?

    The URBLD MCP server is live at https://gdupthkvjnqtlqimcgtg.supabase.co/functions/v1/mcp. It advertises OAuth 2.1 protected-resource metadata, supports dynamic client registration, and exposes read-only tools today (whoami, list_leads, list_jobs) scoped to the signed-in user's organization by row-level security.

    Endpoint

    Point your MCP client at the URL below. All operations are Streamable HTTP; the server exposes OAuth 2.1 protected-resource metadata at the well-known path so compatible clients can discover the authorization server automatically.

    MCP endpoint
    https://gdupthkvjnqtlqimcgtg.supabase.co/functions/v1/mcp

    Authentication

    URBLD delegates OAuth to its Supabase authorization server. The MCP function acts as the resource server — it verifies bearer tokens issued by the URBLD authorization server and rejects anything else. Dynamic client registration is enabled, so ChatGPT, Claude, and Cursor can self-register the first time a user connects.

    OAuth metadata
    Issuer:          https://gdupthkvjnqtlqimcgtg.supabase.co/auth/v1
    Discovery:       /.well-known/oauth-authorization-server
    Grant types:     authorization_code (PKCE required)
    Dynamic reg:     supported (RFC 7591)
    Consent URL:     https://urbld.com/.lovable/oauth/consent

    Connect from Claude Desktop

    1. Open Claude Desktop → Settings → Connectors.
    2. Click Add custom connector.
    3. Paste the URBLD MCP URL: https://gdupthkvjnqtlqimcgtg.supabase.co/functions/v1/mcp.
    4. Claude opens the URBLD consent screen in your browser. Sign in and approve.
    5. Ask Claude: "Use URBLD to tell me who I am and list my last 5 leads."

    Connect from ChatGPT

    1. Open ChatGPT and go to the connectors settings for your workspace.
    2. Add a new MCP connector with the URBLD endpoint above.
    3. Complete the OAuth handshake — ChatGPT self-registers as a dynamic client.
    4. Approve the requested tools on the URBLD consent page.

    Connect from Cursor

    1. Open Cursor → Settings → MCP.
    2. Add a server with the URBLD MCP URL.
    3. Sign in to URBLD and approve access when Cursor opens the consent page.

    Available tools

    Today's read-only tools:

    • whoami — return the signed-in user's identity and organization memberships.
    • list_leads — recent leads in the user's organization; supports limit and status.
    • list_jobs — recent jobs in the user's organization; supports limit and status.

    Write tools (create lead, update customer, start follow-up, schedule job, send contract, record payment) are rolling out with per-tool audit logging and OAuth-scope gating. See the AI Agents guide for the authorization model.

    Tenant isolation

    Every tool call runs a Supabase client with the caller's verified access token in theAuthorization header, so PostgREST executes queries under row-level security as that user. Cross-tenant access is impossible — there is no service-role bypass in tool code.

    Test the connection with curl

    After completing an OAuth flow you can hand-test with a bearer token. This is useful for debugging clients that don't surface protocol errors clearly.

    curl
    curl -X POST https://gdupthkvjnqtlqimcgtg.supabase.co/functions/v1/mcp \
      -H "Authorization: Bearer $URBLD_ACCESS_TOKEN" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

    Consent screen

    URBLD's consent page is hosted at /.lovable/oauth/consent. It shows the client name, the redirect URI the client registered, and the requested scopes. Users can approve or deny; either choice is recorded and returns the user to the client's callback.

    Related

    FAQ

    Frequently Asked Questions

    Straight answers about how URBLD runs the business end-to-end.