# Quickstart

> Connect Claude, Claude Code, Cursor or any MCP client to the Skylit MCP server, with Skylit sign-in or an API key.

> **Beta.** The API and MCP server come with paid Skylit memberships. See [Plans and credits](https://www.skylit.ai/docs/api-reference/plans-and-credits), and check yours on the [Developer page](https://app.skylit.ai/developer).

The endpoint is `https://mcp.skylit.ai/mcp`. There are two ways to authenticate:

| | How | Best for |
| --- | --- | --- |
| **Sign in with Skylit (OAuth)** | Add only the URL. Your client opens a Skylit consent page; click **Approve**. | Claude, Claude Code, Cursor, VS Code, ChatGPT |
| **API key** | Send `Authorization: Bearer <your-api-key>` | Headless agents, scripts, clients without OAuth |

Either way the connection uses your account's credits and limits. OAuth
connections show up on the [Developer page](https://app.skylit.ai/developer) as
"Connected app: ..." and can be disconnected there.

## Claude (desktop and claude.ai)

**Settings, Connectors, Add custom connector.** Name it `Skylit`, set the URL to
`https://mcp.skylit.ai/mcp`, click **Connect**, then approve on the Skylit page.
No key or config file is needed.

**Using an API key instead (config file)**

Bridge to the remote endpoint with [`mcp-remote`](https://www.npmjs.com/package/mcp-remote)
in `claude_desktop_config.json`, then restart Claude Desktop:

```json
{
  "mcpServers": {
    "skylit": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.skylit.ai/mcp",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}
```

## Claude Code

```bash
claude mcp add --transport http skylit https://mcp.skylit.ai/mcp
```

Then run `/mcp`, pick **skylit** and choose **Authenticate**. For a headless
machine, use a key instead:

```bash
claude mcp add --transport http skylit https://mcp.skylit.ai/mcp \
  --header "Authorization: Bearer $SKYLIT_API_KEY"
```

## Cursor

Add the server to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` in a
project, then click **Connect** (or **Login**) next to **skylit** in Cursor
Settings, MCP:

```json
{
  "mcpServers": {
    "skylit": { "url": "https://mcp.skylit.ai/mcp" }
  }
}
```

To use a key instead, add a header:

```json
{
  "mcpServers": {
    "skylit": {
      "url": "https://mcp.skylit.ai/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

## Codex (OpenAI)

Add the server to `~/.codex/config.toml` and give Codex your key through an environment variable:

```toml
[mcp_servers.skylit]
url = "https://mcp.skylit.ai/mcp"
bearer_token_env_var = "SKYLIT_API_KEY"
```

```bash
export SKYLIT_API_KEY="your_api_key"   # from app.skylit.ai/developer
codex
```

Codex sends it as `Authorization: Bearer <key>`. The MCP server accepts the key only in that header, not as `X-API-Key`.

To sign in with your Skylit account instead of a key, add the server without `bearer_token_env_var` and run `codex mcp login skylit`. Some Codex versions need their remote MCP client feature turned on first; the key method above works on all of them.

**"Unauthorized" when Codex connects** means no credential reached the server. Check that `SKYLIT_API_KEY` is exported in the shell you start Codex from, then restart Codex.

## ChatGPT

ChatGPT connects custom MCP servers in developer mode (available on paid plans):
**Settings, Apps & Connectors, Advanced settings**, turn on **Developer mode**,
then **Create** a connector with the URL `https://mcp.skylit.ai/mcp` and
**OAuth** authentication. ChatGPT opens the Skylit consent page; click **Approve**.

## Other MCP clients

Any client that supports remote (streamable HTTP) MCP servers can use the URL
with OAuth, or the URL plus the `Authorization` header.

## Try it

Once connected, ask a question that maps to a tool:

> Were there any unusual bullish sweeps on TSLA today?

The agent will typically call `flow_search` to confirm the ticker, then `sweeps`
(or `unusual_volume`) and summarize. Browse [example prompts](https://www.skylit.ai/docs/mcp/examples)
for more.

## Raw HTTP (for developers)

The server speaks standard MCP over streamable HTTP and is stateless: there is no
`Mcp-Session-Id`, so every request stands alone and carries the key. Responses
may arrive as `text/event-stream`, so send an `Accept` header that includes it.

```bash
BASE=https://mcp.skylit.ai/mcp
AUTH="Authorization: Bearer $SKYLIT_API_KEY"
H=(-H "$AUTH" -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream")

# list tools
curl -sS "$BASE" "${H[@]}" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# call a tool
curl -sS "$BASE" "${H[@]}" -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
  "params":{"name":"heat_levels","arguments":{"symbols":"SPY"}}}'
```

> **Note:** MCP clients still send `initialize` first; the server answers it, and it is
> harmless when you drive the server by hand. Arguments that take several
> symbols (such as `symbols` on `heat_levels`) are one comma-separated string,
> for example `"SPY,QQQ"`.

> **Warning:** A `401` means the key or sign-in is missing, invalid or expired (OAuth clients
> re-authenticate on their own); a `403` means the key is recognized but API
> access isn't active on the account. Check the key and that your account has
> API access enabled.
