> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualentry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server: Connect AI Assistants to DualEntry

> Connect Cursor, Claude, VS Code, and any MCP-compatible AI client to your DualEntry accounting data with a one-click button or copy-paste config.

DualEntry provides a [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server: a standardized interface that lets any compatible AI assistant or agent access your accounting data securely. Connect an MCP-compatible client and ask questions about your records, accounts, vendors, and customers in natural language.

The server is remote and hosted by DualEntry. You do not install anything locally. Point your client at one URL and sign in with your DualEntry credentials.

| Property       | Value                                    |
| -------------- | ---------------------------------------- |
| Server URL     | `https://api.dualentry.com/mcp/`         |
| Transport      | Streamable HTTP                          |
| Authentication | OAuth 2.1 (browser sign-in, no API keys) |

<Note>
  Your MCP permissions match your DualEntry role. If you cannot see something in the dashboard, you cannot see it through MCP either.
</Note>

***

## Add to Cursor

Click the button below to install the DualEntry MCP server in Cursor with one click. Cursor opens an install prompt, then a browser window to sign in with your DualEntry credentials.

<a href="cursor://anysphere.cursor-deeplink/mcp/install?name=dualentry&config=eyJ1cmwiOiJodHRwczovL2FwaS5kdWFsZW50cnkuY29tL21jcC8ifQ==">
  <img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Add DualEntry MCP server to Cursor" height="32" />
</a>

<Info>
  If the button does not open Cursor, make sure Cursor is installed and up to date, then use the [Cursor](#cursor) tab below to add the server manually.
</Info>

***

## Client setup

Pick your client below. Each tab includes a copy-paste-ready configuration. Every client connects to the same server URL and uses the same browser-based sign-in.

<Tabs>
  <Tab title="Cursor">
    **One-click:** use the [Add to Cursor](#add-to-cursor) button above.

    **Manual:** open **Cursor Settings > MCP > Add new MCP server**, or add the server to your `mcp.json` file:

    ```json theme={null}
    {
      "mcpServers": {
        "dualentry": {
          "url": "https://api.dualentry.com/mcp/"
        }
      }
    }
    ```

    After saving, Cursor opens a browser window to sign in with your DualEntry credentials.
  </Tab>

  <Tab title="Claude.ai">
    1. Open [claude.ai](https://claude.ai) and go to **Settings > Connectors**.
    2. Click **Add custom connector**.
    3. Enter the URL: `https://api.dualentry.com/mcp/`
    4. Click **Add**.
    5. Complete the authentication prompt in your browser.

    <Info>
      Custom connectors require a Claude Pro, Max, Team, or Enterprise plan. On **Team and Enterprise** plans, only workspace Owners can add connectors (via **Organization Settings > Connectors**). Members can then enable and authenticate with connectors that an Owner has added.
    </Info>
  </Tab>

  <Tab title="Claude Code">
    Add the server from your terminal:

    ```bash theme={null}
    claude mcp add --transport http dualentry https://api.dualentry.com/mcp/
    ```

    The first time you use a DualEntry tool, Claude Code opens a browser window for sign-in.
  </Tab>

  <Tab title="VS Code">
    VS Code (with GitHub Copilot) supports remote MCP servers. Add the server to your `.vscode/mcp.json` file:

    ```json theme={null}
    {
      "servers": {
        "dualentry": {
          "type": "http",
          "url": "https://api.dualentry.com/mcp/"
        }
      }
    }
    ```

    Reload the window, then start the server from the **MCP: List Servers** command. VS Code opens a browser window to authenticate.
  </Tab>

  <Tab title="OpenAI Codex">
    Connect the server from the Codex CLI:

    ```bash theme={null}
    codex --mcp-server https://api.dualentry.com/mcp/
    ```

    Codex opens a browser window for sign-in on first connection.
  </Tab>

  <Tab title="Other clients">
    Any MCP client that supports Streamable HTTP transport and OAuth 2.1 can connect using the server URL:

    ```text theme={null}
    https://api.dualentry.com/mcp/
    ```

    Refer to your client's documentation for how to add a remote MCP server. When you connect for the first time, your client opens a browser window for you to sign in with your DualEntry credentials.
  </Tab>
</Tabs>

***

## Authentication

No API keys are needed. You sign in with the same DualEntry credentials you use for the dashboard.

* On first connection, your MCP client opens a browser for login.
* Sessions refresh automatically.
* Your permissions match your DualEntry role. If you cannot see something in the dashboard, you cannot see it through MCP either.

***

## Available tools

Tools respect your organization's permissions and company-level access restrictions.

### Record retrieval

| Tool                          | Description                                                                                                                                                            |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_records`              | Search for accounting records with filters (type, vendor/customer name, date range, amount range). Supports pagination with `offset` and `limit` (max 1,000 per page). |
| `get_record_detail`           | Get full details for a specific record by its transaction ID.                                                                                                          |
| `get_record_by_number`        | Look up a record by its number (e.g., `JE-123`, `BI-456`, `IN-789`).                                                                                                   |
| `get_record_history`          | Get the audit trail for a specific record.                                                                                                                             |
| `get_related_records`         | Find records related to a given record (e.g., payments linked to an invoice).                                                                                          |
| `get_record_schema`           | Get the field schema for a record type (bill, invoice, journal\_entry, etc.).                                                                                          |
| `list_supported_transactions` | List all supported record types and whether they support creation.                                                                                                     |

### Entity search

| Tool              | Description                                                                                                                                                                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_entities` | Search for entities (vendors, customers, accounts, companies, items, classifications, terms) by name. Supports pagination with `offset` and `limit`. Returns ID, name, and type-specific fields (e.g., account number, currency, email). |

### Record & entity creation

| Tool                  | Description                                                                               |
| --------------------- | ----------------------------------------------------------------------------------------- |
| `create_draft_record` | Create a draft accounting record for review. Does not save to database.                   |
| `validate_record`     | Validate record data before saving (checks required fields, entity existence, balancing). |
| `save_record`         | Save a new accounting record to the database.                                             |
| `create_draft_entity` | Create a draft entity (vendor, customer, etc.) for review. Does not save to database.     |
| `save_entity`         | Save a new entity to the database.                                                        |

***

## Example conversations

Once connected, you can ask your AI assistant questions like:

* *"Show me all invoices from last month over \$5,000"*
* *"Look up journal entry JE-412 and show me its line items"*
* *"What payments are linked to invoice IN-1089?"*
* *"Search for vendors matching 'Acme'"*
* *"Create a bill for vendor Acme Corp, \$500 for office supplies"*

***

## Permissions

MCP access is governed by your DualEntry role. Tools check permissions before returning data:

| Permission Required   | Tools                                                                                                                                                          |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Transactions**      | `search_records`, `get_record_detail`, `get_record_by_number`, `get_record_history`, `get_related_records`, `get_record_schema`, `list_supported_transactions` |
| **Record Creation**   | `create_draft_record`, `validate_record`, `save_record` (per record type)                                                                                      |
| **Chart of Accounts** | `search_entities` (account)                                                                                                                                    |
| **Companies**         | `search_entities` (company)                                                                                                                                    |
| **Customers**         | `search_entities` (customer)                                                                                                                                   |
| **Vendors**           | `search_entities` (vendor)                                                                                                                                     |
| **Items**             | `search_entities` (item)                                                                                                                                       |
| **Classifications**   | `search_entities` (classification)                                                                                                                             |
| **Terms**             | `search_entities` (term)                                                                                                                                       |
| **Entity Creation**   | `create_draft_entity`, `save_entity` (per entity type)                                                                                                         |

If you lack a required permission, the tool returns a "Permission denied" message.

***

## Troubleshooting

### General

| Issue                              | Solution                                                                                                    |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| "Permission denied" on a tool      | Your DualEntry role does not include the required permission. Ask your administrator to update your access. |
| Stale data after permission change | Sign out and back in to apply changes immediately.                                                          |

### Cursor

| Issue                               | Solution                                                                                                  |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------- |
| "Add to Cursor" button does nothing | Confirm Cursor is installed and up to date, then add the server manually using the [Cursor](#cursor) tab. |
| Server shows as disconnected        | Open **Cursor Settings > MCP** and toggle the server off and on to retrigger the browser sign-in.         |

### Claude

| Issue                   | Solution                                                                                                                         |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Connector not available | Custom connectors require a Claude Pro, Max, Team, or Enterprise plan. On Team/Enterprise plans, only Owners can add connectors. |

### Custom MCP clients

These issues apply when connecting via third-party clients that use OAuth 2.1 to authenticate with the MCP server.

| Issue                        | Solution                                                                                                                                    |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Login window does not appear | Your client must support OAuth 2.1-based MCP servers. Update to the latest version and verify OAuth support in your client's documentation. |
| Connection timeout           | Verify the MCP URL (`https://api.dualentry.com/mcp/`) is correct and that you can reach `api.dualentry.com` from your network.              |

***

## Related

* [Authentication](./authentication): how DualEntry secures API and MCP access.
* [DualEntry Public API](./index): the REST API behind the same accounting data.
