@prereason/mcp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +106 -21
  4. package/package.json +4 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1 (2026-02-21)
4
+
5
+ - Add MIT LICENSE file
6
+ - Enhance README with full template list, troubleshooting, and example prompts
7
+ - Add CHANGELOG
8
+
9
+ ## 0.1.0 (2026-02-20)
10
+
11
+ - Initial release
12
+ - stdio-to-Streamable HTTP bridge for Claude Desktop
13
+ - Default URL: `https://api.prereason.com/api/mcp`
14
+ - `--header Key:Value` flag for API key authentication
15
+ - `--help` and `--version` flags
16
+ - 5 MCP tools: get_context, get_metric, list_templates, list_metrics, get_health
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PreReason
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,11 +1,16 @@
1
1
  # @prereason/mcp
2
2
 
3
- MCP bridge for [PreReason](https://www.prereason.com) — connects Claude Desktop to PreReason's Bitcoin & macro data API.
3
+ [![npm version](https://img.shields.io/npm/v/@prereason/mcp.svg)](https://www.npmjs.com/package/@prereason/mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- PreReason provides pre-computed context templates with market data, macro indicators, trend analysis, and causal reasoning for LLM agents.
6
+ MCP bridge for [PreReason](https://www.prereason.com) connects Claude Desktop to PreReason's Bitcoin and macro data API.
7
+
8
+ PreReason provides pre-computed context templates with market data, macro indicators, trend analysis, confidence scores, and causal reasoning for LLM agents.
6
9
 
7
10
  ## Quick Start
8
11
 
12
+ **Requires [Node.js 18+](https://nodejs.org)**
13
+
9
14
  Add to your `claude_desktop_config.json`:
10
15
 
11
16
  ```json
@@ -26,25 +31,54 @@ Config file location:
26
31
  - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
27
32
  - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
28
33
 
29
- Restart Claude Desktop after editing the config.
34
+ Restart Claude Desktop after editing the config. PreReason should appear in your connectors list with 5 tools.
30
35
 
31
36
  ## Get an API Key
32
37
 
33
- 1. Sign up at [prereason.com](https://www.prereason.com)
38
+ 1. Sign up at [prereason.com/signup](https://www.prereason.com/signup)
34
39
  2. Go to Dashboard > Settings > API Keys
35
40
  3. Copy your key (starts with `pr_live_`)
36
41
 
37
- ## What You Get
38
-
39
- 5 MCP tools:
40
-
41
- | Tool | Description | Auth Required |
42
- |------|-------------|---------------|
43
- | `list_templates` | List all 17 context templates | No |
44
- | `list_metrics` | List all 26 available metrics | No |
45
- | `get_health` | API health check | No |
46
- | `get_context` | Fetch a context template | Yes |
47
- | `get_metric` | Fetch a single metric | Yes |
42
+ ## 5 MCP Tools
43
+
44
+ | Tool | Auth | Description |
45
+ |------|------|-------------|
46
+ | `list_templates` | Open | List all 17 context templates with tier requirements |
47
+ | `list_metrics` | Open | List all 26 available metrics (filterable by category) |
48
+ | `get_health` | Open | API health check, version, account tier |
49
+ | `get_context` | Required | Fetch a context template (markdown or JSON) |
50
+ | `get_metric` | Required | Fetch a single metric with trend/signal/percentile |
51
+
52
+ ## 17 Context Templates
53
+
54
+ ### Free (6 templates)
55
+ | Template | Description |
56
+ |----------|-------------|
57
+ | `quick-check` | Minimal fast context: BTC + Net Liquidity + correlation |
58
+ | `btc-context` | BTC + liquidity + hash ribbon + difficulty + momentum |
59
+ | `macro-snapshot` | Fed balance, M2, treasury yields, VIX, net liquidity |
60
+ | `correlation-check` | BTC correlation matrix vs macro indicators |
61
+ | `btc-pulse` | Volume, fees, mempool analysis |
62
+ | `grid-stress` | Epoch pace and difficulty adjustment forecast |
63
+
64
+ ### Basic — $19.99/mo (5 templates)
65
+ | Template | Description |
66
+ |----------|-------------|
67
+ | `btc-momentum` | Extended momentum with 90d trends and percentiles |
68
+ | `liquidity-momentum` | Liquidity indicators with momentum analysis |
69
+ | `on-chain-health` | Hash rate, difficulty, fees, mempool health |
70
+ | `market-breadth` | Cross-asset breadth with SPY, DXY, VIX |
71
+ | `miner-survival` | Hashprice thermometer with miner stress scoring |
72
+
73
+ ### Pro — $49.99/mo (6 templates)
74
+ | Template | Description |
75
+ |----------|-------------|
76
+ | `full-context` | Complete market intelligence with all metrics and analysis |
77
+ | `factor-attribution` | Multi-factor attribution for BTC price movements |
78
+ | `regime-check` | Market regime classification (risk-on/risk-off/transition) |
79
+ | `fx-liquidity` | FX environment with DXY, treasury, and global liquidity |
80
+ | `energy-cost` | Production cost model with gas input pressure |
81
+ | `treasury-holdings` | Corporate Bitcoin treasury intelligence from SEC filings |
48
82
 
49
83
  ## Example Prompts
50
84
 
@@ -53,18 +87,69 @@ Once connected, ask Claude:
53
87
  - "What's the current BTC regime?"
54
88
  - "Show me the macro snapshot"
55
89
  - "What does the full context template say about market conditions?"
56
- - "List available prereason templates"
90
+ - "Get the bitcoin price metric with trend analysis"
91
+ - "What's the hash ribbon signal right now?"
92
+ - "List available templates"
57
93
 
58
- ## Claude Code / Cursor / Windsurf
94
+ ## Troubleshooting
59
95
 
60
- These clients support remote HTTP MCP servers directly — no bridge needed:
96
+ ### "Server disconnected" error
97
+ - Ensure Node.js 18+ is installed: `node --version`
98
+ - Check your API key starts with `pr_live_`
99
+ - Fully quit Claude Desktop (system tray > Quit) and reopen
61
100
 
62
- ```
101
+ ### Tools not appearing
102
+ - Restart Claude Desktop after editing config
103
+ - Verify JSON syntax: `node -e "JSON.parse(require('fs').readFileSync('path/to/config','utf8'))"`
104
+
105
+ ### Auth errors on get_context / get_metric
106
+ - `list_templates`, `list_metrics`, and `get_health` work without a key
107
+ - `get_context` and `get_metric` require a valid API key
108
+ - Get a free key at [prereason.com/signup](https://www.prereason.com/signup)
109
+
110
+ ## Other MCP Clients
111
+
112
+ Claude Code, Cursor, and Windsurf support remote HTTP servers directly — **no bridge package needed**:
113
+
114
+ ```bash
115
+ # Claude Code (CLI)
63
116
  claude mcp add prereason --transport http https://api.prereason.com/api/mcp
117
+
118
+ # Or add to .mcp.json
119
+ {
120
+ "mcpServers": {
121
+ "prereason": {
122
+ "type": "http",
123
+ "url": "https://api.prereason.com/api/mcp",
124
+ "headers": {
125
+ "Authorization": "Bearer YOUR_API_KEY"
126
+ }
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ ## CLI Usage
133
+
134
+ ```bash
135
+ # Default URL (https://api.prereason.com/api/mcp)
136
+ npx @prereason/mcp --header "Authorization:Bearer YOUR_API_KEY"
137
+
138
+ # Custom URL
139
+ npx @prereason/mcp https://custom-endpoint.com/mcp --header "Authorization:Bearer KEY"
140
+
141
+ # Help
142
+ npx @prereason/mcp --help
64
143
  ```
65
144
 
66
145
  ## Links
67
146
 
68
147
  - [Documentation](https://www.prereason.com/docs#mcp)
69
- - [API Reference](https://api.prereason.com/.well-known/mcp/server.json)
70
- - [PreReason](https://www.prereason.com)
148
+ - [Sign Up](https://www.prereason.com/signup)
149
+ - [API Discovery](https://www.prereason.com/.well-known/mcp/server.json)
150
+ - [Terms of Service](https://www.prereason.com/terms)
151
+ - [Privacy Policy](https://www.prereason.com/privacy)
152
+
153
+ ## License
154
+
155
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prereason/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Connect Claude Desktop to PreReason's Bitcoin & macro data API via MCP",
6
6
  "bin": {
@@ -8,7 +8,9 @@
8
8
  },
9
9
  "files": [
10
10
  "bin",
11
- "README.md"
11
+ "README.md",
12
+ "LICENSE",
13
+ "CHANGELOG.md"
12
14
  ],
13
15
  "dependencies": {
14
16
  "@modelcontextprotocol/sdk": "^1.26.0"