{"id":47403164,"url":"https://github.com/PreReason/mcp","last_synced_at":"2026-04-03T18:01:08.417Z","repository":{"id":340663281,"uuid":"1167031006","full_name":"PreReason/mcp","owner":"PreReason","description":"MCP server for PreReason, the Context API for financial agents. 17 pre-reasoned market briefings with trend signals, regime classification, confidence scores, and cross-asset correlations.","archived":false,"fork":false,"pushed_at":"2026-03-30T11:02:02.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T08:37:56.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PreReason.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T21:47:51.000Z","updated_at":"2026-03-30T11:01:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/PreReason/mcp","commit_stats":null,"previous_names":["prereason/mcp"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/PreReason/mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PreReason%2Fmcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PreReason%2Fmcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PreReason%2Fmcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PreReason%2Fmcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PreReason","download_url":"https://codeload.github.com/PreReason/mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PreReason%2Fmcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31368156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-20T15:00:17.516Z","updated_at":"2026-04-03T18:01:08.378Z","avatar_url":"https://github.com/PreReason.png","language":"JavaScript","funding_links":[],"categories":["Market Data \u0026 Data Sources","Data Source","💰 Finance \u0026 Crypto","📦 Other"],"sub_categories":["Crypto"],"readme":"# @prereason/mcp\n\n[![npm version](https://img.shields.io/npm/v/@prereason/mcp.svg)](https://www.npmjs.com/package/@prereason/mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![PreReason/mcp MCP server](https://glama.ai/mcp/servers/PreReason/mcp/badges/score.svg)](https://glama.ai/mcp/servers/PreReason/mcp)\n\nMCP server for [PreReason](https://www.prereason.com) — the Context API for financial agents.\n\nPreReason returns pre-reasoned market briefings: trend signals, regime classification, confidence scores, cross-asset correlations, and causal narratives. Use it when your agent needs to reason about market conditions, not parse raw price feeds.\n\n[![prereason-mcp MCP server](https://glama.ai/mcp/servers/PreReason/mcp/badges/card.svg)](https://glama.ai/mcp/servers/PreReason/mcp)\n\n## Quick Start\n\n### Option 1: Direct HTTP (Claude Code, Cursor, Windsurf, etc.)\n\nClients that support remote MCP servers can connect directly with no bridge package needed.\n\n```bash\n# Claude Code (CLI one-liner)\nclaude mcp add prereason --transport http https://api.prereason.com/api/mcp\n```\n\nOr add to `.mcp.json` / your client's MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"prereason\": {\n      \"type\": \"http\",\n      \"url\": \"https://api.prereason.com/api/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n### Option 2: stdio bridge (Claude Desktop and other stdio-only clients)\n\n**Requires [Node.js 18+](https://nodejs.org)**\n\nAdd to your MCP client config (e.g. `claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"prereason\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@prereason/mcp\"],\n      \"env\": {\n        \"PREREASON_API_KEY\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\nClaude Desktop config file location:\n- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nRestart your MCP client after editing the config. PreReason should appear with 5 tools.\n\n## Get an API Key\n\n1. Sign up at [prereason.com/signup](https://www.prereason.com/signup)\n2. Go to Dashboard \u003e Settings \u003e API Keys\n3. Copy your key (starts with `pr_live_`)\n\n## 5 MCP Tools\n\n| Tool | Auth | Description |\n|------|------|-------------|\n| `list_briefings` | Open | List all 17 pre-reasoned market briefings with tier requirements |\n| `list_metrics` | Open | List all 38 available metrics: 30 API + 8 mining/energy (filterable by category) |\n| `get_health` | Open | API health check, version, account tier |\n| `get_context` | Required | Fetch a pre-reasoned market briefing (markdown or JSON) |\n| `get_metric` | Required | Fetch a single metric with trend/signal/percentile |\n\n## 17 Market Briefings\n\n### Free (6 briefings)\n| Briefing | Description |\n|----------|-------------|\n| `btc.quick-check` | Minimal fast context: BTC + Net Liquidity + correlation |\n| `btc.context` | BTC + liquidity + hash ribbon + difficulty + momentum |\n| `macro.snapshot` | Fed balance, M2, treasury yields, VIX, net liquidity |\n| `cross.correlations` | BTC correlation matrix vs macro indicators |\n| `btc.pulse` | Volume, fees, mempool analysis |\n| `btc.grid-stress` | Epoch pace and difficulty adjustment forecast |\n\n### Basic - $19.99/mo (5 briefings)\n| Briefing | Description |\n|----------|-------------|\n| `btc.momentum` | 200D MA support/resistance with 7d/30d/90d momentum and YTD percentiles |\n| `macro.liquidity` | Liquidity indicators with momentum analysis |\n| `btc.on-chain` | Hash rate, difficulty, fees, mempool health |\n| `cross.breadth` | Cross-asset breadth with SPY, DXY, VIX |\n| `btc.miner-survival` | Hashprice thermometer with miner stress scoring |\n\n### Pro - $49.99/mo (6 briefings)\n| Briefing | Description |\n|----------|-------------|\n| `btc.full` | Complete market intelligence with all metrics and analysis |\n| `btc.factors` | Multi-factor attribution for BTC price movements |\n| `cross.regime` | Regime classification (risk-on/risk-off/transition) with USDT.D risk sentiment |\n| `fx.liquidity` | FX environment with DXY, treasury, and global liquidity |\n| `btc.energy` | Production cost model with gas input pressure |\n| `btc.treasury` | Corporate Bitcoin treasury intelligence from SEC filings |\n\n## Example Prompts\n\nOnce connected, try prompts like:\n\n- \"What's the current BTC regime?\"\n- \"Show me the macro snapshot\"\n- \"What does the full context briefing say about market conditions?\"\n- \"Get the bitcoin price metric with trend analysis\"\n- \"What's the hash ribbon signal right now?\"\n- \"List available briefings\"\n\n## Troubleshooting\n\n### \"Server disconnected\" error\n- Ensure Node.js 18+ is installed: `node --version`\n- Check your API key starts with `pr_live_`\n- Fully quit Claude Desktop (system tray \u003e Quit) and reopen\n\n### Tools not appearing\n- Restart Claude Desktop after editing config\n- Verify JSON syntax: `node -e \"JSON.parse(require('fs').readFileSync('path/to/config','utf8'))\"`\n\n### Windows: \"'C:\\Program' is not recognized\"\n\nIf you still see this error, ensure you're using the `env` block (not `--header` args) as shown in Quick Start above. If the issue persists, install globally and use `node`:\n\n1. Run: `npm install -g @prereason/mcp`\n2. Use this config (replace `YOUR_USER` with your Windows username):\n\n```json\n{\n  \"mcpServers\": {\n    \"prereason\": {\n      \"command\": \"node\",\n      \"args\": [\n        \"C:\\\\Users\\\\YOUR_USER\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\@prereason\\\\mcp\\\\bin\\\\cli.js\"\n      ],\n      \"env\": {\n        \"PREREASON_API_KEY\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n### Auth errors on get_context / get_metric\n- `list_briefings`, `list_metrics`, and `get_health` work without a key\n- `get_context` and `get_metric` require a valid API key\n- Get a free key at [prereason.com/signup](https://www.prereason.com/signup)\n\n## Other MCP Clients\n\nIf your client supports remote HTTP servers, use [Quick Start Option 1](#option-1-direct-http-claude-code-cursor-windsurf-etc) above. The stdio bridge package is only needed for clients that require stdio transport (e.g. Claude Desktop).\n\n## CLI Usage\n\n```bash\n# Using environment variable (recommended)\nPREREASON_API_KEY=pr_live_... npx @prereason/mcp\n\n# Using --header flag (backward compatible)\nnpx @prereason/mcp --header \"Authorization:Bearer YOUR_API_KEY\"\n\n# Custom URL\nPREREASON_URL=https://custom.endpoint/mcp npx @prereason/mcp\n\n# Help\nnpx @prereason/mcp --help\n```\n\n## Links\n\n- [Documentation](https://www.prereason.com/docs#mcp)\n- [Sign Up](https://www.prereason.com/signup)\n- [API Discovery](https://www.prereason.com/.well-known/mcp/server.json)\n- [Terms of Service](https://www.prereason.com/terms)\n- [Privacy Policy](https://www.prereason.com/privacy)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPreReason%2Fmcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPreReason%2Fmcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPreReason%2Fmcp/lists"}