finimpulse-mcp-server 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 (182) hide show
  1. package/README.md +260 -0
  2. package/build/config/global.tool.js +21 -0
  3. package/build/config/global.tool.js.map +1 -0
  4. package/build/http/client.js +86 -0
  5. package/build/http/client.js.map +1 -0
  6. package/build/index.js +18 -0
  7. package/build/index.js.map +1 -0
  8. package/build/server.js +11 -0
  9. package/build/server.js.map +1 -0
  10. package/build/tools/financials/balance_sheet/handler.js +4 -0
  11. package/build/tools/financials/balance_sheet/handler.js.map +1 -0
  12. package/build/tools/financials/balance_sheet/index.js +6 -0
  13. package/build/tools/financials/balance_sheet/index.js.map +1 -0
  14. package/build/tools/financials/balance_sheet/schema.js +8 -0
  15. package/build/tools/financials/balance_sheet/schema.js.map +1 -0
  16. package/build/tools/financials/balance_sheet/types.js +2 -0
  17. package/build/tools/financials/balance_sheet/types.js.map +1 -0
  18. package/build/tools/financials/cash_flow/handler.js +4 -0
  19. package/build/tools/financials/cash_flow/handler.js.map +1 -0
  20. package/build/tools/financials/cash_flow/index.js +6 -0
  21. package/build/tools/financials/cash_flow/index.js.map +1 -0
  22. package/build/tools/financials/cash_flow/schema.js +8 -0
  23. package/build/tools/financials/cash_flow/schema.js.map +1 -0
  24. package/build/tools/financials/cash_flow/types.js +2 -0
  25. package/build/tools/financials/cash_flow/types.js.map +1 -0
  26. package/build/tools/financials/general/handler.js +4 -0
  27. package/build/tools/financials/general/handler.js.map +1 -0
  28. package/build/tools/financials/general/index.js +6 -0
  29. package/build/tools/financials/general/index.js.map +1 -0
  30. package/build/tools/financials/general/schema.js +9 -0
  31. package/build/tools/financials/general/schema.js.map +1 -0
  32. package/build/tools/financials/general/types.js +2 -0
  33. package/build/tools/financials/general/types.js.map +1 -0
  34. package/build/tools/financials/income_statement/handler.js +4 -0
  35. package/build/tools/financials/income_statement/handler.js.map +1 -0
  36. package/build/tools/financials/income_statement/index.js +6 -0
  37. package/build/tools/financials/income_statement/index.js.map +1 -0
  38. package/build/tools/financials/income_statement/schema.js +8 -0
  39. package/build/tools/financials/income_statement/schema.js.map +1 -0
  40. package/build/tools/financials/income_statement/types.js +2 -0
  41. package/build/tools/financials/income_statement/types.js.map +1 -0
  42. package/build/tools/financials/valuation_measures/handler.js +4 -0
  43. package/build/tools/financials/valuation_measures/handler.js.map +1 -0
  44. package/build/tools/financials/valuation_measures/index.js +6 -0
  45. package/build/tools/financials/valuation_measures/index.js.map +1 -0
  46. package/build/tools/financials/valuation_measures/schema.js +8 -0
  47. package/build/tools/financials/valuation_measures/schema.js.map +1 -0
  48. package/build/tools/financials/valuation_measures/types.js +2 -0
  49. package/build/tools/financials/valuation_measures/types.js.map +1 -0
  50. package/build/tools/historical/handler.js +4 -0
  51. package/build/tools/historical/handler.js.map +1 -0
  52. package/build/tools/historical/index.js +6 -0
  53. package/build/tools/historical/index.js.map +1 -0
  54. package/build/tools/historical/schema.js +35 -0
  55. package/build/tools/historical/schema.js.map +1 -0
  56. package/build/tools/historical/types.js +2 -0
  57. package/build/tools/historical/types.js.map +1 -0
  58. package/build/tools/holders/general/handler.js +4 -0
  59. package/build/tools/holders/general/handler.js.map +1 -0
  60. package/build/tools/holders/general/index.js +6 -0
  61. package/build/tools/holders/general/index.js.map +1 -0
  62. package/build/tools/holders/general/schema.js +5 -0
  63. package/build/tools/holders/general/schema.js.map +1 -0
  64. package/build/tools/holders/general/types.js +2 -0
  65. package/build/tools/holders/general/types.js.map +1 -0
  66. package/build/tools/holders/insiders/handler.js +4 -0
  67. package/build/tools/holders/insiders/handler.js.map +1 -0
  68. package/build/tools/holders/insiders/index.js +6 -0
  69. package/build/tools/holders/insiders/index.js.map +1 -0
  70. package/build/tools/holders/insiders/schema.js +56 -0
  71. package/build/tools/holders/insiders/schema.js.map +1 -0
  72. package/build/tools/holders/insiders/types.js +2 -0
  73. package/build/tools/holders/insiders/types.js.map +1 -0
  74. package/build/tools/holders/insiders-transactions/handler.js +4 -0
  75. package/build/tools/holders/insiders-transactions/handler.js.map +1 -0
  76. package/build/tools/holders/insiders-transactions/index.js +6 -0
  77. package/build/tools/holders/insiders-transactions/index.js.map +1 -0
  78. package/build/tools/holders/insiders-transactions/schema.js +56 -0
  79. package/build/tools/holders/insiders-transactions/schema.js.map +1 -0
  80. package/build/tools/holders/insiders-transactions/types.js +2 -0
  81. package/build/tools/holders/insiders-transactions/types.js.map +1 -0
  82. package/build/tools/holders/institutional/handler.js +4 -0
  83. package/build/tools/holders/institutional/handler.js.map +1 -0
  84. package/build/tools/holders/institutional/index.js +6 -0
  85. package/build/tools/holders/institutional/index.js.map +1 -0
  86. package/build/tools/holders/institutional/schema.js +56 -0
  87. package/build/tools/holders/institutional/schema.js.map +1 -0
  88. package/build/tools/holders/institutional/types.js +2 -0
  89. package/build/tools/holders/institutional/types.js.map +1 -0
  90. package/build/tools/holders/mutual-funds/handler.js +4 -0
  91. package/build/tools/holders/mutual-funds/handler.js.map +1 -0
  92. package/build/tools/holders/mutual-funds/index.js +6 -0
  93. package/build/tools/holders/mutual-funds/index.js.map +1 -0
  94. package/build/tools/holders/mutual-funds/schema.js +56 -0
  95. package/build/tools/holders/mutual-funds/schema.js.map +1 -0
  96. package/build/tools/holders/mutual-funds/types.js +2 -0
  97. package/build/tools/holders/mutual-funds/types.js.map +1 -0
  98. package/build/tools/holdings/general/handler.js +4 -0
  99. package/build/tools/holdings/general/handler.js.map +1 -0
  100. package/build/tools/holdings/general/index.js +6 -0
  101. package/build/tools/holdings/general/index.js.map +1 -0
  102. package/build/tools/holdings/general/schema.js +5 -0
  103. package/build/tools/holdings/general/schema.js.map +1 -0
  104. package/build/tools/holdings/general/types.js +2 -0
  105. package/build/tools/holdings/general/types.js.map +1 -0
  106. package/build/tools/holdings/top-holdings/handler.js +4 -0
  107. package/build/tools/holdings/top-holdings/handler.js.map +1 -0
  108. package/build/tools/holdings/top-holdings/index.js +6 -0
  109. package/build/tools/holdings/top-holdings/index.js.map +1 -0
  110. package/build/tools/holdings/top-holdings/schema.js +56 -0
  111. package/build/tools/holdings/top-holdings/schema.js.map +1 -0
  112. package/build/tools/holdings/top-holdings/types.js +2 -0
  113. package/build/tools/holdings/top-holdings/types.js.map +1 -0
  114. package/build/tools/index.js +43 -0
  115. package/build/tools/index.js.map +1 -0
  116. package/build/tools/news/handler.js +4 -0
  117. package/build/tools/news/handler.js.map +1 -0
  118. package/build/tools/news/index.js +6 -0
  119. package/build/tools/news/index.js.map +1 -0
  120. package/build/tools/news/schema.js +51 -0
  121. package/build/tools/news/schema.js.map +1 -0
  122. package/build/tools/news/types.js +2 -0
  123. package/build/tools/news/types.js.map +1 -0
  124. package/build/tools/profile/handler.js +4 -0
  125. package/build/tools/profile/handler.js.map +1 -0
  126. package/build/tools/profile/index.js +6 -0
  127. package/build/tools/profile/index.js.map +1 -0
  128. package/build/tools/profile/schema.js +5 -0
  129. package/build/tools/profile/schema.js.map +1 -0
  130. package/build/tools/profile/types.js +2 -0
  131. package/build/tools/profile/types.js.map +1 -0
  132. package/build/tools/search/handler.js +4 -0
  133. package/build/tools/search/handler.js.map +1 -0
  134. package/build/tools/search/index.js +6 -0
  135. package/build/tools/search/index.js.map +1 -0
  136. package/build/tools/search/schema.js +58 -0
  137. package/build/tools/search/schema.js.map +1 -0
  138. package/build/tools/search/types.js +2 -0
  139. package/build/tools/search/types.js.map +1 -0
  140. package/build/tools/statistics/annual-returns/handler.js +4 -0
  141. package/build/tools/statistics/annual-returns/handler.js.map +1 -0
  142. package/build/tools/statistics/annual-returns/index.js +6 -0
  143. package/build/tools/statistics/annual-returns/index.js.map +1 -0
  144. package/build/tools/statistics/annual-returns/schema.js +5 -0
  145. package/build/tools/statistics/annual-returns/schema.js.map +1 -0
  146. package/build/tools/statistics/annual-returns/types.js +2 -0
  147. package/build/tools/statistics/annual-returns/types.js.map +1 -0
  148. package/build/tools/statistics/general/handler.js +4 -0
  149. package/build/tools/statistics/general/handler.js.map +1 -0
  150. package/build/tools/statistics/general/index.js +6 -0
  151. package/build/tools/statistics/general/index.js.map +1 -0
  152. package/build/tools/statistics/general/schema.js +5 -0
  153. package/build/tools/statistics/general/schema.js.map +1 -0
  154. package/build/tools/statistics/general/types.js +2 -0
  155. package/build/tools/statistics/general/types.js.map +1 -0
  156. package/build/tools/statistics/risks/handler.js +4 -0
  157. package/build/tools/statistics/risks/handler.js.map +1 -0
  158. package/build/tools/statistics/risks/index.js +6 -0
  159. package/build/tools/statistics/risks/index.js.map +1 -0
  160. package/build/tools/statistics/risks/schema.js +56 -0
  161. package/build/tools/statistics/risks/schema.js.map +1 -0
  162. package/build/tools/statistics/risks/types.js +2 -0
  163. package/build/tools/statistics/risks/types.js.map +1 -0
  164. package/build/tools/summary/handler.js +4 -0
  165. package/build/tools/summary/handler.js.map +1 -0
  166. package/build/tools/summary/index.js +6 -0
  167. package/build/tools/summary/index.js.map +1 -0
  168. package/build/tools/summary/schema.js +5 -0
  169. package/build/tools/summary/schema.js.map +1 -0
  170. package/build/tools/summary/types.js +2 -0
  171. package/build/tools/summary/types.js.map +1 -0
  172. package/build/transports/http.js +69 -0
  173. package/build/transports/http.js.map +1 -0
  174. package/build/transports/stdio.js +9 -0
  175. package/build/transports/stdio.js.map +1 -0
  176. package/build/types/finimpulse.js +2 -0
  177. package/build/types/finimpulse.js.map +1 -0
  178. package/build/utils/filters.js +11 -0
  179. package/build/utils/filters.js.map +1 -0
  180. package/build/utils/version.js +39 -0
  181. package/build/utils/version.js.map +1 -0
  182. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,260 @@
