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

# Using mcp-remote

> Connect to the Manglai MCP using the mcp-remote package

## What is mcp-remote?

[mcp-remote](https://www.npmjs.com/package/mcp-remote) is a proxy that allows MCP clients that only support **stdio** (like Claude Desktop, Cursor, Windsurf) to connect to remote MCP servers via **SSE** (Server-Sent Events).

## Direct Usage

```bash theme={null}
npx mcp-remote https://mcp.manglai.io/sse --header "Authorization:Bearer YOUR_TOKEN"
```

## Cursor Configuration

File: `.cursor/mcp.json`

```json theme={null}
{
  "mcpServers": {
    "manglai": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.manglai.io/sse",
        "--header",
        "Authorization:Bearer ${MANGLAI_TOKEN}"
      ],
      "env": {
        "MANGLAI_TOKEN": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
      }
    }
  }
}
```

## Claude Desktop Configuration

File: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)

```json theme={null}
{
  "mcpServers": {
    "manglai": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.manglai.io/sse",
        "--header",
        "Authorization:Bearer ${MANGLAI_TOKEN}"
      ],
      "env": {
        "MANGLAI_TOKEN": "your_token_here"
      }
    }
  }
}
```

## Environment Variables

To avoid hardcoding the token:

```json theme={null}
"env": {
  "MANGLAI_TOKEN": "your_token"
}
```

You can also export it in your shell (macOS/Linux):

```bash theme={null}
export MANGLAI_TOKEN="eyJhbGciOiJIUzI1NiIs..."
```

## Header Format Note

Avoid spaces around `:` in the header:

```bash theme={null}
# Correct
"Authorization:Bearer token"

# Incorrect (may fail in some clients)
"Authorization: Bearer token"
```
