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

# MCP server

> Work on your motions from Claude Code, Claude Desktop, Cursor, or Codex — without leaving your coding agent.

The Monnet MCP server exposes your workspace — motions, inbox, comments, approvals — to any client that speaks the [Model Context Protocol](https://modelcontextprotocol.io). Read, draft, and act on motions from your coding agent.

## Before you start

You need:

* A Monnet account with at least one workspace.
* A **Monnet API key** — see [Generate an API key](/product/account-settings#generate-an-api-key).
* An MCP-compatible client: **Claude Code**, **Claude Desktop**, **Cursor**, or **Codex**.

<Warning>
  Treat your API key like a password. Anyone with it can read and modify motions on your behalf. Revoke a key from **Settings** if it ever leaks.
</Warning>

## Install

<Tabs>
  <Tab title="Claude Code">
    Run:

    ```bash theme={null}
    claude mcp add monnet -e MONNET_API_KEY=<YOUR_KEY> -- npx -y @monnet/mcp
    ```

    Restart Claude Code to pick up the new server.
  </Tab>

  <Tab title="Claude Desktop">
    Open your config file:

    * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

    Add the `monnet` entry under `mcpServers`:

    ```json theme={null}
    {
      "mcpServers": {
        "monnet": {
          "command": "npx",
          "args": ["-y", "@monnet/mcp"],
          "env": {
            "MONNET_API_KEY": "<YOUR_KEY>"
          }
        }
      }
    }
    ```

    Restart Claude Desktop.
  </Tab>

  <Tab title="Cursor">
    Open `~/.cursor/mcp.json` (create it if needed) and add:

    ```json theme={null}
    {
      "mcpServers": {
        "monnet": {
          "command": "npx",
          "args": ["-y", "@monnet/mcp"],
          "env": {
            "MONNET_API_KEY": "<YOUR_KEY>"
          }
        }
      }
    }
    ```

    Restart Cursor.
  </Tab>

  <Tab title="Codex">
    Run:

    ```bash theme={null}
    codex mcp add monnet --env MONNET_API_KEY=<YOUR_KEY> -- npx -y @monnet/mcp
    ```

    Restart Codex.
  </Tab>
</Tabs>

## Verify the connection

Ask your assistant:

> Use the `monnet_whoami` tool to confirm the connection.

It returns your account details and the list of API keys attached to your account. If you get an authentication error, double-check the `MONNET_API_KEY` value in your config.

## Environment variables

| Variable         | Required | Default                 | Purpose                                                            |
| ---------------- | -------- | ----------------------- | ------------------------------------------------------------------ |
| `MONNET_API_KEY` | yes      | —                       | Your Monnet API key. Sent on every request.                        |
| `MONNET_API_URL` | no       | `https://api.monnet.ai` | Override the backend URL — useful for self-hosted or local setups. |

## Available tools

| Tool                   | Purpose                                                                                                     |
| ---------------------- | ----------------------------------------------------------------------------------------------------------- |
| `monnet_whoami`        | Verify the connection and list the API keys on your account.                                                |
| `list_workspaces`      | List the workspaces you belong to, with their names and slugs.                                              |
| `list_motions`         | List motions in a workspace, filterable by status.                                                          |
| `get_motion`           | Read a motion's full details — summary, body, status, priority, plan, and members.                          |
| `create_motion`        | Create a draft motion from a free-form prompt. Monnet drafts the summary, body, and plan in the background. |
| `update_motion`        | Update a motion's summary, body, priority, or plan.                                                         |
| `comment`              | Post a public comment on a motion.                                                                          |
| `approve`              | Approve a plan step on a motion.                                                                            |
| `reject`               | Reject a plan step on a motion, with an optional reason.                                                    |
| `get_inbox`            | Fetch your "For You" feed — motions across your workspaces that need attention.                             |
| `ask_monnet`           | Ask Monnet a question in the context of a specific motion.                                                  |
| `get_workspace_memory` | Read a workspace's auto-synthesized memory digest.                                                          |

## Troubleshooting

<AccordionGroup>
  <Accordion title="The monnet tools don't appear in my client">
    Make sure you restarted the client after editing the config. In Claude Desktop, check **Help → Logs** for MCP-related errors.
  </Accordion>

  <Accordion title="I get a 401 / authentication error">
    The API key is missing, wrong, or revoked. [Generate a fresh key](/product/account-settings#generate-an-api-key) and update your config.
  </Accordion>

  <Accordion title="npx hangs or fails to install">
    Check your Node.js version — the MCP server requires Node 20 or newer. Run `node --version` to confirm. If you use `nvm` or `fnm`, make sure the right version is active in the shell your MCP client inherits.
  </Accordion>
</AccordionGroup>
