@prereason/mcp 0.1.0 → 0.1.2
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.
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +128 -20
- package/package.json +5 -3
- /package/bin/{cli.mjs → cli.js} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2 (2026-02-21)
|
|
4
|
+
|
|
5
|
+
- Fix Windows path resolution issue in Claude Desktop (rename `.mjs` → `.js` bin entry)
|
|
6
|
+
- Add Windows troubleshooting section in README
|
|
7
|
+
|
|
8
|
+
## 0.1.1 (2026-02-21)
|
|
9
|
+
|
|
10
|
+
- Add MIT LICENSE file
|
|
11
|
+
- Enhance README with full template list, troubleshooting, and example prompts
|
|
12
|
+
- Add CHANGELOG
|
|
13
|
+
|
|
14
|
+
## 0.1.0 (2026-02-20)
|
|
15
|
+
|
|
16
|
+
- Initial release
|
|
17
|
+
- stdio-to-Streamable HTTP bridge for Claude Desktop
|
|
18
|
+
- Default URL: `https://api.prereason.com/api/mcp`
|
|
19
|
+
- `--header Key:Value` flag for API key authentication
|
|
20
|
+
- `--help` and `--version` flags
|
|
21
|
+
- 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
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@prereason/mcp)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
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
|
-
##
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
|
|
47
|
-
|
|
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,92 @@ 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
|
-
- "
|
|
90
|
+
- "Get the bitcoin price metric with trend analysis"
|
|
91
|
+
- "What's the hash ribbon signal right now?"
|
|
92
|
+
- "List available templates"
|
|
93
|
+
|
|
94
|
+
## Troubleshooting
|
|
57
95
|
|
|
58
|
-
|
|
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
|
|
59
100
|
|
|
60
|
-
|
|
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'))"`
|
|
61
104
|
|
|
105
|
+
### Windows: "'C:\Program' is not recognized"
|
|
106
|
+
|
|
107
|
+
If Node.js is installed in a path with spaces (e.g. `C:\Program Files\nodejs\`), `npx` may fail inside Claude Desktop. Workaround:
|
|
108
|
+
|
|
109
|
+
1. Install globally: `npm install -g @prereason/mcp`
|
|
110
|
+
2. Use `node` command instead:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"mcpServers": {
|
|
115
|
+
"prereason": {
|
|
116
|
+
"command": "node",
|
|
117
|
+
"args": [
|
|
118
|
+
"C:\\Users\\YOUR_USER\\AppData\\Roaming\\npm\\node_modules\\@prereason\\mcp\\bin\\cli.js",
|
|
119
|
+
"--header", "Authorization:Bearer YOUR_API_KEY"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
62
124
|
```
|
|
125
|
+
|
|
126
|
+
Replace `YOUR_USER` with your Windows username.
|
|
127
|
+
|
|
128
|
+
### Auth errors on get_context / get_metric
|
|
129
|
+
- `list_templates`, `list_metrics`, and `get_health` work without a key
|
|
130
|
+
- `get_context` and `get_metric` require a valid API key
|
|
131
|
+
- Get a free key at [prereason.com/signup](https://www.prereason.com/signup)
|
|
132
|
+
|
|
133
|
+
## Other MCP Clients
|
|
134
|
+
|
|
135
|
+
Claude Code, Cursor, and Windsurf support remote HTTP servers directly — **no bridge package needed**:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Claude Code (CLI)
|
|
63
139
|
claude mcp add prereason --transport http https://api.prereason.com/api/mcp
|
|
140
|
+
|
|
141
|
+
# Or add to .mcp.json
|
|
142
|
+
{
|
|
143
|
+
"mcpServers": {
|
|
144
|
+
"prereason": {
|
|
145
|
+
"type": "http",
|
|
146
|
+
"url": "https://api.prereason.com/api/mcp",
|
|
147
|
+
"headers": {
|
|
148
|
+
"Authorization": "Bearer YOUR_API_KEY"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## CLI Usage
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Default URL (https://api.prereason.com/api/mcp)
|
|
159
|
+
npx @prereason/mcp --header "Authorization:Bearer YOUR_API_KEY"
|
|
160
|
+
|
|
161
|
+
# Custom URL
|
|
162
|
+
npx @prereason/mcp https://custom-endpoint.com/mcp --header "Authorization:Bearer KEY"
|
|
163
|
+
|
|
164
|
+
# Help
|
|
165
|
+
npx @prereason/mcp --help
|
|
64
166
|
```
|
|
65
167
|
|
|
66
168
|
## Links
|
|
67
169
|
|
|
68
170
|
- [Documentation](https://www.prereason.com/docs#mcp)
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
171
|
+
- [Sign Up](https://www.prereason.com/signup)
|
|
172
|
+
- [API Discovery](https://www.prereason.com/.well-known/mcp/server.json)
|
|
173
|
+
- [Terms of Service](https://www.prereason.com/terms)
|
|
174
|
+
- [Privacy Policy](https://www.prereason.com/privacy)
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prereason/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Connect Claude Desktop to PreReason's Bitcoin & macro data API via MCP",
|
|
6
6
|
"bin": {
|
|
7
|
-
"prereason-mcp": "./bin/cli.
|
|
7
|
+
"prereason-mcp": "./bin/cli.js"
|
|
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"
|
/package/bin/{cli.mjs → cli.js}
RENAMED
|
File without changes
|