headless-oracle-setup 1.0.0

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 (3) hide show
  1. package/README.md +47 -0
  2. package/bin/setup.js +68 -0
  3. package/package.json +25 -0
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # headless-oracle-setup
2
+
3
+ One command. Works in Claude Desktop, Cursor, and Windsurf. Zero config.
4
+
5
+ ```bash
6
+ npx headless-oracle-setup
7
+ ```
8
+
9
+ ## What it does
10
+
11
+ Configures the [Headless Oracle](https://headlessoracle.com) MCP server in every supported AI client found on your machine:
12
+
13
+ - **Claude Desktop** — `claude_desktop_config.json`
14
+ - **Cursor** — `~/.cursor/mcp.json`
15
+ - **Windsurf** — `~/.codeium/windsurf/mcp_config.json`
16
+
17
+ After running, restart your AI client and ask: **"Is NYSE open right now?"**
18
+
19
+ ## What you get
20
+
21
+ - `get_market_status` — Ed25519-signed receipt: OPEN, CLOSED, HALTED, or UNKNOWN
22
+ - `get_market_schedule` — Next open/close times for any exchange
23
+ - `list_exchanges` — All 28 supported markets
24
+ - `verify_receipt` — Verify a receipt's signature
25
+
26
+ 28 global exchanges. Equities, derivatives, and 24/7 crypto (Coinbase, Binance).
27
+ Fail-closed: UNKNOWN always means do not execute.
28
+
29
+ **Note**: SMA receipts denote "Signed Market Attestation" — not Simple Moving Average.
30
+
31
+ ## Manual config
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "headless-oracle": {
37
+ "url": "https://headlessoracle.com/mcp"
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ ## Links
44
+
45
+ - [Docs](https://headlessoracle.com/docs)
46
+ - [MCP Server Card](https://headlessoracle.com/.well-known/mcp/server-card.json)
47
+ - [OpenAPI Spec](https://headlessoracle.com/openapi.json)
package/bin/setup.js ADDED
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const os = require('os');
6
+ const path = require('path');
7
+
8
+ const MCP_SERVER_CONFIG = {
9
+ 'headless-oracle': {
10
+ url: 'https://headlessoracle.com/mcp',
11
+ },
12
+ };
13
+
14
+ const clients = {
15
+ 'Claude Desktop': {
16
+ darwin: path.join(os.homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json'),
17
+ win32: path.join(process.env.APPDATA || path.join(os.homedir(), 'AppData', 'Roaming'), 'Claude', 'claude_desktop_config.json'),
18
+ },
19
+ 'Cursor': {
20
+ darwin: path.join(os.homedir(), '.cursor', 'mcp.json'),
21
+ win32: path.join(os.homedir(), '.cursor', 'mcp.json'),
22
+ linux: path.join(os.homedir(), '.cursor', 'mcp.json'),
23
+ },
24
+ 'Windsurf': {
25
+ darwin: path.join(os.homedir(), '.codeium', 'windsurf', 'mcp_config.json'),
26
+ win32: path.join(os.homedir(), '.codeium', 'windsurf', 'mcp_config.json'),
27
+ linux: path.join(os.homedir(), '.codeium', 'windsurf', 'mcp_config.json'),
28
+ },
29
+ };
30
+
31
+ let configured = 0;
32
+
33
+ for (const [name, paths] of Object.entries(clients)) {
34
+ const cfgPath = paths[process.platform];
35
+ if (!cfgPath) continue;
36
+
37
+ const dir = path.dirname(cfgPath);
38
+ if (!fs.existsSync(dir)) continue;
39
+
40
+ let config = {};
41
+ if (fs.existsSync(cfgPath)) {
42
+ try { config = JSON.parse(fs.readFileSync(cfgPath, 'utf8')); } catch (_) {}
43
+ }
44
+
45
+ config.mcpServers = { ...(config.mcpServers || {}), ...MCP_SERVER_CONFIG };
46
+
47
+ try {
48
+ fs.writeFileSync(cfgPath, JSON.stringify(config, null, 2));
49
+ console.log('\u2713 ' + name + ' configured');
50
+ configured++;
51
+ } catch (e) {
52
+ console.log('\u2717 ' + name + ': could not write config (' + e.message + ')');
53
+ }
54
+ }
55
+
56
+ if (configured === 0) {
57
+ console.log('\nNo supported MCP clients found.');
58
+ console.log('Install Claude Desktop, Cursor, or Windsurf first.');
59
+ console.log('Manual config: https://headlessoracle.com/docs#mcp\n');
60
+ console.log('Or add this to your client config manually:');
61
+ console.log(JSON.stringify({ mcpServers: MCP_SERVER_CONFIG }, null, 2));
62
+ } else {
63
+ console.log('\n\u2713 Headless Oracle configured in ' + configured + ' client(s)');
64
+ console.log('\nRestart your AI client, then ask:');
65
+ console.log(' "Is NYSE open right now?"');
66
+ console.log('\nDocs: https://headlessoracle.com/docs');
67
+ console.log('28 global exchanges. Ed25519-signed. Fail-closed.\n');
68
+ }
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "headless-oracle-setup",
3
+ "version": "1.0.0",
4
+ "description": "One-command MCP setup for Headless Oracle in Claude Desktop, Cursor, and Windsurf. 28 global exchanges, Ed25519-signed, fail-closed.",
5
+ "bin": {
6
+ "headless-oracle-setup": "./bin/setup.js"
7
+ },
8
+ "keywords": [
9
+ "headless-oracle",
10
+ "mcp",
11
+ "market-data",
12
+ "trading",
13
+ "agents",
14
+ "ed25519",
15
+ "signed-receipts"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/LembaGang/headless-oracle-v5"
20
+ },
21
+ "license": "MIT",
22
+ "engines": {
23
+ "node": ">=14"
24
+ }
25
+ }