options-data-mcp 0.1.2 → 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,12 +1,18 @@
1
1
  {
2
2
  "name": "options-data-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "mcpName": "io.github.thelogicaldude/options-data",
5
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"
9
9
  },
10
+ "files": [
11
+ "dist/",
12
+ "src/",
13
+ "README.md",
14
+ "tsconfig.json"
15
+ ],
10
16
  "type": "module",
11
17
  "scripts": {
12
18
  "build": "tsc",
@@ -27,7 +33,14 @@
27
33
  "url": "git+https://github.com/thelogicaldude/options-data-mcp.git"
28
34
  },
29
35
  "homepage": "https://github.com/thelogicaldude/options-data-mcp#readme",
30
- "keywords": ["mcp", "options", "gamma", "vrp", "trading", "ai-agent"],
36
+ "keywords": [
37
+ "mcp",
38
+ "options",
39
+ "gamma",
40
+ "vrp",
41
+ "trading",
42
+ "ai-agent"
43
+ ],
31
44
  "license": "MIT",
32
45
  "engines": {
33
46
  "node": ">=18"
@@ -45,9 +58,14 @@
45
58
  "inputSchema": {
46
59
  "type": "object",
47
60
  "properties": {
48
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. AAPL, TSLA, SPY" }
61
+ "ticker": {
62
+ "type": "string",
63
+ "description": "Ticker symbol, e.g. AAPL, TSLA, SPY"
64
+ }
49
65
  },
50
- "required": ["ticker"]
66
+ "required": [
67
+ "ticker"
68
+ ]
51
69
  }
52
70
  },
53
71
  {
@@ -56,9 +74,14 @@
56
74
  "inputSchema": {
57
75
  "type": "object",
58
76
  "properties": {
59
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. AAPL, TSLA" }
77
+ "ticker": {
78
+ "type": "string",
79
+ "description": "Ticker symbol, e.g. AAPL, TSLA"
80
+ }
60
81
  },
61
- "required": ["ticker"]
82
+ "required": [
83
+ "ticker"
84
+ ]
62
85
  }
63
86
  },
64
87
  {
@@ -67,9 +90,14 @@
67
90
  "inputSchema": {
68
91
  "type": "object",
69
92
  "properties": {
70
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. AAPL, SPY" }
93
+ "ticker": {
94
+ "type": "string",
95
+ "description": "Ticker symbol, e.g. AAPL, SPY"
96
+ }
71
97
  },
72
- "required": ["ticker"]
98
+ "required": [
99
+ "ticker"
100
+ ]
73
101
  }
74
102
  },
75
103
  {
@@ -78,9 +106,14 @@
78
106
  "inputSchema": {
79
107
  "type": "object",
80
108
  "properties": {
81
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. AAPL, TSLA, SPY" }
109
+ "ticker": {
110
+ "type": "string",
111
+ "description": "Ticker symbol, e.g. AAPL, TSLA, SPY"
112
+ }
82
113
  },
83
- "required": ["ticker"]
114
+ "required": [
115
+ "ticker"
116
+ ]
84
117
  }
85
118
  },
86
119
  {
@@ -89,9 +122,14 @@
89
122
  "inputSchema": {
90
123
  "type": "object",
91
124
  "properties": {
92
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. AAPL, SPY" }
125
+ "ticker": {
126
+ "type": "string",
127
+ "description": "Ticker symbol, e.g. AAPL, SPY"
128
+ }
93
129
  },
94
- "required": ["ticker"]
130
+ "required": [
131
+ "ticker"
132
+ ]
95
133
  }
96
134
  },
97
135
  {
@@ -100,9 +138,14 @@
100
138
  "inputSchema": {
101
139
  "type": "object",
102
140
  "properties": {
103
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. AAPL, TSLA" }
141
+ "ticker": {
142
+ "type": "string",
143
+ "description": "Ticker symbol, e.g. AAPL, TSLA"
144
+ }
104
145
  },
105
- "required": ["ticker"]
146
+ "required": [
147
+ "ticker"
148
+ ]
106
149
  }
107
150
  },
108
151
  {
@@ -111,9 +154,14 @@
111
154
  "inputSchema": {
112
155
  "type": "object",
113
156
  "properties": {
114
- "ticker": { "type": "string", "description": "Ticker symbol, e.g. SPY, QQQ" }
157
+ "ticker": {
158
+ "type": "string",
159
+ "description": "Ticker symbol, e.g. SPY, QQQ"
160
+ }
115
161
  },
116
- "required": ["ticker"]
162
+ "required": [
163
+ "ticker"
164
+ ]
117
165
  }
118
166
  },
119
167
  {
@@ -122,9 +170,21 @@
122
170
  "inputSchema": {
123
171
  "type": "object",
124
172
  "properties": {
125
- "ticker": { "type": "string", "description": "Optional ticker to focus screener on specific sector", "default": "" },
126
- "min_iv": { "type": "number", "description": "Minimum IV percentage (default 60)", "default": 60 },
127
- "max_results": { "type": "number", "description": "Max results to return (default 20)", "default": 20 }
173
+ "ticker": {
174
+ "type": "string",
175
+ "description": "Optional ticker to focus screener on specific sector",
176
+ "default": ""
177
+ },
178
+ "min_iv": {
179
+ "type": "number",
180
+ "description": "Minimum IV percentage (default 60)",
181
+ "default": 60
182
+ },
183
+ "max_results": {
184
+ "type": "number",
185
+ "description": "Max results to return (default 20)",
186
+ "default": 20
187
+ }
128
188
  },
129
189
  "required": []
130
190
  }
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(
Binary file