options-data-mcp 0.1.3 → 0.1.4

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/dist/index.js CHANGED
@@ -2,6 +2,12 @@
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { z } from "zod";
5
+ import { readFileSync } from "node:fs";
6
+ import { fileURLToPath } from "node:url";
7
+ import { dirname, join } from "node:path";
8
+ // Single source of truth for the version: package.json. Never hardcode it here.
9
+ // Resolves from dist/index.js (../package.json) and from src via tsx.
10
+ const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), "..", "package.json"), "utf8"));
5
11
  const API_BASE = process.env.API_BASE || "https://api.optionsdataapi.com";
6
12
  const API_KEY = process.env.OPTIONS_DATA_API_KEY || "";
7
13
  async function fetchEndpoint(path, params = {}) {
@@ -21,7 +27,7 @@ async function fetchEndpoint(path, params = {}) {
21
27
  }
22
28
  const server = new McpServer({
23
29
  name: "options-data",
24
- version: "0.1.2",
30
+ version: pkg.version,
25
31
  });
26
32
  function registerTool(name, description, inputSchema, handler) {
27
33
  server.tool(name, description, inputSchema.shape, handler);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "options-data-mcp",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "mcpName": "io.github.thelogicaldude/options-data",
5
- "description": "MCP server for Options Data API \u2014 gamma exposure, VRP, IV term structure, and more",
5
+ "description": "MCP server for Options Data API — gamma exposure, VRP, IV term structure, and more",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "options-data-mcp": "dist/index.js"
@@ -48,13 +48,13 @@
48
48
  "mcp": {
49
49
  "server": {
50
50
  "name": "options-data",
51
- "description": "Options market structure data via the Options Data API \u2014 gamma exposure, volatility richness, IV term structure, GEX regime, strike recommendations, credit spreads, and a universe screener. Supports both subscription auth (X-API-Key header) and x402 pay-per-call (no key needed).",
51
+ "description": "Options market structure data via the Options Data API — gamma exposure, volatility richness, IV term structure, GEX regime, strike recommendations, credit spreads, and a universe screener. Supports both subscription auth (X-API-Key header) and x402 pay-per-call (no key needed).",
52
52
  "version": "0.1.2",
53
53
  "repository": "github.com/thelogicaldude/options-data-mcp",
54
54
  "tools": [
55
55
  {
56
56
  "name": "get_gamma",
57
- "description": "Get gamma exposure profile for a ticker \u2014 shows dealer positioning, flip zone, and pin strikes",
57
+ "description": "Get gamma exposure profile for a ticker — shows dealer positioning, flip zone, and pin strikes",
58
58
  "inputSchema": {
59
59
  "type": "object",
60
60
  "properties": {
@@ -70,7 +70,7 @@
70
70
  },
71
71
  {
72
72
  "name": "get_vrp",
73
- "description": "Get volatility richness premium \u2014 compares ATM IV to 30-day realized volatility",
73
+ "description": "Get volatility richness premium — compares ATM IV to 30-day realized volatility",
74
74
  "inputSchema": {
75
75
  "type": "object",
76
76
  "properties": {
@@ -102,7 +102,7 @@
102
102
  },
103
103
  {
104
104
  "name": "get_structure",
105
- "description": "Full structure bundle \u2014 gamma, VRP, and term structure in one call",
105
+ "description": "Full structure bundle — gamma, VRP, and term structure in one call",
106
106
  "inputSchema": {
107
107
  "type": "object",
108
108
  "properties": {
@@ -118,7 +118,7 @@
118
118
  },
119
119
  {
120
120
  "name": "get_regime",
121
- "description": "Get GEX regime \u2014 stabilizing vs destabilizing, flip zone status",
121
+ "description": "Get GEX regime — stabilizing vs destabilizing, flip zone status",
122
122
  "inputSchema": {
123
123
  "type": "object",
124
124
  "properties": {
@@ -134,7 +134,7 @@
134
134
  },
135
135
  {
136
136
  "name": "get_strikes",
137
- "description": "Get recommended strikes \u2014 wheel/covered-call picks or GEX-based support/resistance",
137
+ "description": "Get recommended strikes — wheel/covered-call picks or GEX-based support/resistance",
138
138
  "inputSchema": {
139
139
  "type": "object",
140
140
  "properties": {
@@ -150,7 +150,7 @@
150
150
  },
151
151
  {
152
152
  "name": "get_credit_spread",
153
- "description": "Get credit spread setup \u2014 GEX-regime-gated put/call spreads with sizing",
153
+ "description": "Get credit spread setup — GEX-regime-gated put/call spreads with sizing",
154
154
  "inputSchema": {
155
155
  "type": "object",
156
156
  "properties": {
@@ -192,4 +192,4 @@
192
192
  ]
193
193
  }
194
194
  }
195
- }
195
+ }
package/src/index.ts CHANGED
@@ -2,6 +2,15 @@
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { z } from "zod";
5
+ import { readFileSync } from "node:fs";
6
+ import { fileURLToPath } from "node:url";
7
+ import { dirname, join } from "node:path";
8
+
9
+ // Single source of truth for the version: package.json. Never hardcode it here.
10
+ // Resolves from dist/index.js (../package.json) and from src via tsx.
11
+ const pkg = JSON.parse(
12
+ readFileSync(join(dirname(fileURLToPath(import.meta.url)), "..", "package.json"), "utf8")
13
+ ) as { version: string };
5
14
 
6
15
  const API_BASE = process.env.API_BASE || "https://api.optionsdataapi.com";
7
16
  const API_KEY = process.env.OPTIONS_DATA_API_KEY || "";
@@ -24,7 +33,7 @@ async function fetchEndpoint(path: string, params: Record<string, string> = {})
24
33
 
25
34
  const server = new McpServer({
26
35
  name: "options-data",
27
- version: "0.1.2",
36
+ version: pkg.version,
28
37
  });
29
38
 
30
39
  function registerTool(