@prereason/mcp 0.2.1 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 (2026-04-12)
4
+
5
+ ### Added
6
+ - OAuth 2.1 support for automatic API key provisioning on MCP connection
7
+ - Server branding metadata (title, description, icons) for client connection cards
8
+ - Centered README hero layout with improved visual hierarchy
9
+ - Privacy Policy section in README
10
+ - npm downloads and Node.js version badges
11
+
12
+ ### Security
13
+ - Harden OAuth proxy endpoints with input validation, rate limiting, and timeout handling
14
+ - Sanitize upstream error responses on token exchange
15
+
16
+ ### Fixed
17
+ - HEAD /api/mcp returning 405 instead of 200
18
+ - Metric count in README (38 -> 30)
19
+ - cli.js version mismatch with package.json
20
+
3
21
  ## 0.2.1 (2026-03-30)
4
22
 
5
23
  - Add .mcp.json for Open Plugins / cursor.directory discovery
package/README.md CHANGED
@@ -1,27 +1,49 @@
1
+ <div align="center">
2
+
1
3
  # @prereason/mcp
2
4
 
3
5
  [![npm version](https://img.shields.io/npm/v/@prereason/mcp.svg)](https://www.npmjs.com/package/@prereason/mcp)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@prereason/mcp.svg)](https://www.npmjs.com/package/@prereason/mcp)
7
+ [![node version](https://img.shields.io/node/v/@prereason/mcp.svg)](https://nodejs.org)
4
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
- [![PreReason/mcp MCP server](https://glama.ai/mcp/servers/PreReason/mcp/badges/score.svg)](https://glama.ai/mcp/servers/PreReason/mcp)
9
+ [![Glama Score](https://glama.ai/mcp/servers/PreReason/mcp/badges/score.svg)](https://glama.ai/mcp/servers/PreReason/mcp)
6
10
 
7
- MCP server for [PreReason](https://www.prereason.com) the Context API for financial agents.
11
+ **MCP server for [PreReason](https://www.prereason.com) - the Context API for financial agents.**
8
12
 
9
- PreReason 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.
13
+ Give your agent market context, not raw price feeds. 17 briefings covering BTC, macro,<br>
14
+ cross-asset regimes, and liquidity - each with trend signals, confidence scores, and causal narratives.
10
15
 
11
- [![prereason-mcp MCP server](https://glama.ai/mcp/servers/PreReason/mcp/badges/card.svg)](https://glama.ai/mcp/servers/PreReason/mcp)
16
+ </div>
12
17
 
13
18
  ## Quick Start
14
19
 
15
- ### Option 1: Direct HTTP (Claude Code, Cursor, Windsurf, etc.)
20
+ ### Option 1: One-Click Connect (Claude.ai, ChatGPT, Cursor, Codex, Windsurf, VS Code Copilot)
21
+
22
+ Clients that support MCP OAuth can connect with no API key setup required. Add the server URL and the client handles the rest - you'll be prompted to sign in or create a free account, and your API key is provisioned automatically.
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "prereason": {
28
+ "type": "http",
29
+ "url": "https://api.prereason.com/api/mcp"
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ No `Authorization` header needed - OAuth handles it.
36
+
37
+ ### Option 2: Direct HTTP with API Key (Claude Code, scripts, cron jobs)
16
38
 
17
- Clients that support remote MCP servers can connect directly with no bridge package needed.
39
+ For CLI tools or when you want to use an existing API key:
18
40
 
19
41
  ```bash
20
42
  # Claude Code (CLI one-liner)
21
43
  claude mcp add prereason --transport http https://api.prereason.com/api/mcp
22
44
  ```
23
45
 
24
- Or add to `.mcp.json` / your client's MCP config:
46
+ Or with an explicit key in your MCP config:
25
47
 
26
48
  ```json
27
49
  {
@@ -37,7 +59,7 @@ Or add to `.mcp.json` / your client's MCP config:
37
59
  }
38
60
  ```
39
61
 
40
- ### Option 2: stdio bridge (Claude Desktop and other stdio-only clients)
62
+ ### Option 3: stdio bridge (Claude Desktop and other stdio-only clients)
41
63
 
42
64
  **Requires [Node.js 18+](https://nodejs.org)**
43
65
 
@@ -74,7 +96,7 @@ Restart your MCP client after editing the config. PreReason should appear with 5
74
96
  | Tool | Auth | Description |
75
97
  |------|------|-------------|
76
98
  | `list_briefings` | Open | List all 17 pre-reasoned market briefings with tier requirements |
77
- | `list_metrics` | Open | List all 38 available metrics: 30 API + 8 mining/energy (filterable by category) |
99
+ | `list_metrics` | Open | List all 30 available metrics across bitcoin, macro, and calculated categories |
78
100
  | `get_health` | Open | API health check, version, account tier |
79
101
  | `get_context` | Required | Fetch a pre-reasoned market briefing (markdown or JSON) |
80
102
  | `get_metric` | Required | Fetch a single metric with trend/signal/percentile |
@@ -188,6 +210,10 @@ npx @prereason/mcp --help
188
210
  - [Terms of Service](https://www.prereason.com/terms)
189
211
  - [Privacy Policy](https://www.prereason.com/privacy)
190
212
 
213
+ ## Privacy Policy
214
+
215
+ See [prereason.com/privacy](https://www.prereason.com/privacy) for data handling practices.
216
+
191
217
  ## License
192
218
 
193
- MIT
219
+ MIT
package/bin/cli.js CHANGED
@@ -22,7 +22,7 @@ import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/
22
22
 
23
23
  // Keep in sync with package.json on each release
24
24
  const PKG_NAME = '@prereason/mcp';
25
- const PKG_VERSION = '0.2.0';
25
+ const PKG_VERSION = '0.3.1';
26
26
  const DEFAULT_URL = 'https://api.prereason.com/api/mcp';
27
27
 
28
28
  // --- Help / Version ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prereason/mcp",
3
- "version": "0.2.1",
4
- "mcpName": "com.prereason/mcp",
3
+ "version": "0.3.1",
4
+ "mcpName": "io.github.PreReason/mcp",
5
5
  "type": "module",
6
6
  "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.",
7
7
  "bin": {
@@ -41,10 +41,21 @@
41
41
  "pre-reasoned",
42
42
  "context-protocol"
43
43
  ],
44
+ "author": {
45
+ "name": "PreReason",
46
+ "url": "https://www.prereason.com"
47
+ },
44
48
  "license": "MIT",
45
49
  "homepage": "https://www.prereason.com/docs#mcp",
46
50
  "repository": {
47
51
  "type": "git",
48
52
  "url": "git+https://github.com/PreReason/mcp.git"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/PreReason/mcp/issues"
56
+ },
57
+ "funding": {
58
+ "type": "individual",
59
+ "url": "https://www.prereason.com/signup"
49
60
  }
50
61
  }