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

# Cursor Integration

> Configure Cursor IDE to use MetaMCP endpoints via mcp.json

**Cursor** is a popular AI-powered code editor that supports MCP (Model Context Protocol) integration. This guide shows you how to connect Cursor to your MetaMCP endpoints for enhanced coding capabilities.

Also refer to Cursor's doc on MCP [https://docs.cursor.com/context/mcp](https://docs.cursor.com/context/mcp)

## Prerequisites

Before starting, ensure you have:

* **Cursor IDE** installed and running
* **MetaMCP** running locally or deployed
* **Active endpoint** configured in MetaMCP
* **API key** generated (if authentication is enabled)

## Basic Configuration

### Simple mcp.json Setup

Create or edit your `mcp.json` file in Cursor's configuration directory:

<CodeGroup>
  ```json Basic Configuration theme={null}
  {
    "mcpServers": {
      "MetaMCP": {
        "url": "http://localhost:12008/metamcp/your-endpoint-name/mcp"
      }
    }
  }
  ```

  ```json With Authentication theme={null}
  {
    "mcpServers": {
      "MetaMCP": {
        "url": "http://localhost:12008/metamcp/your-endpoint-name/mcp",
        "headers": {
          "Authorization": "Bearer sk_mt_your_api_key_here"
        }
      }
    }
  }
  ```

  ```json Multiple Endpoints theme={null}
  {
    "mcpServers": {
      "MetaMCP-Dev": {
        "url": "http://localhost:12008/metamcp/dev-tools/mcp",
        "headers": {
          "Authorization": "Bearer sk_mt_dev_key"
        }
      },
      "MetaMCP-Research": {
        "url": "http://localhost:12008/metamcp/research-tools/mcp",
        "headers": {
          "Authorization": "Bearer sk_mt_research_key"
        }
      }
    }
  }
  ```
</CodeGroup>

## Configuration Options

### Transport Types

MetaMCP supports different transport protocols. **Streamable HTTP is recommended** for Cursor:

<AccordionGroup>
  <Accordion title="Streamable HTTP (Recommended)">
    ```json theme={null}
    {
      "mcpServers": {
        "MetaMCP": {
          "url": "http://localhost:12008/metamcp/your-endpoint-name/mcp"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="SSE (Alternative)">
    ```json theme={null}
    {
      "mcpServers": {
        "MetaMCP": {
          "url": "http://localhost:12008/metamcp/your-endpoint-name/sse"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### Authentication Methods

<AccordionGroup>
  <Accordion icon="key" title="API Key Authentication">
    **Most common method** using Authorization header:

    ```json theme={null}
    {
      "mcpServers": {
        "MetaMCP": {
          "url": "http://localhost:12008/metamcp/your-endpoint-name/mcp",
          "headers": {
            "Authorization": "Bearer sk_mt_your_key_here"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion icon="shield-minus" title="No Authentication">
    **For public endpoints** without authentication:

    ```json theme={null}
    {
      "mcpServers": {
        "MetaMCP": {
          "url": "http://localhost:12008/metamcp/public-tools/sse"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>
