# PreReason MCP server

> Provides AI agents with pre-reasoned financial market context, including treasury yields, macro indicators, and listed company results.

- Repository: https://github.com/PreReason/mcp
- Page: https://hostedmcp.org/servers/prereason/mcp
- Transport: stdio, remote
- Stars: 8
- License: MIT
- Latest version: 0.9.1

## Install

### Claude Code

```sh
claude mcp add --env 'PREREASON_API_KEY=<YOUR_PREREASON_API_KEY>' mcp -- npx -y @prereason/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@prereason/mcp"
      ],
      "env": {
        "PREREASON_API_KEY": "<YOUR_PREREASON_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@prereason/mcp"
      ],
      "env": {
        "PREREASON_API_KEY": "<YOUR_PREREASON_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@prereason/mcp"],"env":{"PREREASON_API_KEY":"<YOUR_PREREASON_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@prereason/mcp"
      ],
      "env": {
        "PREREASON_API_KEY": "<YOUR_PREREASON_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp --env 'PREREASON_API_KEY=<YOUR_PREREASON_API_KEY>' -- npx -y @prereason/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "@prereason/mcp"]

[mcp_servers.mcp.env]
PREREASON_API_KEY = "<YOUR_PREREASON_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'PREREASON_API_KEY=<YOUR_PREREASON_API_KEY>' mcp npx -- -y @prereason/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@prereason/mcp"
      ],
      "env": {
        "PREREASON_API_KEY": "<YOUR_PREREASON_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `PREREASON_API_KEY` | no | yes | PreReason API key (starts with pr_live_). Optional: without it the bridge asks for access from inside the session and prints one link for you to approve; the key is then saved under ~/.prereason. Or sign up at prereason.com. |
| `PREREASON_CLIENT` | no | no | The app this bridge runs in (claude-desktop, cursor, windsurf, claude-code, ...), so your PreReason dashboard names the connection. |
| `PREREASON_URL` | no | no |  |

## Tools (7)

- `list_briefings`
- `list_metrics`
- `get_health`
- `get_context`
- `get_metric`
- `get_changes`
- `get_news`

## FAQ

### What kind of financial data does PreReason provide?

It covers asset classes including treasury yields, the Fed, FX, commodities, macro indicators, listed companies, and Bitcoin.

### Does PreReason provide investment advice?

No, the service is designed to describe data and provide briefings without offering buy, sell, or hold recommendations.

### Do I need an API key to use the catalogue tools?

No, the catalogue tools like list_briefings and list_metrics are open and do not require a key.