1
+ # FinImpulse MCP Server
2
+
3
+ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides structured financial market data to AI systems and development tools through the [FinImpulse API](https://finimpulse.com).
4
+
5
+ It allows AI systems to access FinImpulse data — including stocks, ETFs, mutual funds, fundamentals, and market indicators — using a standardized MCP interface. The server acts as a bridge between the FinImpulse API and any MCP-compatible client, enabling LLMs and automation tools to retrieve financial data in a consistent format without building custom integrations.
6
+
7
+ ## How It Works
8
+
9
+ ```
10
+ AI Client (Claude / ChatGPT / Cursor / ...)
11
+ ↓
12
+ MCP Server
13
+ ↓
14
+ FinImpulse API
15
+ ↓
16
+ Financial Data
17
+ ```
18
+
19
+ The MCP server translates tool calls from AI clients into FinImpulse API requests and returns structured responses that AI models can interpret. This architecture allows AI tools to access financial datasets without implementing direct API integrations.
20
+
21
+ ## Key Features
22
+
23
+ - Structured financial market data via MCP
24
+ - Global coverage of stocks, ETFs, and mutual funds
25
+ - Standardized tools for AI agents and developer environments
26
+ - Compatible with major MCP clients and AI platforms
27
+
28
+ ## Use Cases
29
+
30
+ - AI investment assistants
31
+ - Automated financial research workflows
32
+ - AI-assisted financial dashboards
33
+ - Trading assistants
34
+ - Portfolio analysis tools
35
+ - Developer environments retrieving market data
36
+
37
+ **Example prompt** — once connected, an AI system can retrieve financial data using natural language:
38
+
39
+ > Compare Microsoft and Google in terms of revenue growth and profitability.
40
+
41
+ ## Requirements
42
+
43
+ - [Node.js](https://nodejs.org/) 18+
44
+ - A FinImpulse API token (obtain it in the [FinImpulse Dashboard](https://app.finimpulse.com/developer/settings))
45
+
46
+ ## Quick Start
47
+
48
+ ### Claude Desktop
49
+
50
+ Open `claude_desktop_config.json`:
51
+
52
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
53
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
54
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
55
+
56
+ Add the server configuration:
57
+
58
+ ```json
59
+ {
60
+ "mcpServers": {
61
+ "finimpulse": {
62
+ "command": "npx",
63
+ "args": ["-y", "finimpulse-mcp-server"],
64
+ "env": {
65
+ "API_TOKEN": "your-api-token"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Claude Code
73
+
74
+ ```bash
75
+ claude mcp add finimpulse -- npx -y finimpulse-mcp-server
76
+ ```
77
+
78
+ Then set the `API_TOKEN` environment variable or pass it inline.
79
+
80
+ ### ChatGPT
81
+
82
+ ChatGPT supports MCP via its desktop app. Add the server in **Settings → MCP Servers** with the same `npx` command.
83
+
84
+ ### Cursor
85
+
86
+ Open `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-level) and add:
87
+
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "finimpulse": {
92
+ "command": "npx",
93
+ "args": ["-y", "finimpulse-mcp-server"],
94
+ "env": {
95
+ "API_TOKEN": "your-api-token"
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ### Windsurf
103
+
104
+ Open `~/.codeium/windsurf/mcp_config.json` and add:
105
+
106
+ ```json
107
+ {
108
+ "mcpServers": {
109
+ "finimpulse": {
110
+ "command": "npx",
111
+ "args": ["-y", "finimpulse-mcp-server"],
112
+ "env": {
113
+ "API_TOKEN": "your-api-token"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ ### VS Code (Copilot)
121
+
122
+ Open your VS Code `settings.json` and add:
123
+
124
+ ```json
125
+ {
126
+ "mcp": {
127
+ "servers": {
128
+ "finimpulse": {
129
+ "command": "npx",
130
+ "args": ["-y", "finimpulse-mcp-server"],
131
+ "env": {
132
+ "API_TOKEN": "your-api-token"
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ ### Gemini CLI
141
+
142
+ ```bash
143
+ gemini mcp add finimpulse -- npx -y finimpulse-mcp-server
144
+ ```
145
+
146
+ ### Cline
147
+
148
+ Open Cline settings, go to **MCP Servers**, and add a new server with this config:
149
+
150
+ ```json
151
+ {
152
+ "mcpServers": {
153
+ "finimpulse": {
154
+ "command": "npx",
155
+ "args": ["-y", "finimpulse-mcp-server"],
156
+ "env": {
157
+ "API_TOKEN": "your-api-token"
158
+ }
159
+ }
160
+ }
161
+ }
162
+ ```
163
+
164
+ ### Any MCP-Compatible Client (stdio)
165
+
166
+ ```bash
167
+ API_TOKEN=your-api-token npx finimpulse-mcp-server
168
+ ```
169
+
170
+ ## Available Tools
171
+
172
+ ### Search & Discovery
173
+
174
+ | Tool | Description |
175
+ |------|-------------|
176
+ | `get_search` | Cross-asset search for stocks, ETFs, and mutual funds. Powers ticker autocomplete and discovery flows. |
177
+
178
+ ### Market Data
179
+
180
+ | Tool | Description |
181
+ |------|-------------|
182
+ | `get_summary` | Comprehensive single-call snapshot: identity, market data, fundamentals, ownership, analyst coverage, and fund metrics. |
183
+ | `get_histories` | Historical time-series: prices, dividends, splits, and capital gains with configurable date range and interval. |
184
+ | `get_profile` | Asset profile and descriptive metadata: identity, classification, governance, and fund-specific attributes. |
185
+ | `get_news` | Latest news and press releases with headlines, descriptions, related tickers, and provider info. |
186
+
187
+ ### Statistics & Performance
188
+
189
+ | Tool | Description |
190
+ |------|-------------|
191
+ | `get_statistics_general` | Key statistics and performance indicators: valuation, dividends, risk, trailing returns. |
192
+ | `get_statistics_risks` | Risk-adjusted performance metrics (Alpha, Beta, Sharpe, Treynor, R-squared) across 3y/5y/10y horizons. |
193
+ | `get_statistics_annual_returns` | Historical annual total returns by calendar year with quarterly breakdowns. |
194
+
195
+ ### Financial Statements
196
+
197
+ | Tool | Description |
198
+ |------|-------------|
199
+ | `get_financials_general` | Unified financial statements and valuation measures across reporting intervals. |
200
+ | `get_financials_income_statement` | Detailed Income Statement: revenue, expenses, net income (annual/quarterly/trailing). |
201
+ | `get_financials_balance_sheet` | Balance Sheet: financial position and capital structure snapshot. |
202
+ | `get_financials_cash_flow` | Cash Flow Statement: operating, investing, and financing cash flows. |
203
+ | `get_financials_valuation_measures` | Valuation Measures: P/E, EV/EBITDA, P/B, and related metrics. |
204
+
205
+ ### Holders & Ownership
206
+
207
+ | Tool | Description |
208
+ |------|-------------|
209
+ | `get_holders_general` | High-level ownership snapshot: institutional and insider holdings percentages. |
210
+ | `get_holders_institutional` | Paginated list of institutional holders with position size, percent held, and value. |
211
+ | `get_holders_mutual_funds` | Mutual funds and ETFs that hold a given stock. |
212
+ | `get_holders_insiders` | Insider transaction records: actions, roles, and reported positions. |
213
+ | `get_holders_insiders_transactions` | Detailed insider transactions with share counts, values, and filer identity. |
214
+
215
+ ### Fund Holdings
216
+
217
+ | Tool | Description |
218
+ |------|-------------|
219
+ | `get_holdings_general` | Portfolio composition and holdings-level aggregates: asset allocation, sector exposure. |
220
+ | `get_holdings_top_holdings` | Top holdings list with ticker, name, and weight as % of total net assets. |
221
+
222
+ ## Configuration
223
+
224
+ | Environment Variable | Required | Description |
225
+ |---------------------|----------|-------------|
226
+ | `API_TOKEN` | Yes | Your FinImpulse API token |
227
+
228
+ ## Development
229
+
230
+ ```bash
231
+ git clone https://github.com/finimpulse/mcp-server-typescript.git
232
+ cd mcp-server-typescript
233
+ npm install
234
+ npm run build
235
+ ```
236
+
237
+ Run locally:
238
+
239
+ ```bash
240
+ API_TOKEN=your-api-token npm run cli
241
+ ```
242
+
243
+ ## Security
244
+
245
+ Keep your API token secure. Never expose API credentials in public repositories. Always store them using environment variables.
246
+
247
+ ## Disclaimer
248
+
249
+ The AI-powered features and examples provided through FinImpulse MCP are intended for informational and research purposes only. Any insights, summaries, or suggestions generated by AI systems using FinImpulse data should be considered analytical tools, not financial, investment, or trading advice.
250
+
251
+ FinImpulse does not provide investment recommendations and does not guarantee the accuracy, completeness, or suitability of AI-generated outputs. Users are solely responsible for evaluating any information produced by AI agents or applications built on top of FinImpulse MCP. Financial decisions should always be made based on independent analysis or consultation with qualified financial professionals.
252
+
253
+ ## Learn More
254
+
255
+ - [FinImpulse API Documentation](https://developers.finimpulse.com)
256
+ - [Model Context Protocol](https://modelcontextprotocol.io)
257
+
258
+ ## License
259
+
260
+ ISC
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export const GlobalToolConfigSchema = z.object({
3
+ simpleFilter: z.boolean().default(false),
4
+ fullResponse: z.boolean().default(false),
5
+ debug: z.boolean().default(false)
6
+ });
7
+ // Parse config from environment variables
8
+ export function parseGlobalToolConfig() {
9
+ const fullResponseEnv = process.env.FINIMPULSE_FULL_RESPONSE;
10
+ const debugEnv = process.env.DEBUG;
11
+ const simpleFilterEnv = process.env.FINIMPULSE_FULL_RESPONSE;
12
+ const config = {
13
+ fullResponse: fullResponseEnv === 'true',
14
+ debug: debugEnv === 'true',
15
+ simpleFilter: simpleFilterEnv === 'true'
16
+ };
17
+ return GlobalToolConfigSchema.parse(config);
18
+ }
19
+ // Export default config
20
+ export const defaultGlobalToolConfig = parseGlobalToolConfig();
21
+ //# sourceMappingURL=global.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.tool.js","sourceRoot":"","sources":["../../src/config/global.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACxC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACxC,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CACjC,CAAC,CAAC;AAIH,0CAA0C;AAC1C,MAAM,UAAU,qBAAqB;IACpC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAkC,CAAC;IACvE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,KAAe,CAAC;IAC7C,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAkC,CAAC;IACvE,MAAM,MAAM,GAAG;QACd,YAAY,EAAE,eAAe,KAAK,MAAM;QACxC,KAAK,EAAE,QAAQ,KAAK,MAAM;QAC1B,YAAY,EAAE,eAAe,KAAK,MAAM;KACxC,CAAC;IAEF,OAAO,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC;AAED,wBAAwB;AACxB,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { version } from '../utils/version.js';
2
+ export class ApiClient {
3
+ token;
4
+ API_BASE = 'https://api.finimpulse.com';
5
+ USER_AGENT = `FinImpulse-MCP-TypeScript-SDK/${version}`;
6
+ constructor(token) {
7
+ this.token = token;
8
+ }
9
+ async request(url, method = 'POST', body, forceFull = false) {
10
+ const headers = {
11
+ "User-Agent": this.USER_AGENT,
12
+ Accept: "application/json",
13
+ "Content-Type": "application/json",
14
+ Authorization: 'Bearer ' + this.token
15
+ };
16
+ // if(!defaultGlobalToolConfig.fullResponse && !forceFull){
17
+ // url += '.ai';
18
+ // }
19
+ const bodyStr = body ? JSON.stringify(body) : undefined;
20
+ try {
21
+ const response = await fetch(this.API_BASE + url, {
22
+ method,
23
+ headers,
24
+ body: bodyStr
25
+ });
26
+ if (!response.ok) {
27
+ throw new Error(`HTTP error! status: ${response.status}`);
28
+ }
29
+ return this.validateAndFormatResponse(await response.json());
30
+ }
31
+ catch (error) {
32
+ console.error("Error making request:", error);
33
+ return this.formatErrorResponse(error);
34
+ }
35
+ }
36
+ validateAndFormatResponse(response) {
37
+ // console.error(JSON.stringify(response));
38
+ // if (defaultGlobalToolConfig.fullResponse || this.supportOnlyFullResponse()) {
39
+ // let data = response as DataForSEOFullResponse;
40
+ // this.validateResponseFull(data);
41
+ // let result = data.tasks[0].result;
42
+ // return this.formatResponse(result);
43
+ // }
44
+ this.validateResponse(response);
45
+ return this.formatResponse(response);
46
+ }
47
+ validateResponse(response) {
48
+ if (response.status_code / 100 !== 200) {
49
+ throw new Error(`API Error: ${response.status_message} (Code: ${response.status_code})`);
50
+ }
51
+ }
52
+ formatResponse(data) {
53
+ // const fieldConfig = FieldConfigurationManager.getInstance();
54
+ // if (fieldConfig.hasConfiguration()) {
55
+ // const toolName = this.getName();
56
+ // if (fieldConfig.isToolConfigured(toolName)) {
57
+ // const fields = fieldConfig.getFieldsForTool(toolName);
58
+ // if (fields && fields.length > 0) {
59
+ // data = filterFields(data, parseFieldPaths(fields));
60
+ // }
61
+ // }
62
+ // }
63
+ return {
64
+ content: [
65
+ {
66
+ type: "text",
67
+ text: JSON.stringify(data, null, 2),
68
+ },
69
+ ],
70
+ };
71
+ }
72
+ formatErrorResponse(error) {
73
+ return {
74
+ content: [
75
+ {
76
+ type: "text",
77
+ text: `Error: ${this.formatError(error)}`,
78
+ },
79
+ ],
80
+ };
81
+ }
82
+ formatError(error) {
83
+ return error instanceof Error ? error.message : 'Unknown error';
84
+ }
85
+ }
86
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/http/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAG5C,MAAM,OAAO,SAAS;IAKQ;IAHrB,QAAQ,GAAG,4BAA4B,CAAC;IAExC,UAAU,GAAG,iCAAiC,OAAO,EAAE,CAAC;IAChE,YAA6B,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAE9C,KAAK,CAAC,OAAO,CAAI,GAAW,EAAE,SAAiB,MAAM,EAAE,IAAU,EAAE,YAAqB,KAAK;QAC5F,MAAM,OAAO,GAAgB;YAC5B,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,MAAM,EAAE,kBAAkB;YAC1B,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC,KAAK;SACrC,CAAC;QACF,2DAA2D;QAC3D,iBAAiB;QACjB,IAAI;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACxD,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE;gBACjD,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,OAAO;aACb,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAC3D,CAAC;YACD,OAAO,IAAI,CAAC,yBAAyB,CAAI,MAAM,QAAQ,CAAC,IAAI,EAA+B,CAAC,CAAA;QAC7F,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;YAC9C,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;IACF,CAAC;IAEO,yBAAyB,CAAI,QAAmC;QACvE,2CAA2C;QAC3C,gFAAgF;QAChF,kDAAkD;QAClD,oCAAoC;QACpC,sCAAsC;QACtC,uCAAuC;QACvC,IAAI;QACJ,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IACO,gBAAgB,CAAC,QAAqC;QAC7D,IAAI,QAAQ,CAAC,WAAW,GAAG,GAAG,KAAK,GAAG,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,cAAc,QAAQ,CAAC,cAAc,WAAW,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAC;QAC1F,CAAC;IACF,CAAC;IAEO,cAAc,CAAI,IAA+B;QACxD,+DAA+D;QAC/D,wCAAwC;QACxC,oCAAoC;QACpC,iDAAiD;QACjD,2DAA2D;QAC3D,uCAAuC;QACvC,yDAAyD;QACzD,MAAM;QACN,KAAK;QACL,IAAI;QACJ,OAAO;YACN,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;iBACnC;aACD;SACD,CAAC;IACH,CAAC;IAEO,mBAAmB,CAAC,KAAc;QACzC,OAAO;YACN,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;iBACzC;aACD;SACD,CAAC;IACH,CAAC;IAED,WAAW,CAAC,KAAc;QACzB,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;IACjE,CAAC;CACD"}
package/build/index.js ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import 'dotenv/config';
3
+ import { runHttp } from './transports/http.js';
4
+ import { runStdio } from './transports/stdio.js';
5
+ async function main() {
6
+ const mode = process.env.MCP_TRANSPORT ?? process.argv[2] ?? 'stdio';
7
+ switch (mode) {
8
+ case 'http':
9
+ await runHttp();
10
+ break;
11
+ default: await runStdio();
12
+ }
13
+ }
14
+ main().catch((error) => {
15
+ console.error("Fatal error in main():", error);
16
+ process.exit(1);
17
+ });
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE/C,KAAK,UAAU,IAAI;IAClB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;IAErE,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,MAAM;YAAE,MAAM,OAAO,EAAE,CAAC;YAAC,MAAM;QACpC,OAAO,CAAC,CAAC,MAAM,QAAQ,EAAE,CAAC;IAC3B,CAAC;AACF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACtB,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { version } from './utils/version.js';
3
+ import { registerAllTools } from './tools/index.js';
4
+ import { ApiClient } from './http/client.js';
5
+ export function createServer(apiToken) {
6
+ const server = new McpServer({ name: 'finimpulse', version });
7
+ const client = new ApiClient(apiToken);
8
+ registerAllTools(server, client);
9
+ return server;
10
+ }
11
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC5C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC;IACvC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC;AACf,CAAC"}
@@ -0,0 +1,4 @@
1
+ export async function financialsBalanceSheetHandler(input, client) {
2
+ return client.request('/v1/financials/balance_sheet', 'POST', input);
3
+ }
4
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/financials/balance_sheet/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAC,KAAkC,EAAE,MAAiB;IACxG,OAAO,MAAM,CAAC,OAAO,CAAiC,8BAA8B,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACtG,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { financialsBalanceSheetInputSchema } from './schema.js';
2
+ import { financialsBalanceSheetHandler } from './handler.js';
3
+ export function registerFinancialsBalanceSheetTool(server, client) {
4
+ server.registerTool('get_financials_balance_sheet', { description: 'Returns comprehensive Balance Sheet data for stocks and some funds, providing a snapshot of a company\'s financial position and capital structure. Supports filtering by interval (annual, quarterly, trailing). Use to populate the Balance Sheet section or retrieve historical data for solvency analysis, ratios, and modeling.', inputSchema: financialsBalanceSheetInputSchema }, (input) => financialsBalanceSheetHandler(input, client));
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/financials/balance_sheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iCAAiC,EAAC,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAC,6BAA6B,EAAC,MAAM,cAAc,CAAC;AAG3D,MAAM,UAAU,kCAAkC,CAAC,MAAiB,EAAE,MAAiB;IACtF,MAAM,CAAC,YAAY,CAAC,8BAA8B,EAAE,EAAE,WAAW,EAAE,qUAAqU,EAAE,WAAW,EAAE,iCAAiC,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,6BAA6B,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACtf,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export const financialsBalanceSheetInputSchema = z.object({
3
+ symbol: z.string().describe('Asset identifier (ticker symbol).'),
4
+ intervals: z.array(z.enum(['annual', 'quarterly', 'trailing'])).optional().describe('Reporting frequencies to return. Supported values: annual, quarterly, trailing. If none are provided, all supported intervals are returned.'),
5
+ start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
6
+ end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
7
+ });
8
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/financials/balance_sheet/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClF,6IAA6I,CAC7I;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CACxG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/financials/balance_sheet/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export async function financialsCashFlowHandler(input, client) {
2
+ return client.request('/v1/financials/cash_flow', 'POST', input);
3
+ }
4
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/financials/cash_flow/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,KAA8B,EAAE,MAAiB;IAChG,OAAO,MAAM,CAAC,OAAO,CAA6B,0BAA0B,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { financialsCashFlowInputSchema } from './schema.js';
2
+ import { financialsCashFlowHandler } from './handler.js';
3
+ export function registerFinancialsCashFlowTool(server, client) {
4
+ server.registerTool('get_financials_cash_flow', { description: 'Returns detailed Cash Flow Statement data, including operating, investing, and financing cash flows for the selected period. Supports filtering by interval (annual, quarterly, trailing). Use to populate the Cash Flow section or extract multi-period series for liquidity analysis, forecasting, or visualization.', inputSchema: financialsCashFlowInputSchema }, (input) => financialsCashFlowHandler(input, client));
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/financials/cash_flow/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,6BAA6B,EAAC,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAC,yBAAyB,EAAC,MAAM,cAAc,CAAC;AAGvD,MAAM,UAAU,8BAA8B,CAAC,MAAiB,EAAE,MAAiB;IAClF,MAAM,CAAC,YAAY,CAAC,0BAA0B,EAAE,EAAE,WAAW,EAAE,wTAAwT,EAAE,WAAW,EAAE,6BAA6B,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7d,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export const financialsCashFlowInputSchema = z.object({
3
+ symbol: z.string().describe('Asset identifier (ticker symbol).'),
4
+ intervals: z.array(z.enum(['annual', 'quarterly', 'trailing'])).optional().describe('Reporting frequencies to return. Supported values: annual, quarterly, trailing. If none are provided, all supported intervals are returned.'),
5
+ start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
6
+ end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
7
+ });
8
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/financials/cash_flow/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClF,6IAA6I,CAC7I;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CACxG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/financials/cash_flow/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export async function financialsGeneralHandler(input, client) {
2
+ return client.request('/v1/financials/general', 'POST', input);
3
+ }
4
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/financials/general/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,KAA6B,EAAE,MAAiB;IAC9F,OAAO,MAAM,CAAC,OAAO,CAA4B,wBAAwB,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC3F,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { financialsGeneralInputSchema } from './schema.js';
2
+ import { financialsGeneralHandler } from './handler.js';
3
+ export function registerFinancialsGeneralTool(server, client) {
4
+ server.registerTool('get_financials_general', { description: 'Returns financial statements and valuation measures for equity (stocks mostly) across multiple reporting intervals. Provides structured financial reporting data (Income Statement, Balance Sheet, Cash Flow) and valuation snapshots (Valuation Measures) in a unified response. Supports filtering by type and interval (annual, quarterly, trailing).', inputSchema: financialsGeneralInputSchema }, (input) => financialsGeneralHandler(input, client));
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/financials/general/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,4BAA4B,EAAC,MAAM,aAAa,CAAC;AACzD,OAAO,EAAC,wBAAwB,EAAC,MAAM,cAAc,CAAC;AAGtD,MAAM,UAAU,6BAA6B,CAAC,MAAiB,EAAE,MAAiB;IACjF,MAAM,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,WAAW,EAAE,0VAA0V,EAAE,WAAW,EAAE,4BAA4B,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3f,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export const financialsGeneralInputSchema = z.object({
3
+ symbol: z.string().describe('Asset identifier (ticker symbol).'),
4
+ types: z.array(z.enum(['income_statement', 'balance_sheet', 'cash_flow', 'valuation_measures'])).optional().describe('Data blocks to return. Available values: income_statement, balance_sheet, cash_flow, valuation_measures. If none are provided, all supported types are returned.'),
5
+ intervals: z.array(z.enum(['annual', 'quarterly', 'trailing'])).optional().describe('Reporting frequencies to return. Supported values: annual, quarterly, trailing. If none are provided, all supported intervals are returned.'),
6
+ start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
7
+ end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
8
+ });
9
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/financials/general/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACnH,kKAAkK,CAClK;IACD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClF,6IAA6I,CAC7I;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CACxG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/financials/general/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export async function financialsIncomeStatementHandler(input, client) {
2
+ return client.request('/v1/financials/income_statement', 'POST', input);
3
+ }
4
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/financials/income_statement/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,KAAqC,EAAE,MAAiB;IAC9G,OAAO,MAAM,CAAC,OAAO,CAAoC,iCAAiC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAC5G,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { financialsIncomeStatementInputSchema } from './schema.js';
2
+ import { financialsIncomeStatementHandler } from './handler.js';
3
+ export function registerFinancialsIncomeStatementTool(server, client) {
4
+ server.registerTool('get_financials_income_statement', { description: 'Returns detailed Income Statement data for stocks and some funds, including revenue, expenses, and net income for the selected period. Supports filtering by interval (annual, quarterly, trailing). Use to populate the Income Statement section or pull time-series data for financial modeling and charting.', inputSchema: financialsIncomeStatementInputSchema }, (input) => financialsIncomeStatementHandler(input, client));
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/financials/income_statement/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,oCAAoC,EAAC,MAAM,aAAa,CAAC;AACjE,OAAO,EAAC,gCAAgC,EAAC,MAAM,cAAc,CAAC;AAG9D,MAAM,UAAU,qCAAqC,CAAC,MAAiB,EAAE,MAAiB;IACzF,MAAM,CAAC,YAAY,CAAC,iCAAiC,EAAE,EAAE,WAAW,EAAE,iTAAiT,EAAE,WAAW,EAAE,oCAAoC,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAC3e,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export const financialsIncomeStatementInputSchema = z.object({
3
+ symbol: z.string().describe('Asset identifier (ticker symbol).'),
4
+ intervals: z.array(z.enum(['annual', 'quarterly', 'trailing'])).optional().describe('Reporting frequencies to return. Supported values: annual, quarterly, trailing. If none are provided, all supported intervals are returned.'),
5
+ start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
6
+ end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
7
+ });
8
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/tools/financials/income_statement/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAChE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClF,6IAA6I,CAC7I;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC1G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CACxG,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/tools/financials/income_statement/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export async function financialsValuationMeasuresHandler(input, client) {
2
+ return client.request('/v1/financials/valuation_measures', 'POST', input);
3
+ }
4
+ //# sourceMappingURL=handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/tools/financials/valuation_measures/handler.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,KAAK,UAAU,kCAAkC,CAAC,KAAuC,EAAE,MAAiB;IAClH,OAAO,MAAM,CAAC,OAAO,CAAsC,mCAAmC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAChH,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { financialsValuationMeasuresInputSchema } from './schema.js';
2
+ import { financialsValuationMeasuresHandler } from './handler.js';
3
+ export function registerFinancialsValuationMeasuresTool(server, client) {
4
+ server.registerTool('get_financials_valuation_measures', { description: 'Provides key Valuation Measures for stocks and some funds, including P/E, EV/EBITDA, P/B, and other metrics. Supports filtering by interval (annual, quarterly, trailing). Use to populate the Valuation Measures section or pull valuation metrics aligned to the same date grid as financial statements for comparative analysis.', inputSchema: financialsValuationMeasuresInputSchema }, (input) => financialsValuationMeasuresHandler(input, client));
5
+ }
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/financials/valuation_measures/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,sCAAsC,EAAC,MAAM,aAAa,CAAC;AACnE,OAAO,EAAC,kCAAkC,EAAC,MAAM,cAAc,CAAC;AAGhE,MAAM,UAAU,uCAAuC,CAAC,MAAiB,EAAE,MAAiB;IAC3F,MAAM,CAAC,YAAY,CAAC,mCAAmC,EAAE,EAAE,WAAW,EAAE,qUAAqU,EAAE,WAAW,EAAE,sCAAsC,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACrgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export const financialsValuationMeasuresInputSchema = z.object({
3
+ symbol: z.string().describe('Asset identifier (ticker symbol).'),
4
+ intervals: z.array(z.enum(['annual', 'quarterly', 'trailing'])).optional().describe('Reporting frequencies to return. Supported values: annual, quarterly, trailing. If none are provided, all supported intervals are returned.'),
5
+ start_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
6
+ end_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('Date range filter (YYYY-MM-DD).'),
7
+ });
8
+ //# sourceMappingURL=schema.js.map