Skip to main content
Back to the Mercury MCP server

MCP Gateway · Cursor

Mercury icon

Connect Mercury to Cursor

Billing and bookkeeping code is easier to get right when the editor can see real records. Through the Speakeasy MCP Gateway, Cursor reads Mercury invoices, customers and Books journal entries while you write the code that handles them. Cursor hooks check each prompt and tool call with Speakeasy first and fail closed.

Category
Sales & CRM
Tools
34
Authentication
OAuth
Cursor
Editor and terminal

Behind the MCP Gateway

Run Mercury MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every Mercury call inspected and logged.

Deploy on MCP Gateway

Set up

Add Mercury to Cursor in 4 steps

  1. 01

    Add Mercury from the catalog

    An admin finds Mercury in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    Mercury uses OAuth. Servers that support dynamic client registration get their OAuth configuration applied automatically.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use Mercury

    Give teams the mcp:connect scope on the Mercury server through team access or a role. The organization gateway works out each person's servers from their live access, so granting access adds Mercury to their gateway on the next call, and removing it takes it away.

  3. 03

    Connect Cursor

    Add the gateway to Cursor in one click from the Organization Gateway page.

    On the Organization Gateway page in Speakeasy, choose Cursor under Install.

    Click Add to Cursor to add the gateway to Cursor's MCP settings, then sign in when Cursor prompts you.

  4. 04

    Sign in and use Mercury from Cursor

    The first time Cursor connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    Mercury needs its own OAuth grant, so each person connects it once. Until they do, Mercury calls fail while the rest of the gateway keeps working.

    From then on, Mercury's tools appear in Cursor, limited to what the person's access allows, and every call lands in the gateway's tool logs.

For a whole team, a Cursor team admin imports the plugin marketplace under Settings > Plugins > Import and turns on Serve Marketplace From Cursor, so members install without GitHub access.

Use cases

What Cursor users do with Mercury

Build an invoice sync on real fields

Have Cursor read a few Mercury invoices and their attachments, then write the types and mapping code your sync needs to match their actual shape.

listInvoicesgetInvoicelistInvoiceAttachments

Match customers across systems

When you link Mercury customers to accounts in your own product, Cursor pulls customer records so you can test the matching logic against real names and IDs.

listCustomersgetCustomer

Work with Books journal entries

Building on Mercury Books? Cursor lists journal entries and opens one in full, so the code that reads or reports on them is written against a real entry.

getBooksJournalEntriesgetBooksJournalEntry

Tools

34 tools

Each Mercury tool can be allowed or denied per team and role at the MCP Gateway before Cursor sees it.

getAccount

Get account by ID

getAccountCards

Retrieve all debit and credit cards associated with a specific account.

getAccountStatements

Retrieve a paginated list of monthly statements for a specific account. Supports cursor-based pagination with limit, order, start_after, and end_before query parameters, as well as date range filtering with start and end parameters.

getTransaction

Get transaction by ID

getAccounts

Retrieve a paginated list of accounts. Supports cursor-based pagination with limit, order, start_after, and end_before query parameters.

getAttachment

Retrieve attachment details including download URL

See all 34 tools

Control

What Speakeasy can see and stop in Cursor

The gateway covers every client the same way. The rest depends on what Cursor exposes to Speakeasy.

Tool logs

Gateway

Every Mercury call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the Mercury tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to Mercury can reject a tool request before it reaches the server, or withhold a result from Cursor. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

Cursor

Cursor hooks send each prompt and tool call to Speakeasy, which allows or denies it before Cursor runs it, and fail closed.

User attribution

Cursor

Every Cursor hook event carries the user's email.

Budgets

Cursor

Spend limits can block Cursor traffic once a budget is reached. Connect the Cursor Admin API for dollar spend.

Device agent and MDM

Cursor

The device agent installs the marketplace and plugins and reapplies them every minute.

  • Cursor Cloud agents need a checked-in .cursor/hooks.json. Session and MCP-specific hooks don't run there.
  • After a plugin update, members run Developer: Reload Window.

Questions

Frequently asked questions

Does Cursor ever hold a Mercury credential?
No. Each session signs in through your identity provider with OAuth 2.1, and agents never hold a Mercury credential. Access ends when the employee leaves the directory.
Can Cursor's Mercury usage count toward a budget?
Spend limits can block Cursor traffic once a budget is reached. To track dollar spend, connect the Cursor Admin API.
How do Cursor users get Mercury?
An admin adds Mercury from the Speakeasy MCP Catalog and grants access by team or role. Add the gateway to Cursor in one click from the Organization Gateway page. Each person then sees only the Mercury tools their access allows.
Are Mercury calls from Cursor logged?
Yes. Mercury calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

Mercury in other clients

AI everywhere.

Control here.