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

# MCP Server

> Setup the Flowglad MCP Server

This guide will show you how to setup the Flowglad MCP server.

<Note>
  Some AI tools don't allow the use of remote MCP servers. While Flowglad only
  has a remote MCP server, we detail a simple workaround below.
</Note>

<Info>
  You'll need a Flowglad API key to authenticate to the MCP server which you can
  get from [settings](https://app.flowglad.com/settings).
</Info>

## Remote Server Setup

The Flowglad MCP server can be found at the following URL:

```bash theme={null}
https://app.flowglad.com/api/mcp
```

<AccordionGroup>
  <Accordion title="Cursor" icon="https://mintcdn.com/flowglad/3nFx-hKFSZZP8--F/images/cursor-light.svg?fit=max&auto=format&n=3nFx-hKFSZZP8--F&q=85&s=47d7214123d05cb8961be8a794501924" width="467" height="532" data-path="images/cursor-light.svg">
    Open Cursor's `mcp.json` file through the command palette with <kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> or through Cursor Settings > Tools & MCP and paste in the following under `mcpServers`. Make sure to replace `<FLOWGLAD_API_KEY>` with your Flowglad API key.

    ```json mcp.json theme={null}
    {
      "mcpServers": {
        "flowglad": {
          "url": "https://app.flowglad.com/api/mcp",
            "headers": {
              "Authorization": "Bearer <FLOWGLAD_API_KEY>"
            }
          }
      }
    }
    ```
  </Accordion>

  <Accordion title="Claude Code" icon="https://mintcdn.com/flowglad/3nFx-hKFSZZP8--F/images/claude.svg?fit=max&auto=format&n=3nFx-hKFSZZP8--F&q=85&s=19a85083f4cc6b9269be91f76d5afbee" width="1200" height="1200" data-path="images/claude.svg">
    Run the following command (make sure to replace `<FLOWGLAD_API_KEY> with your API key`):

    ```bash theme={null}
    claude mcp add --transport http flowglad https://app.flowglad.com/api/mcp --header "Authorization: Bearer <FLOWGLAD_API_KEY>"
    ```

    You can check that this worked by first running `claude`, to open Claude Code, and then use the `/mcp` command to see a list of MCP servers that Claude Code has access to, which should now include Flowglad's.
  </Accordion>
</AccordionGroup>

## Local Server Workaround

This workaround uses [mcp-proxy](https://github.com/sparfenyuk/mcp-proxy) to allow tools that prohibit the use of remote MCP servers, like Claude Desktop, to utilize Flowglad's remote MCP server.

### 1. Install mcp-proxy

First, you'll need to install either [uv](https://docs.astral.sh/uv/getting-started/installation/) or [pipx](https://github.com/pypa/pipx?tab=readme-ov-file#install-pipx) which are package managers for Python if you don't have them installed already.

After you have one installed, you can find the `mcp-proxy` installation documentation [here](https://github.com/sparfenyuk/mcp-proxy?tab=readme-ov-file#installation).

After you've installed `mcp-proxy`, run `which mcp-proxy` to print the path of the `mcp-proxy` binary and copy it. We'll need this path in the following steps.

### 2. Add MCP Config to Your Tool

**Here**'s an example of a Claude Desktop config using this workaround. You can edit this config under Settings > Developer

<Note>Make sure to replace `<MCP_PROXY_PATH>` with the path you got from running `which mcp-proxy` above and `<FLOWGLAD_API_KEY>` with your Flowglad API key.</Note>

```json theme={null}
{
  "mcpServers": {
    "flowglad": {
      "command": "<MCP_PROXY_PATH>",
      "args": [
        "--transport",
        "streamablehttp",
        "-H",
        "Authorization",
        "Bearer <FLOWGLAD_API_KEY>",
        "-H",
        "Accept",
        "application/json, text/event-stream",
        "https://app.flowglad.com/api/mcp"
      ]
    }
  }
}
```

### Available Tools

#### `queryDocs`

This tool provides connected LLMs with access to Flowglad documentation via semantic vector search. All documentation at [docs.flowglad.com](https://docs.flowglad.com/) is accessible through this tool call.
