# How to integrate Mercury MCP MCP with Codex

```json
{
  "title": "How to integrate Mercury MCP MCP with Codex",
  "toolkit": "Mercury MCP",
  "toolkit_slug": "mercury_mcp",
  "framework": "Codex",
  "framework_slug": "codex",
  "url": "https://composio.dev/toolkits/mercury_mcp/framework/codex",
  "markdown_url": "https://composio.dev/toolkits/mercury_mcp/framework/codex.md",
  "updated_at": "2026-06-18T09:41:42.133Z"
}
```

## Introduction

Codex is one of the most popular coding harnesses out there. And MCP makes the experience even better. With Mercury MCP MCP integration, you can draft, triage, summarise emails, and much more, all without leaving the terminal or the app, whichever you prefer.

## Also integrate Mercury MCP with

- [Claude Cowork](https://composio.dev/toolkits/mercury_mcp/framework/claude-cowork)

## TL;DR

### Why use Composio?
Apart from a managed and hosted MCP server, you will get:
- CodeAct: A dedicated workbench that allows GPT to write its code to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
- Large tool responses: Handle them to minimise context rot.
- Dynamic just-in-time access to 20,000 tools across 1000+ other Apps for cross-app workflows. It loads the tools you need, so GPTs aren't overwhelmed by tools you don't need.

## Connect Mercury MCP to Codex

### How to install Mercury MCP MCP in Codex
### Run the setup command
Run this command in your terminal to add the Composio MCP server to Codex.

```bash
codex mcp add composio --url https://connect.composio.dev/mcp
```

## What is the Mercury MCP MCP server, and what's possible with it?

The Mercury MCP MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Mercury MCP account. It provides structured and secure access so your agent can perform Mercury MCP operations on your behalf.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `MERCURY_MCP_GET_ACCOUNT` | Getaccount | Get account by ID |
| `MERCURY_MCP_GET_ACCOUNT_CARDS` | Getaccountcards | Retrieve all debit and credit cards associated with a specific account. |
| `MERCURY_MCP_GET_ACCOUNTS` | Getaccounts | Retrieve a paginated list of accounts. Supports cursor-based pagination with limit, order, start_after, and end_before query parameters. |
| `MERCURY_MCP_GET_ACCOUNT_STATEMENTS` | 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. |
| `MERCURY_MCP_GET_ATTACHMENT` | Getattachment | Retrieve attachment details including download URL |
| `MERCURY_MCP_GET_CURRENT_DATE` | Getcurrentdate | Get the current date in the format. Example: Fri Oct 31 2025 |
| `MERCURY_MCP_GET_CUSTOMER` | Getcustomer | Retrieve details of a specific customer by their ID |
| `MERCURY_MCP_GET_INVOICE` | Getinvoice | Retrieve details of an invoice by its ID |
| `MERCURY_MCP_GET_ORGANIZATION` | Getorganization | Retrieve information about your organization including EIN, legal business name, and DBAs. |
| `MERCURY_MCP_GET_RECIPIENT` | Getrecipient | Retrieve details of a specific recipient by ID |
| `MERCURY_MCP_GET_RECIPIENTS` | Getrecipients | Retrieve a paginated list of all recipients. Use cursor parameters (start_after, end_before) for pagination. |
| `MERCURY_MCP_GET_SAFE_REQUEST` | Getsaferequest | Retrieve a specific SAFE request by its ID. |
| `MERCURY_MCP_GET_SAFE_REQUESTS` | Getsaferequests | Retrieve all SAFE (Simple Agreement for Future Equity) requests for your organization. |
| `MERCURY_MCP_GET_TRANSACTION` | Gettransaction | Get transaction by ID |
| `MERCURY_MCP_GET_TRANSACTION_BY_ID` | Gettransactionbyid | Retrieve a single transaction by its ID. Returns full transaction details including attachments, check images, and related metadata. |
| `MERCURY_MCP_GET_TREASURY` | Gettreasury | Retrieve a paginated list of all treasury accounts associated with the authenticated organization. Use cursor parameters (start_after, end_before) for pagination. |
| `MERCURY_MCP_GET_TREASURY_STATEMENTS` | Gettreasurystatements | Retrieve a paginated list of statements for a specific treasury account. Supports cursor-based pagination and filtering by document type. |
| `MERCURY_MCP_GET_TREASURY_TRANSACTIONS` | Gettreasurytransactions | Retrieve paginated treasury transactions for a specific treasury account. |
| `MERCURY_MCP_GET_USER` | Getuser | Get user by ID |
| `MERCURY_MCP_GET_USERS` | Getusers | Get all users |
| `MERCURY_MCP_GET_WEBHOOK` | Getwebhook | Retrieve details of a specific webhook endpoint by ID |
| `MERCURY_MCP_GET_WEBHOOKS` | Getwebhooks | Retrieve a paginated list of all webhook endpoints for your organization. Supports filtering by status. |
| `MERCURY_MCP_LIST_CATEGORIES` | Listcategories | Retrieve a paginated list of all available custom expense categories for the organization. Supports cursor-based pagination with limit, order, start_after, and end_before query parameters. - These categories are custom and different from the values for "mercuryCategory". |
| `MERCURY_MCP_LIST_CREDIT` | Listcredit | Retrieve a list of all credit accounts for the organization. |
| `MERCURY_MCP_LIST_CUSTOMERS` | Listcustomers | Retrieve a paginated list of customers. Supports cursor-based pagination with limit, order, start_after, and end_before query parameters. |
| `MERCURY_MCP_LIST_INVOICE_ATTACHMENTS` | Listinvoiceattachments | Retrieve a list of all attachments for a specific invoice |
| `MERCURY_MCP_LIST_INVOICES` | Listinvoices | Retrieve a paginated list of invoices. Supports cursor-based pagination with limit, order, start_after, and end_before query parameters. |
| `MERCURY_MCP_LIST_RECIPIENTS_ATTACHMENTS` | Listrecipientsattachments | Retrieve a paginated list of all recipient tax form attachments across all recipients in the organization. Use cursor parameters (start_after, end_before) for pagination. |
| `MERCURY_MCP_LIST_SEND_MONEY_APPROVAL_REQUESTS` | Listsendmoneyapprovalrequests | Retrieve a paginated list of send money approval requests for the authenticated organization. Supports filtering by account and status. |
| `MERCURY_MCP_LIST_TRANSACTIONS` | Listtransactions | Retrieve a paginated list of all transactions across all accounts. Supports advanced filtering by date ranges, status, categories, and cursor-based pagination. CRITICAL TRUNCATION RULE - READ THIS FIRST: ================================================================================ IF YOU SEE "Result too long" IN THE RESPONSE: 1. IMMEDIATELY STOP - Do not analyze or use the truncated data 2. The data is INCOMPLETE and any analysis will be WRONG 3. Start over with a smaller limit (reduce by 50%) 4. Paginate through ALL pages until you have complete data 5. NEVER provide answers based on truncated results ================================================================================ MANDATORY PAGINATION FOR COMPLETE RESULTS: When a user asks ANY question requiring complete data (totals, balances, aggregates, "most/least", "all transactions", comparisons, or any calculation across transactions): CRITICAL: Incomplete pagination will produce WRONG ANSWERS for questions about totals, spending categories, balances, minimums, maximums, or "most/least". You must fetch everything before calculating or answering. 1. Start with a limit of 300 transactions. 2. You MUST automatically paginate through ALL pages WITHOUT asking the user 3. Continue calling listTransactions using the page.nextPage value from each response 4. Keep fetching until page.nextPage is not present 5. If pagination would take more than 3 tool calls, ask the user to narrow down to a smaller time period 6. It is a CRITICAL ERROR to answer before having fetched ALL pages FILTERING: - IMPORTANT: WHEN FILTERING BY DATE, ALWAYS CHECK THE CURRENT DATE FIRST and ensure you're using the current year for current year queries - Unless specified otherwise or queried for "all transactions", ONLY include transactions with "status: sent" - To get transactions for a specific account, use the accountId parameter to filter by accountId PAGINATION MECHANICS: - Use the limit parameter to control page size - If page.nextPage is returned, use it as the start_after parameter in your next call - Keep fetching until page.nextPage is null/undefined - The page.nextPage value is a transaction ID to start after (exclusive) COMPUTATIONAL REQUIREMENTS: - For any query requiring: - Sums, totals, averages, medians, modes, ranges, most/least, or other aggregations across accounts/transactions - Calculations involving currency amounts - Comparisons of financial metrics - You MUST: - Create an artifact that processes the data programmatically - Parse the JSON response and use JavaScript/Python to calculate - Display intermediate steps for verification - Never rely on mental arithmetic for financial calculations - Example: "What's my total balance?" - CORRECT: Create artifact that parses accounts, maps to balances, uses reduce() to sum - INCORRECT: Manually adding up balance values For queries about 'last two months' or 'this year', calculate dates based on the actual current date Use the getCurrentDate tool to get the current date. Use the getTransaction tool to get more details about a specific transaction. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Mercury MCP MCP server provides comprehensive access to Mercury MCP operations through Composio. Once connected, you can perform all major Mercury MCP actions directly from Codex using natural language commands.

## Complete Code

None listed.

## Conclusion

### Conclusion
You've successfully integrated Mercury MCP with Codex using Composio's MCP server. Now you can interact with Mercury MCP directly from your terminal, VS Code, or the Codex App using natural language commands.
Key benefits of this setup:
- Seamless integration across CLI, VS Code, and standalone app
- Natural language commands for Mercury MCP operations
- Managed authentication through Composio
- Access to 20,000+ tools across 1000+ apps for cross-app workflows
- CodeAct workbench for complex tool chaining
Next steps:
- Try asking Codex to perform various Mercury MCP operations
- Explore cross-app workflows by connecting more toolkits
- Build automation scripts that leverage Codex's AI capabilities

## How to build Mercury MCP MCP Agent with another framework

- [Claude Cowork](https://composio.dev/toolkits/mercury_mcp/framework/claude-cowork)

## Related Toolkits

- [Stripe](https://composio.dev/toolkits/stripe) - Stripe is a global online payments platform offering APIs for managing payments, customers, and subscriptions. Trusted by businesses for secure, efficient, and scalable payment processing worldwide.
- [Alpaca](https://composio.dev/toolkits/alpaca) - Alpaca is a stock and crypto trading platform for commission-free trading, real-time market data, and algorithmic strategies. Use it to build brokerage apps, trading bots, and portfolio workflows with market connectivity.
- [Alpha vantage](https://composio.dev/toolkits/alpha_vantage) - Alpha Vantage is a financial data platform offering real-time and historical stock market APIs. Get instant, reliable access to equities, forex, and technical analysis data for smarter trading decisions.
- [Altoviz](https://composio.dev/toolkits/altoviz) - Altoviz is a cloud-based billing and invoicing platform for businesses. It streamlines online payments, expense tracking, and customizable invoice management.
- [Benzinga](https://composio.dev/toolkits/benzinga) - Benzinga provides real-time financial news and data APIs for market coverage. It helps you track breaking news and actionable market insights instantly.
- [Brex](https://composio.dev/toolkits/brex) - Brex provides corporate credit cards and spend management tailored for startups and tech businesses. It helps optimize company cash flow, streamline accounting, and accelerate business growth.
- [Chaser](https://composio.dev/toolkits/chaser) - Chaser is accounts receivable automation software that sends invoice reminders and helps businesses get paid faster. It streamlines the collections process to save time and improve cash flow.
- [Clientary](https://composio.dev/toolkits/clientary) - Clientary is a platform for managing clients, invoices, projects, proposals, and more. It streamlines client work and saves you serious admin time.
- [Coinbase](https://composio.dev/toolkits/coinbase) - Coinbase is a platform for buying, selling, and storing cryptocurrency. It makes exchanging and managing crypto simple and secure for everyone.
- [Coinranking](https://composio.dev/toolkits/coinranking) - Coinranking is a comprehensive cryptocurrency market data platform offering access to real-time coin prices, market caps, and historical data. Get accurate, up-to-date stats for thousands of digital assets in one place.
- [Coupa](https://composio.dev/toolkits/coupa) - Coupa is a business spend management platform for procurement, invoicing, and expenses. It helps organizations streamline purchasing, control costs, and gain complete visibility over financial operations.
- [CurrencyScoop](https://composio.dev/toolkits/currencyscoop) - CurrencyScoop is a developer-friendly API for real-time and historical currency exchange rates. Easily access fiat and crypto data for smart, up-to-date financial applications.
- [Daffy](https://composio.dev/toolkits/daffy) - Daffy is a modern charitable giving platform with a donor-advised fund. Easily set aside funds, grow them tax-free, and donate to over 1.7 million U.S. charities.
- [Eagle doc](https://composio.dev/toolkits/eagle_doc) - Eagle doc is an AI-powered OCR API for invoices and receipts. It delivers fast, reliable, and accurate document data extraction for seamless automation.
- [Elorus](https://composio.dev/toolkits/elorus) - Elorus is an online invoicing and time-tracking software for freelancers and small businesses. Easily manage finances, bill clients, and track work in one place.
- [Eodhd apis](https://composio.dev/toolkits/eodhd_apis) - Eodhd apis delivers comprehensive financial data, including live and historical stock prices, via robust APIs. Easily access reliable, up-to-date market insights to power your apps, dashboards, and analytics.
- [Fidel api](https://composio.dev/toolkits/fidel_api) - Fidel api is a secure platform for linking payment cards to web and mobile apps. It enables real-time card transaction monitoring and event-based automation for businesses.
- [Finage](https://composio.dev/toolkits/finage) - Finage is a secure API platform delivering real-time and historical financial data for stocks, forex, crypto, indices, and commodities. It empowers developers and businesses to access, analyze, and act on market data instantly.
- [Finmei](https://composio.dev/toolkits/finmei) - Finmei is an invoicing tool that simplifies billing, invoice management, and expense tracking. Ideal for automating and organizing your business finances in one place.
- [Fixer](https://composio.dev/toolkits/fixer) - Fixer is a currency data API offering real-time and historical exchange rates for 170 currencies. Instantly access accurate, up-to-date forex data for your applications and workflows.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Mercury MCP MCP?

With a standalone Mercury MCP MCP server, the agents and LLMs can only access a fixed set of Mercury MCP tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Mercury MCP and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Codex?

Yes, you can. Codex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Mercury MCP tools.

### Can I manage the permissions and scopes for Mercury MCP while using Tool Router?

Yes, absolutely. You can configure which Mercury MCP scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Mercury MCP data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
