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

# Connect Cursor

> Configure Cursor to use the Alphacast MCP server — the hosted server over OAuth, or the local npm package.

You configure the server in `.cursor/mcp.json` either at the project root (shared with collaborators) or in your user directory (private to you). Cursor supports both the hosted remote server and the local npm package.

## Configuration file location

| Scope   | Path                              |
| ------- | --------------------------------- |
| Project | `<project_root>/.cursor/mcp.json` |
| User    | `~/.cursor/mcp.json`              |

Project-scoped configuration takes precedence when both exist. Use the user-scoped path when you want the server available across every project on your machine.

## Hosted (remote, OAuth)

Point Cursor at the remote URL — no `npx`, no Node.js, no API key:

```json .cursor/mcp.json theme={null}
{
  "mcpServers": {
    "alphacast": {
      "url": "https://mcp.alphacast.io/mcp"
    }
  }
}
```

After saving, open **Settings → MCP**. Cursor shows the `alphacast` server with a **Login** / **Authenticate** button — click it to sign in with your Alphacast account in the browser. Because no secret is stored, this config is safe to commit to a project-scoped file; each collaborator authenticates with their own account.

## Local (npm package)

```json .cursor/mcp.json theme={null}
{
  "mcpServers": {
    "alphacast": {
      "command": "npx",
      "args": ["-y", "@alphacast/mcp"],
      "env": {
        "ALPHACAST_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

<Warning>
  Do not commit a real API key to a project-scoped file. Either rely on the user-scoped path, or wire up a secrets manager and document the setup in your project README.
</Warning>

## Apply the change

1. Save `.cursor/mcp.json`.
2. Open Cursor's settings → **Features → MCP** and click **Refresh**, or reload the window (`Cmd/Ctrl + Shift + P` → **Developer: Reload Window**).

## Verify

Open the MCP panel in Cursor's settings. The `alphacast` server should appear with a green dot and 32 tools listed. In the chat, try:

> "Use the alphacast tools to list my repositories."

If the server fails to connect, the most common causes are an invalid `ALPHACAST_API_KEY` or Node.js 18+ not being on the system PATH.
