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

# MCP servers

> Connect the Flynet Docs MCP and the Flynet API MCP to Claude Code, Cursor, and Claude Desktop.

# MCP servers

Flynet ships two MCP servers. They do different jobs and run side by side:

* **Docs MCP** — your agent searches the live Flynet docs while it works. Hosted by Mintlify, zero setup, no credentials.
* **API MCP** — an npm package your agent runs locally to call the Flynet API through read-only tools, with your own credentials. Nothing to host.

## Docs MCP

The docs site hosts its own MCP server, so any MCP-aware agent can search Flynet's documentation in real time instead of working from a stale copy. There's nothing to deploy and no key to manage.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http flynet-docs https://docs.flynet.org/mcp
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (or a project `.cursor/mcp.json`):

    ```json theme={null}
    {
      "mcpServers": {
        "flynet-docs": { "url": "https://docs.flynet.org/mcp" }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Claude Desktop adds remote servers through **Connectors**, not the config file. In **Settings → Connectors**, click **Add custom connector**, paste the URL, and click **Add** — no authentication needed:

    ```
    https://docs.flynet.org/mcp
    ```

    Connectors are account-level, so adding it once (here or at [claude.ai/settings/connectors](https://claude.ai/settings/connectors)) makes it available across Claude Desktop and claude.ai.

    <Note>
      Don't put a bare `{ "url": ... }` entry in `claude_desktop_config.json` — that file only launches local (stdio) servers, and Desktop will ignore the entry. If you must use the config file, bridge the remote server with [`mcp-remote`](https://github.com/geelen/mcp-remote):

      ```json theme={null}
      {
        "mcpServers": {
          "flynet-docs": {
            "command": "npx",
            "args": ["-y", "mcp-remote", "https://docs.flynet.org/mcp"]
          }
        }
      }
      ```
    </Note>
  </Tab>
</Tabs>

<Tip>
  No MCP client? Every page is available as markdown for any model: [`llms.txt`](https://flynet-dev-portal.mintlify.app/llms.txt) indexes the docs, [`llms-full.txt`](https://flynet-dev-portal.mintlify.app/llms-full.txt) is the whole site in one file, and appending `.md` to any docs URL returns its source.
</Tip>

## API MCP

The API MCP is a published npm package, [`@flynetdev/mcp`](https://www.npmjs.com/package/@flynetdev/mcp) — there's no server to connect to and nothing to host. Your MCP client runs it locally with `npx`, and you supply your own credentials in the client's config, so no secrets leave your machine.

It gives your agent **9 read-only tools** that call Flynet directly — fetch a restaurant, list venues, or read the signed-in member's wallets while it reasons, instead of writing throwaway `fetch()` code. It wraps [`@flynetdev/core`](https://www.npmjs.com/package/@flynetdev/core), the same client you'd use in production.

### Credentials

Flynet has two auth schemes, so the package takes two credentials and routes each tool to the right one. Provide whichever surfaces you'll use:

| Credential         | Env var               | Tools it unlocks                         |
| ------------------ | --------------------- | ---------------------------------------- |
| API key            | `FLYNET_API_KEY`      | Restaurants, locations                   |
| OAuth access token | `FLYNET_ACCESS_TOKEN` | Profile, wallets, check-ins, memberships |

Both are server-side secrets — keep them on your machine, never in client-side code. Get them from [sandbox access](/resources/request-access).

### Install

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add flynet \
      --env FLYNET_API_KEY=bb_... \
      --env FLYNET_ACCESS_TOKEN=ey... \
      -- npx -y @flynetdev/mcp
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (or a project `.cursor/mcp.json`):

    ```json theme={null}
    {
      "mcpServers": {
        "flynet": {
          "command": "npx",
          "args": ["-y", "@flynetdev/mcp"],
          "env": {
            "FLYNET_API_KEY": "bb_...",
            "FLYNET_ACCESS_TOKEN": "ey..."
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    The API MCP runs locally (stdio), so it goes straight in `claude_desktop_config.json` — no Connectors needed. Add the same block as Cursor:

    ```json theme={null}
    {
      "mcpServers": {
        "flynet": {
          "command": "npx",
          "args": ["-y", "@flynetdev/mcp"],
          "env": {
            "FLYNET_API_KEY": "bb_...",
            "FLYNET_ACCESS_TOKEN": "ey..."
          }
        }
      }
    }
    ```

    The file lives at `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows). Restart Claude Desktop after editing.
  </Tab>
</Tabs>

### Tools

Every tool is read-only. List tools are paginated and return trimmed fields; pass `include_raw: true` for the full object.

| Tool                                                       | Does                                      | Credential   |
| ---------------------------------------------------------- | ----------------------------------------- | ------------ |
| [`list_restaurants`](/api-reference/restaurants/list)      | List restaurants in the network           | API key      |
| [`get_restaurant`](/api-reference/restaurants/get)         | Fetch one restaurant by id                | API key      |
| [`list_locations`](/api-reference/locations/list)          | List venue locations                      | API key      |
| [`get_location`](/api-reference/locations/get)             | Fetch one location, with open hours       | API key      |
| [`get_my_profile`](/api-reference/users/get-me)            | The signed-in member's profile and status | Access token |
| [`get_my_wallets`](/api-reference/users/list-wallets)      | The member's wallets and balance          | Access token |
| [`list_my_check_ins`](/api-reference/users/list-check-ins) | The member's own check-ins                | Access token |
| [`list_check_ins`](/api-reference/check-ins/list)          | A venue's recent check-ins (anonymized)   | API key      |
| [`list_my_memberships`](/api-reference/memberships/list)   | The member's per-restaurant memberships   | Access token |

When a tool is called without the credential it needs, it returns a clear message naming the missing variable and the fix — not a stack trace.

## Next

<CardGroup cols={2}>
  <Card title="Install the agent skill →" icon="wand-magic-sparkles" href="/build-with-ai/agent-skills" />

  <Card title="How it fits together →" icon="diagram-project" href="/build-with-ai/architecture" />
</CardGroup>
