Back

    Buyamia Directory API

    v1.1.0

    MCP Server (directory-mcp)

    A Model Context Protocol server exposing the directory as tools for AI runtimes (Claude, ChatGPT, Cursor, n8n AI agents). It speaks MCP Streamable HTTP and is a separate function from the REST API.

    Endpointtext
    https://rjpxllsycikfabazvkdh.supabase.co/functions/v1/directory-mcp

    MCP Streamable HTTP requires Accept: application/json, text/event-stream on every POST. Without it a compliant server answers 406 Not Acceptable.

    Tools

    ToolDoesKey inputs
    search_suppliersSemantic (AI vector) or keyword supplier search.query (required), category_id, region_id, limit (1–50, default 10), use_semantic (default true)
    get_business_detailFull business record plus supplier performance summary.business id / slug
    get_product_catalogProducts for a business, same shape as the REST catalog.business id, paging
    get_rfq_statusRFQ state and supplier quote progress.RFQ id
    get_category_treeCategory taxonomy for grounding queries.optional parent

    Product results use the same product_pricing_tiers field name as the REST API, so a model or mapper written against one surface works on the other.

    REST, Agent Gateway, or MCP?

    UseWhen
    REST /v1/*Deterministic application code: syncs, RFQ pushes, dashboards. Full endpoint coverage.
    Agent GatewayOne-shot natural-language questions from your own backend, over HTTP.
    MCP serverAn AI runtime that should discover and call directory tools itself during a conversation.

    MCP exposes a curated subset of the data — there is no write path, no RFQ creation and no webhook management. Anything transactional goes through the REST API.

    Current as of API 1.1.0 — released 7 September 2026