@agentutility/mcp-edge-finance 0.1.8

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/README.md ADDED
@@ -0,0 +1,94 @@
1
+ # @agentutility/mcp-edge-finance
2
+
3
+ > TradFi signals at agent prices.
4
+
5
+ SEC filings, 13F deltas, insider trades, earnings calendars, FDA & FEC, Polymarket × Kalshi spreads — institutional-grade signals priced per call.
6
+
7
+ **Pricing:** pay-per-call in USDC on Base. No subscriptions, no API keys. See per-tool prices below.
8
+
9
+ ## Install — Claude Desktop
10
+
11
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
12
+
13
+ ```json
14
+ {
15
+ "mcpServers": {
16
+ "agentutility-edge-finance": {
17
+ "command": "npx",
18
+ "args": ["-y", "@agentutility/mcp-edge-finance"],
19
+ "env": { "X402_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY_HEX" }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ Restart Claude Desktop. 21 tools appear in the tool palette.
26
+
27
+ ## Install — Cursor
28
+
29
+ Add to `.cursor/mcp.json`:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "agentutility-edge-finance": {
35
+ "command": "npx",
36
+ "args": ["-y", "@agentutility/mcp-edge-finance"],
37
+ "env": { "X402_PRIVATE_KEY": "0x..." }
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ ## Funding
44
+
45
+ Send any amount of **USDC on Base mainnet** to the address derived from your `X402_PRIVATE_KEY`. The MCP server uses it to pay for tool calls automatically.
46
+
47
+ USDC on Base contract: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
48
+
49
+ ## Tools (21)
50
+
51
+ | Tool | Description |
52
+ |---|---|
53
+ | `13f-deltas` | (0.05 USDC/call) 13F-HR position-delta computation — diff the two most recent 13F-HR filings for an institutional CIK. Returns added/exited/increased/reduced positions with dollar deltas. |
54
+ | `bls-occupational-stats` | (0.02 USDC/call) BLS Public Data API — wages, employment levels, growth by series ID. Federal public, free. Optional BLS_API_KEY for higher rate-limits. |
55
+ | `earnings-calendar` | (0.03 USDC/call) Earnings calendar derived from SEC 8-K Item 2.02, 10-Q, 10-K, NT 10-Q, NT 10-K filings. Federal public SEC EDGAR data only — no aggregator ToU concerns. |
56
+ | `earnings-call-transcribe` | (0.03 USDC/call) Earnings call transcriber. Caller-supplied IR webcast/replay URL → Whisper v3 transcript → optional Venice structured summary (prepared remarks, Q&A, guidance, key metrics). |
57
+ | `earnings-transcript` | (0.03 USDC/call) Earnings call transcript generator. Submit any IR webcast or replay URL — Whisper v3 returns a full transcript, plus an optional Venice structured summary (prepared remarks, Q&A, guidance, key metrics). Same backend as earnings-call-transcribe under a clearer slug. |
58
+ | `exchange-rates` | (0.002 USDC/call) FX rates / forex / currency converter / USD to EUR / ECB rates / historical exchange rates. Returns the latest or any historical day's exchange rates between currencies, sourced from the European Central Bank via the public Frankfurter API. Specify a base currency (default USD), an optional quote currency or list, an optional date (YYYY-MM-DD or 'latest'), and an optional amount to also receive a converted value when a single quote is supplied. No auth, commercial-OK. |
59
+ | `fda-calendar` | (0.03 USDC/call) FDA Advisory Committee meeting calendar. Upcoming + recent AdComm meetings scraped from FDA.gov public pages. Federal public. |
60
+ | `fec-political-contributions` | (0.04 USDC/call) FEC political contributions search via api.open.fec.gov. By donor / committee / candidate / cycle / state / amount. Federal public. |
61
+ | `insider-form-4` | (0.01 USDC/call) SEC Form 4 (insider transactions) normalizer. Recent officer/director/10%+ trades for any US ticker. Per-transaction shape: who, when, code (purchase/sale/grant/exercise/etc), shares, price, post-tx holdings, role. 100% public-domain SEC EDGAR data. |
62
+ | `insider-trading` | (0.01 USDC/call) Insider trading feed. Recent SEC Form 4 transactions for any US-listed ticker — officer, director, and 10% beneficial owner buys and sells. Returns transaction code (P=purchase, S=sale, A=grant, M=exercise), shares, price, post-transaction holdings, filed date, and EDGAR document URL. Wraps the same EDGAR-backed source as insider-form-4 under a more search-friendly name. Federal public data, no auth. |
63
+ | `kalshi-markets` | (0.005 USDC/call) Kalshi markets / event contracts / Kalshi API / CFTC-regulated prediction markets / Kalshi browse / KalshiEX markets list. Pulls live markets from api.elections.kalshi.com with filter by status, series ticker, event ticker, free-text query, minimum volume. Prices converted from cents to 0-1 probabilities for easy cross-venue compare. DATA only — no order entry. |
64
+ | `patent-search` | (0.05 USDC/call) USPTO patent search. Issued US patents and published applications via the USPTO Open Data Portal. Search by topic, inventor, assignee, CPC class, filing-date range. Returns title, abstract, inventors, assignees, dates, classifications. Optional Venice plain-English summary. |
65
+ | `polymarket-kalshi-arbitrage` | (0.02 USDC/call) Polymarket × Kalshi arbitrage scanner / cross-venue prediction market spread / event price arbitrage detector / Polymarket vs Kalshi comparison. Pulls active markets from both venues, fuzzy-matches by title (Jaccard token overlap), and reports pairs whose implied YES probabilities diverge beyond a configurable threshold. Output is data-only: spread metrics, no trade execution. Useful for cross-market sentiment timing and signal triangulation. |
66
+ | `polymarket-leaderboard` | (0.005 USDC/call) Polymarket leaderboard / top traders / profit leaderboard / Polymarket whales / volume leaderboard / prediction market rankings. Returns the top accounts by realized profit OR notional volume over 1d/1w/1m/all-time windows. Includes proxy wallet, pseudonym, bio, amount in USD. DATA only. |
67
+ | `polymarket-markets` | (0.005 USDC/call) Polymarket markets / prediction market data / Polymarket API / list active prediction markets / crypto-settled betting odds / event odds / Polymarket browse. Pulls live Polymarket markets from gamma-api with filter by category, tag, free-text query, minimum liquidity. Returns market question, current YES/NO outcome prices (implied probabilities), 24-hr volume, liquidity, end date. DATA-ONLY — no trading. Useful for agent forecasting research and arbitrage detection. |
68
+ | `polymarket-trades` | (0.005 USDC/call) Polymarket trades / recent prediction market trades / on-chain bet history / Polymarket trade feed / Polymarket data API. Pulls recent trades from a Polymarket market (by slug or conditionId) or for a specific wallet. Returns side, size, price, timestamp, trader pseudonym, on-chain tx hash, and computed notional USD. DATA only. |
69
+ | `sec-filing` | (0.01 USDC/call) SEC EDGAR filing fetcher + parser + summarizer. 10-K, 10-Q, 8-K, S-1, S-4, DEF 14A, 4, 13F-HR. Returns structured filing metadata, clean text, and optional Venice executive summary tuned to the form type. 100% public-domain SEC data. |
70
+ | `trademark-search` | (0.03 USDC/call) Trademark search / USPTO trademark lookup / TSDR / federal trademark database. Look up any US trademark by serial number or registration number. Returns mark text, owner, status, filing date, classes, goods/services. Federal public TSDR API. |
71
+ | `uspto-tm-name-search` | (0.10 USDC/call) USPTO trademark name search / free-text TM search / wordmark search / brand-name clearance / freedom-to-use check. The companion to uspto-trademark-search (which is lookup-by-id only) — does the search USPTO does not expose as a free API. Returns active or all registered marks matching the query, with serial number, wordmark text, status, registration date, owner, and goods/services description. Source: MarkerAPI indexer of USPTO wordmarks. Screening tool only — not a substitute for a TM attorney clearance search. |
72
+ | `uspto-trademark-search` | (0.03 USDC/call) USPTO trademark status / TSDR lookup. Look up a US trademark by serial number or registration number. Returns mark text, owner, status, filing date, classes, goods/services. Federal public TSDR API. |
73
+ | `xbrl-financials` | (0.05 USDC/call) SEC XBRL financials. Returns structured financial line items (revenue, net income, EPS, total assets, cash, etc.) for a US-listed ticker. Federal public XBRL data — Bloomberg-killer for fundamentals. |
74
+
75
+ ## How it works
76
+
77
+ 1. Agent calls a tool (e.g. `13f-deltas`).
78
+ 2. MCP server POSTs to `https://x402.agentutility.ai/13f-deltas`.
79
+ 3. The endpoint responds **HTTP 402** with payment instructions.
80
+ 4. The MCP server signs an EIP-3009 USDC transfer authorization with `X402_PRIVATE_KEY` and retries.
81
+ 5. CDP facilitator settles on Base.
82
+ 6. The endpoint returns the actual response.
83
+
84
+ The agent never sees the payment flow — it just gets the result.
85
+
86
+ ## Links
87
+
88
+ - Cluster overview: https://agentutility.ai/edge-finance/
89
+ - All MCP packages: https://mcp.agentutility.ai/
90
+ - Source: https://github.com/rooz21/x402/tree/main/packages/mcp-edge-finance
91
+
92
+ ---
93
+
94
+ **Version:** 0.1.8 · **License:** MIT
package/dist/index.js ADDED
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @agentutility/mcp-<cluster> — stdio MCP server exposing the cluster's
4
+ * x402-paid endpoints as MCP tools. Forwards every CallToolRequest to
5
+ * x402.agentutility.ai, where @x402/fetch handles 402 → payment → retry
6
+ * using the agent's own wallet (X402_PRIVATE_KEY env var).
7
+ *
8
+ * Boilerplate is single-sourced at packages/_template/src/index.ts and
9
+ * copied verbatim into each packages/mcp-<cluster>/src/index.ts by
10
+ * scripts/generate-mcp-clusters.mjs. The codegen also writes a matching
11
+ * tools.generated.ts so this file imports CLUSTER_SLUG + VERSION + TOOLS
12
+ * rather than hard-coding.
13
+ *
14
+ * Required env: X402_PRIVATE_KEY (hex EVM key, USDC on Base).
15
+ * Optional env: X402_BASE_URL (default https://x402.agentutility.ai)
16
+ * X402_RPC_URL (default https://mainnet.base.org)
17
+ */
18
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
19
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
20
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
21
+ import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
22
+ import { ExactEvmScheme, toClientEvmSigner } from "@x402/evm";
23
+ import { privateKeyToAccount } from "viem/accounts";
24
+ import { createPublicClient, http } from "viem";
25
+ import { base } from "viem/chains";
26
+ import { TOOLS, CLUSTER_SLUG, VERSION } from "./tools.generated.js";
27
+ const BASE_URL = (process.env.X402_BASE_URL || "https://x402.agentutility.ai").replace(/\/$/, "");
28
+ const RPC_URL = process.env.X402_RPC_URL || "https://mainnet.base.org";
29
+ const PK = process.env.X402_PRIVATE_KEY;
30
+ if (!PK) {
31
+ console.error(`[@agentutility/mcp-${CLUSTER_SLUG}] FATAL: X402_PRIVATE_KEY env var is required.`);
32
+ console.error("Set it to a hex-encoded EVM private key with USDC balance on Base (chain 8453).");
33
+ console.error("USDC on Base: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913");
34
+ process.exit(1);
35
+ }
36
+ const account = privateKeyToAccount((PK.startsWith("0x") ? PK : `0x${PK}`));
37
+ const publicClient = createPublicClient({
38
+ chain: base,
39
+ transport: http(RPC_URL),
40
+ });
41
+ const signer = toClientEvmSigner(account, publicClient);
42
+ const client = new x402Client().register("eip155:8453", new ExactEvmScheme(signer));
43
+ const paidFetch = wrapFetchWithPayment(fetch, client);
44
+ async function trackedFetch(url, init) {
45
+ const headers = new Headers(init?.headers);
46
+ headers.set("X-Agent-Channel", `mcp-stdio-${CLUSTER_SLUG}`);
47
+ headers.set("X-Agent-Id", "47167");
48
+ if (!headers.has("User-Agent")) {
49
+ headers.set("User-Agent", `agentutility-mcp/${CLUSTER_SLUG}/${VERSION}`);
50
+ }
51
+ return paidFetch(url, { ...init, headers });
52
+ }
53
+ const server = new Server({ name: `agentutility-${CLUSTER_SLUG}`, version: VERSION }, { capabilities: { tools: {} } });
54
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
55
+ tools: TOOLS.map((t) => ({
56
+ name: t.name,
57
+ description: t.description,
58
+ inputSchema: t.input_schema,
59
+ })),
60
+ }));
61
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
62
+ const name = req.params.name;
63
+ const tool = TOOLS.find((t) => t.name === name);
64
+ if (!tool) {
65
+ return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
66
+ }
67
+ try {
68
+ const res = await trackedFetch(`${BASE_URL}/${tool.http_name}`, {
69
+ method: "POST",
70
+ headers: { "Content-Type": "application/json" },
71
+ body: JSON.stringify(req.params.arguments ?? {}),
72
+ });
73
+ const body = await res.text();
74
+ if (!res.ok) {
75
+ return { content: [{ type: "text", text: `HTTP ${res.status}: ${body}` }], isError: true };
76
+ }
77
+ return { content: [{ type: "text", text: body }] };
78
+ }
79
+ catch (err) {
80
+ return {
81
+ content: [{ type: "text", text: `tool call failed: ${err instanceof Error ? err.message : String(err)}` }],
82
+ isError: true,
83
+ };
84
+ }
85
+ });
86
+ await server.connect(new StdioServerTransport());
@@ -0,0 +1,695 @@
1
+ /** Auto-generated by scripts/generate-mcp-clusters.mjs. Do not edit by hand. */
2
+ export const CLUSTER_SLUG = "edge-finance";
3
+ export const VERSION = "0.1.8";
4
+ export const TOOLS = [
5
+ {
6
+ "name": "13f-deltas",
7
+ "http_name": "13f-deltas",
8
+ "description": "(0.05 USDC/call) 13F-HR position-delta computation — diff the two most recent 13F-HR filings for an institutional CIK. Returns added/exited/increased/reduced positions with dollar deltas.",
9
+ "method": "POST",
10
+ "input_schema": {
11
+ "type": "object",
12
+ "properties": {
13
+ "cik": {
14
+ "type": "string",
15
+ "description": "Institutional manager's SEC CIK (e.g. '0001067983' for Berkshire Hathaway). Required — 13F filings are by CIK only, no ticker."
16
+ },
17
+ "limit_holdings": {
18
+ "type": "number",
19
+ "description": "Max positions to include in each bucket (added/exited/increased/reduced). 1-50. Default 20."
20
+ },
21
+ "min_change_usd": {
22
+ "type": "number",
23
+ "description": "Filter out moves smaller than this dollar magnitude. Default 0 (no filter)."
24
+ }
25
+ },
26
+ "required": [
27
+ "cik"
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "name": "bls-occupational-stats",
33
+ "http_name": "bls-occupational-stats",
34
+ "description": "(0.02 USDC/call) BLS Public Data API — wages, employment levels, growth by series ID. Federal public, free. Optional BLS_API_KEY for higher rate-limits.",
35
+ "method": "POST",
36
+ "input_schema": {
37
+ "type": "object",
38
+ "properties": {
39
+ "series_ids": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ },
44
+ "description": "Array of BLS series IDs to fetch (e.g. occupational employment, wage, or growth series codes)."
45
+ },
46
+ "start_year": {
47
+ "type": "string",
48
+ "description": "Four-digit starting year for the data range (e.g. \"2020\")."
49
+ },
50
+ "end_year": {
51
+ "type": "string",
52
+ "description": "Four-digit ending year for the data range (e.g. \"2024\")."
53
+ },
54
+ "include_calculations": {
55
+ "type": "boolean",
56
+ "description": "When true, BLS returns net/percent change calculations alongside the raw data points."
57
+ }
58
+ },
59
+ "required": [
60
+ "series_ids"
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "name": "earnings-calendar",
66
+ "http_name": "earnings-calendar",
67
+ "description": "(0.03 USDC/call) Earnings calendar derived from SEC 8-K Item 2.02, 10-Q, 10-K, NT 10-Q, NT 10-K filings. Federal public SEC EDGAR data only — no aggregator ToU concerns.",
68
+ "method": "POST",
69
+ "input_schema": {
70
+ "type": "object",
71
+ "properties": {
72
+ "ticker": {
73
+ "type": "string",
74
+ "description": "US-listed ticker (e.g. 'AAPL', 'MSFT'). Either ticker or cik is required."
75
+ },
76
+ "cik": {
77
+ "type": "string",
78
+ "description": "SEC CIK (zero-padded or numeric, e.g. '0000320193'). Use when ticker is ambiguous or unavailable."
79
+ },
80
+ "limit": {
81
+ "type": "number",
82
+ "description": "Max earnings-related filings to return. 1-50. Default 8."
83
+ },
84
+ "upcoming_only": {
85
+ "type": "boolean",
86
+ "description": "If true, only returns the next-earnings estimate plus future-dated filings (skips historical events). Default false."
87
+ }
88
+ }
89
+ }
90
+ },
91
+ {
92
+ "name": "earnings-call-transcribe",
93
+ "http_name": "earnings-call-transcribe",
94
+ "description": "(0.03 USDC/call) Earnings call transcriber. Caller-supplied IR webcast/replay URL → Whisper v3 transcript → optional Venice structured summary (prepared remarks, Q&A, guidance, key metrics).",
95
+ "method": "POST",
96
+ "input_schema": {
97
+ "type": "object",
98
+ "properties": {
99
+ "audio_url": {
100
+ "type": "string",
101
+ "description": "Public URL to the IR webcast or replay audio/video file to transcribe."
102
+ },
103
+ "ticker": {
104
+ "type": "string",
105
+ "description": "Company stock ticker symbol, used to label the transcript and guide structured summary extraction."
106
+ },
107
+ "summarize": {
108
+ "type": "boolean",
109
+ "description": "If true, runs the Venice structured summary pass over the transcript (prepared remarks, Q&A, guidance, metrics)."
110
+ },
111
+ "language": {
112
+ "type": "string",
113
+ "description": "ISO language code for the audio; defaults to auto-detect if omitted."
114
+ }
115
+ },
116
+ "required": [
117
+ "audio_url"
118
+ ]
119
+ }
120
+ },
121
+ {
122
+ "name": "earnings-transcript",
123
+ "http_name": "earnings-transcript",
124
+ "description": "(0.03 USDC/call) Earnings call transcript generator. Submit any IR webcast or replay URL — Whisper v3 returns a full transcript, plus an optional Venice structured summary (prepared remarks, Q&A, guidance, key metrics). Same backend as earnings-call-transcribe under a clearer slug.",
125
+ "method": "POST",
126
+ "input_schema": {
127
+ "type": "object",
128
+ "properties": {
129
+ "audio_url": {
130
+ "type": "string",
131
+ "description": "URL of the earnings call webcast, replay, or audio file to transcribe."
132
+ },
133
+ "ticker": {
134
+ "type": "string",
135
+ "description": "Stock ticker symbol for the company (e.g., AAPL) to tag the transcript."
136
+ },
137
+ "summarize": {
138
+ "type": "boolean",
139
+ "description": "If true, returns a Venice structured summary with prepared remarks, Q&A, guidance, and key metrics."
140
+ },
141
+ "language": {
142
+ "type": "string",
143
+ "description": "ISO language code hint for Whisper v3 transcription (defaults to auto-detect)."
144
+ }
145
+ },
146
+ "required": [
147
+ "audio_url"
148
+ ]
149
+ }
150
+ },
151
+ {
152
+ "name": "exchange-rates",
153
+ "http_name": "exchange-rates",
154
+ "description": "(0.002 USDC/call) FX rates / forex / currency converter / USD to EUR / ECB rates / historical exchange rates. Returns the latest or any historical day's exchange rates between currencies, sourced from the European Central Bank via the public Frankfurter API. Specify a base currency (default USD), an optional quote currency or list, an optional date (YYYY-MM-DD or 'latest'), and an optional amount to also receive a converted value when a single quote is supplied. No auth, commercial-OK.",
155
+ "method": "POST",
156
+ "input_schema": {
157
+ "type": "object",
158
+ "properties": {
159
+ "base": {
160
+ "type": "string",
161
+ "description": "ISO 4217 base currency code (e.g. 'USD', 'EUR'). Default 'USD'."
162
+ },
163
+ "quote": {
164
+ "description": "Single ISO 4217 quote currency, or array of codes. Omit for all available rates."
165
+ },
166
+ "date": {
167
+ "type": "string",
168
+ "description": "'latest' (default) or a historical date in YYYY-MM-DD format."
169
+ },
170
+ "amount": {
171
+ "type": "number",
172
+ "description": "Optional amount in the base currency. When a single quote is supplied, the response includes the converted amount."
173
+ }
174
+ }
175
+ }
176
+ },
177
+ {
178
+ "name": "fda-calendar",
179
+ "http_name": "fda-calendar",
180
+ "description": "(0.03 USDC/call) FDA Advisory Committee meeting calendar. Upcoming + recent AdComm meetings scraped from FDA.gov public pages. Federal public.",
181
+ "method": "POST",
182
+ "input_schema": {
183
+ "type": "object",
184
+ "properties": {
185
+ "upcoming_only": {
186
+ "type": "boolean",
187
+ "description": "If true, return only meetings scheduled in the future (relative to fetched_at). Default false (returns recent + upcoming within the days_back window)."
188
+ },
189
+ "search": {
190
+ "type": "string",
191
+ "description": "Free-text filter applied to meeting title/committee (case-insensitive substring). Examples: 'vaccine', 'oncology', 'cardiovascular'."
192
+ },
193
+ "limit": {
194
+ "type": "number",
195
+ "description": "Max meetings to return (1-50). Default 25."
196
+ }
197
+ }
198
+ }
199
+ },
200
+ {
201
+ "name": "fec-political-contributions",
202
+ "http_name": "fec-political-contributions",
203
+ "description": "(0.04 USDC/call) FEC political contributions search via api.open.fec.gov. By donor / committee / candidate / cycle / state / amount. Federal public.",
204
+ "method": "POST",
205
+ "input_schema": {
206
+ "type": "object",
207
+ "properties": {
208
+ "donor_name": {
209
+ "type": "string",
210
+ "description": "Donor name in 'LAST FIRST' format (FEC convention, e.g. 'SMITH JOHN'). Case-insensitive."
211
+ },
212
+ "committee_id": {
213
+ "type": "string",
214
+ "description": "FEC committee id (recipient), e.g. 'C00401224' for Obama for America."
215
+ },
216
+ "candidate_id": {
217
+ "type": "string",
218
+ "description": "FEC candidate id (recipient candidate), e.g. 'P80003338'."
219
+ },
220
+ "cycle": {
221
+ "type": "number",
222
+ "description": "Election cycle (even year, e.g. 2024, 2026). Default: latest available."
223
+ },
224
+ "state": {
225
+ "type": "string",
226
+ "description": "Donor state, 2-letter code (e.g. 'CA', 'NY')."
227
+ },
228
+ "min_amount": {
229
+ "type": "number",
230
+ "description": "Minimum contribution amount in USD. Default no floor."
231
+ },
232
+ "max_amount": {
233
+ "type": "number",
234
+ "description": "Maximum contribution amount in USD. Default no ceiling."
235
+ },
236
+ "limit": {
237
+ "type": "number",
238
+ "description": "Max records to return. 1-100. Default 20."
239
+ }
240
+ }
241
+ }
242
+ },
243
+ {
244
+ "name": "insider-form-4",
245
+ "http_name": "insider-form-4",
246
+ "description": "(0.01 USDC/call) SEC Form 4 (insider transactions) normalizer. Recent officer/director/10%+ trades for any US ticker. Per-transaction shape: who, when, code (purchase/sale/grant/exercise/etc), shares, price, post-tx holdings, role. 100% public-domain SEC EDGAR data.",
247
+ "method": "POST",
248
+ "input_schema": {
249
+ "type": "object",
250
+ "properties": {
251
+ "ticker": {
252
+ "type": "string",
253
+ "description": "US stock ticker (e.g. 'AAPL'). Either ticker or cik required."
254
+ },
255
+ "cik": {
256
+ "type": "string",
257
+ "description": "SEC Central Index Key."
258
+ },
259
+ "limit": {
260
+ "type": "number",
261
+ "description": "Max Form 4 filings to return (1-50). Default 10."
262
+ },
263
+ "include_derivatives": {
264
+ "type": "boolean",
265
+ "description": "Include derivative (option/RSU) transactions. Default true."
266
+ }
267
+ }
268
+ }
269
+ },
270
+ {
271
+ "name": "insider-trading",
272
+ "http_name": "insider-trading",
273
+ "description": "(0.01 USDC/call) Insider trading feed. Recent SEC Form 4 transactions for any US-listed ticker — officer, director, and 10% beneficial owner buys and sells. Returns transaction code (P=purchase, S=sale, A=grant, M=exercise), shares, price, post-transaction holdings, filed date, and EDGAR document URL. Wraps the same EDGAR-backed source as insider-form-4 under a more search-friendly name. Federal public data, no auth.",
274
+ "method": "POST",
275
+ "input_schema": {
276
+ "type": "object",
277
+ "properties": {
278
+ "ticker": {
279
+ "type": "string",
280
+ "description": "US-listed ticker (e.g. 'AAPL'). Either ticker or cik is required."
281
+ },
282
+ "cik": {
283
+ "type": "string",
284
+ "description": "SEC CIK."
285
+ },
286
+ "limit": {
287
+ "type": "number",
288
+ "description": "Max filings, 1-50. Default 10."
289
+ },
290
+ "include_derivatives": {
291
+ "type": "boolean",
292
+ "description": "Include derivative transactions (options, warrants, RSUs) alongside non-derivative common stock buys and sales."
293
+ }
294
+ }
295
+ }
296
+ },
297
+ {
298
+ "name": "kalshi-markets",
299
+ "http_name": "kalshi-markets",
300
+ "description": "(0.005 USDC/call) Kalshi markets / event contracts / Kalshi API / CFTC-regulated prediction markets / Kalshi browse / KalshiEX markets list. Pulls live markets from api.elections.kalshi.com with filter by status, series ticker, event ticker, free-text query, minimum volume. Prices converted from cents to 0-1 probabilities for easy cross-venue compare. DATA only — no order entry.",
301
+ "method": "POST",
302
+ "input_schema": {
303
+ "type": "object",
304
+ "properties": {
305
+ "query": {
306
+ "type": "string",
307
+ "description": "Free-text filter on title / ticker / subtitle / event_ticker (substring)."
308
+ },
309
+ "series_ticker": {
310
+ "type": "string",
311
+ "description": "Filter by series (e.g. 'KXELONMARS')."
312
+ },
313
+ "event_ticker": {
314
+ "type": "string",
315
+ "description": "Filter by event ticker."
316
+ },
317
+ "status": {
318
+ "type": "string",
319
+ "enum": [
320
+ "open",
321
+ "closed",
322
+ "settled",
323
+ "active"
324
+ ],
325
+ "description": "Default 'open'."
326
+ },
327
+ "limit": {
328
+ "type": "number",
329
+ "description": "1-200. Default 50."
330
+ },
331
+ "cursor": {
332
+ "type": "string",
333
+ "description": "Pagination cursor from previous response."
334
+ },
335
+ "min_volume": {
336
+ "type": "number",
337
+ "description": "Minimum 24-hr volume filter (server-side, on returned page)."
338
+ }
339
+ }
340
+ }
341
+ },
342
+ {
343
+ "name": "patent-search",
344
+ "http_name": "patent-search",
345
+ "description": "(0.05 USDC/call) USPTO patent search. Issued US patents and published applications via the USPTO Open Data Portal. Search by topic, inventor, assignee, CPC class, filing-date range. Returns title, abstract, inventors, assignees, dates, classifications. Optional Venice plain-English summary.",
346
+ "method": "POST",
347
+ "input_schema": {
348
+ "type": "object",
349
+ "properties": {
350
+ "query": {
351
+ "type": "string",
352
+ "description": "Free-text search keywords."
353
+ },
354
+ "inventor": {
355
+ "type": "string",
356
+ "description": "Inventor last name filter. Optional."
357
+ },
358
+ "assignee": {
359
+ "type": "string",
360
+ "description": "Assignee/owner name filter. Optional."
361
+ },
362
+ "cpc": {
363
+ "type": "string",
364
+ "description": "CPC classification code (e.g. 'G06N'). Optional."
365
+ },
366
+ "date_from": {
367
+ "type": "string",
368
+ "description": "Filing-date floor (YYYY-MM-DD). Optional."
369
+ },
370
+ "date_to": {
371
+ "type": "string",
372
+ "description": "Filing-date ceiling (YYYY-MM-DD). Optional."
373
+ },
374
+ "limit": {
375
+ "type": "number",
376
+ "description": "Max patents to return (1-50). Default 10."
377
+ },
378
+ "summarize": {
379
+ "type": "boolean",
380
+ "description": "If true, attach a Venice plain-English summary to the top result."
381
+ }
382
+ },
383
+ "required": [
384
+ "query"
385
+ ]
386
+ }
387
+ },
388
+ {
389
+ "name": "polymarket-kalshi-arbitrage",
390
+ "http_name": "polymarket-kalshi-arbitrage",
391
+ "description": "(0.02 USDC/call) Polymarket × Kalshi arbitrage scanner / cross-venue prediction market spread / event price arbitrage detector / Polymarket vs Kalshi comparison. Pulls active markets from both venues, fuzzy-matches by title (Jaccard token overlap), and reports pairs whose implied YES probabilities diverge beyond a configurable threshold. Output is data-only: spread metrics, no trade execution. Useful for cross-market sentiment timing and signal triangulation.",
392
+ "method": "POST",
393
+ "input_schema": {
394
+ "type": "object",
395
+ "properties": {
396
+ "min_spread": {
397
+ "type": "number",
398
+ "description": "Minimum |p_poly - p_kalshi| spread to report. 0-1. Default 0.05."
399
+ },
400
+ "min_match_score": {
401
+ "type": "number",
402
+ "description": "Minimum Jaccard token overlap to treat two titles as the same event. 0-1. Default 0.4."
403
+ },
404
+ "scan_limit": {
405
+ "type": "number",
406
+ "description": "Max markets to pull from each venue. 10-500. Default 100."
407
+ },
408
+ "category": {
409
+ "type": "string",
410
+ "description": "Optional Polymarket category filter (substring)."
411
+ }
412
+ }
413
+ }
414
+ },
415
+ {
416
+ "name": "polymarket-leaderboard",
417
+ "http_name": "polymarket-leaderboard",
418
+ "description": "(0.005 USDC/call) Polymarket leaderboard / top traders / profit leaderboard / Polymarket whales / volume leaderboard / prediction market rankings. Returns the top accounts by realized profit OR notional volume over 1d/1w/1m/all-time windows. Includes proxy wallet, pseudonym, bio, amount in USD. DATA only.",
419
+ "method": "POST",
420
+ "input_schema": {
421
+ "type": "object",
422
+ "properties": {
423
+ "metric": {
424
+ "type": "string",
425
+ "enum": [
426
+ "profit",
427
+ "volume"
428
+ ],
429
+ "description": "Default 'profit'."
430
+ },
431
+ "window": {
432
+ "type": "string",
433
+ "enum": [
434
+ "1d",
435
+ "1w",
436
+ "1m",
437
+ "all"
438
+ ],
439
+ "description": "Default '1d'."
440
+ },
441
+ "limit": {
442
+ "type": "number",
443
+ "description": "1-200. Default 25."
444
+ }
445
+ }
446
+ }
447
+ },
448
+ {
449
+ "name": "polymarket-markets",
450
+ "http_name": "polymarket-markets",
451
+ "description": "(0.005 USDC/call) Polymarket markets / prediction market data / Polymarket API / list active prediction markets / crypto-settled betting odds / event odds / Polymarket browse. Pulls live Polymarket markets from gamma-api with filter by category, tag, free-text query, minimum liquidity. Returns market question, current YES/NO outcome prices (implied probabilities), 24-hr volume, liquidity, end date. DATA-ONLY — no trading. Useful for agent forecasting research and arbitrage detection.",
452
+ "method": "POST",
453
+ "input_schema": {
454
+ "type": "object",
455
+ "properties": {
456
+ "query": {
457
+ "type": "string",
458
+ "description": "Free-text filter applied to question + description + slug. Case-insensitive substring match against the current page."
459
+ },
460
+ "category": {
461
+ "type": "string",
462
+ "description": "Filter by Polymarket category (substring match, e.g. 'Sports', 'Crypto', 'Politics')."
463
+ },
464
+ "tag": {
465
+ "type": "string",
466
+ "description": "Polymarket tag slug filter, passed through to upstream."
467
+ },
468
+ "active": {
469
+ "type": "boolean",
470
+ "description": "Default true. Pass false to include inactive markets."
471
+ },
472
+ "closed": {
473
+ "type": "boolean",
474
+ "description": "Default false. Pass true to include closed markets."
475
+ },
476
+ "limit": {
477
+ "type": "number",
478
+ "description": "1-100. Default 20."
479
+ },
480
+ "offset": {
481
+ "type": "number",
482
+ "description": "Pagination offset."
483
+ },
484
+ "order": {
485
+ "type": "string",
486
+ "enum": [
487
+ "volume24hr",
488
+ "liquidity",
489
+ "endDate",
490
+ "startDate"
491
+ ],
492
+ "description": "Sort field."
493
+ },
494
+ "ascending": {
495
+ "type": "boolean",
496
+ "description": "Sort direction."
497
+ },
498
+ "min_liquidity": {
499
+ "type": "number",
500
+ "description": "Minimum liquidity in USD."
501
+ }
502
+ }
503
+ }
504
+ },
505
+ {
506
+ "name": "polymarket-trades",
507
+ "http_name": "polymarket-trades",
508
+ "description": "(0.005 USDC/call) Polymarket trades / recent prediction market trades / on-chain bet history / Polymarket trade feed / Polymarket data API. Pulls recent trades from a Polymarket market (by slug or conditionId) or for a specific wallet. Returns side, size, price, timestamp, trader pseudonym, on-chain tx hash, and computed notional USD. DATA only.",
509
+ "method": "POST",
510
+ "input_schema": {
511
+ "type": "object",
512
+ "properties": {
513
+ "market": {
514
+ "type": "string",
515
+ "description": "Market slug (e.g. 'will-x-happen') OR conditionId (0x...). Optional."
516
+ },
517
+ "user": {
518
+ "type": "string",
519
+ "description": "Polymarket proxy wallet address to filter by. Optional."
520
+ },
521
+ "limit": {
522
+ "type": "number",
523
+ "description": "1-500. Default 50."
524
+ },
525
+ "offset": {
526
+ "type": "number",
527
+ "description": "Pagination offset."
528
+ },
529
+ "side": {
530
+ "type": "string",
531
+ "enum": [
532
+ "BUY",
533
+ "SELL"
534
+ ],
535
+ "description": "Filter by side."
536
+ },
537
+ "after_ts": {
538
+ "type": "number",
539
+ "description": "Unix seconds. Only trades after."
540
+ },
541
+ "before_ts": {
542
+ "type": "number",
543
+ "description": "Unix seconds. Only trades before."
544
+ }
545
+ }
546
+ }
547
+ },
548
+ {
549
+ "name": "sec-filing",
550
+ "http_name": "sec-filing",
551
+ "description": "(0.01 USDC/call) SEC EDGAR filing fetcher + parser + summarizer. 10-K, 10-Q, 8-K, S-1, S-4, DEF 14A, 4, 13F-HR. Returns structured filing metadata, clean text, and optional Venice executive summary tuned to the form type. 100% public-domain SEC data.",
552
+ "method": "POST",
553
+ "input_schema": {
554
+ "type": "object",
555
+ "properties": {
556
+ "ticker": {
557
+ "type": "string",
558
+ "description": "US stock ticker (e.g. 'AAPL'). Either ticker or cik required."
559
+ },
560
+ "cik": {
561
+ "type": "string",
562
+ "description": "SEC Central Index Key (10-digit, with or without leading zeros)."
563
+ },
564
+ "form_type": {
565
+ "type": "string",
566
+ "description": "Filing type to fetch. Default '10-K'. Supports '10-K', '10-Q', '8-K', 'S-1', 'DEF 14A', '4', '13F-HR'."
567
+ },
568
+ "limit": {
569
+ "type": "number",
570
+ "description": "Max filings to return (1-20). Default 5."
571
+ },
572
+ "summarize": {
573
+ "type": "boolean",
574
+ "description": "If true, run latest filing through Venice for an executive summary tuned to the form type."
575
+ },
576
+ "include_text": {
577
+ "type": "boolean",
578
+ "description": "If true, return full clean-text body of the latest filing (capped at 200k chars)."
579
+ }
580
+ }
581
+ }
582
+ },
583
+ {
584
+ "name": "trademark-search",
585
+ "http_name": "trademark-search",
586
+ "description": "(0.03 USDC/call) Trademark search / USPTO trademark lookup / TSDR / federal trademark database. Look up any US trademark by serial number or registration number. Returns mark text, owner, status, filing date, classes, goods/services. Federal public TSDR API.",
587
+ "method": "POST",
588
+ "input_schema": {
589
+ "type": "object",
590
+ "properties": {
591
+ "serial_number": {
592
+ "type": "string",
593
+ "description": "8-digit USPTO serial number (e.g. '78787878')."
594
+ },
595
+ "registration_number": {
596
+ "type": "string",
597
+ "description": "7-digit USPTO registration number (e.g. '3000000')."
598
+ }
599
+ }
600
+ }
601
+ },
602
+ {
603
+ "name": "uspto-tm-name-search",
604
+ "http_name": "uspto-tm-name-search",
605
+ "description": "(0.10 USDC/call) USPTO trademark name search / free-text TM search / wordmark search / brand-name clearance / freedom-to-use check. The companion to uspto-trademark-search (which is lookup-by-id only) — does the search USPTO does not expose as a free API. Returns active or all registered marks matching the query, with serial number, wordmark text, status, registration date, owner, and goods/services description. Source: MarkerAPI indexer of USPTO wordmarks. Screening tool only — not a substitute for a TM attorney clearance search.",
606
+ "method": "POST",
607
+ "input_schema": {
608
+ "type": "object",
609
+ "properties": {
610
+ "query": {
611
+ "type": "string",
612
+ "description": "Wordmark text to search (1-100 chars, e.g. 'APPLE', 'agentutility'). Matches active USPTO trademark wordmarks; case-insensitive."
613
+ },
614
+ "status": {
615
+ "type": "string",
616
+ "enum": [
617
+ "active",
618
+ "all"
619
+ ],
620
+ "description": "'active' (default — Live registrations only, what you usually want for clearance) or 'all' (includes abandoned, expired, cancelled)."
621
+ },
622
+ "start": {
623
+ "type": "number",
624
+ "description": "Pagination offset (1-indexed). Default 1. Each page returns up to 100 hits."
625
+ }
626
+ },
627
+ "required": [
628
+ "query"
629
+ ]
630
+ }
631
+ },
632
+ {
633
+ "name": "uspto-trademark-search",
634
+ "http_name": "uspto-trademark-search",
635
+ "description": "(0.03 USDC/call) USPTO trademark status / TSDR lookup. Look up a US trademark by serial number or registration number. Returns mark text, owner, status, filing date, classes, goods/services. Federal public TSDR API.",
636
+ "method": "POST",
637
+ "input_schema": {
638
+ "type": "object",
639
+ "properties": {
640
+ "serial_number": {
641
+ "type": "string",
642
+ "description": "8-digit USPTO serial number (e.g. '78787878')."
643
+ },
644
+ "registration_number": {
645
+ "type": "string",
646
+ "description": "7-digit USPTO registration number (e.g. '3000000')."
647
+ }
648
+ }
649
+ }
650
+ },
651
+ {
652
+ "name": "xbrl-financials",
653
+ "http_name": "xbrl-financials",
654
+ "description": "(0.05 USDC/call) SEC XBRL financials. Returns structured financial line items (revenue, net income, EPS, total assets, cash, etc.) for a US-listed ticker. Federal public XBRL data — Bloomberg-killer for fundamentals.",
655
+ "method": "POST",
656
+ "input_schema": {
657
+ "type": "object",
658
+ "properties": {
659
+ "ticker": {
660
+ "type": "string",
661
+ "description": "US-listed ticker (e.g. 'AAPL', 'MSFT'). Either ticker or cik is required."
662
+ },
663
+ "cik": {
664
+ "type": "string",
665
+ "description": "SEC CIK (zero-padded or numeric, e.g. '0000320193'). Use when ticker is ambiguous or unavailable."
666
+ },
667
+ "metrics": {
668
+ "type": "array",
669
+ "items": {
670
+ "type": "string"
671
+ },
672
+ "description": "Aliases of financial metrics to return, e.g. ['revenue', 'net_income', 'eps_diluted', 'total_assets', 'cash']. See available_metric_aliases in response. Default: a curated set."
673
+ },
674
+ "unit": {
675
+ "type": "string",
676
+ "enum": [
677
+ "USD",
678
+ "USD/shares",
679
+ "shares",
680
+ "any"
681
+ ],
682
+ "description": "Filter values to one unit. Default 'any'."
683
+ },
684
+ "limit_per_metric": {
685
+ "type": "number",
686
+ "description": "Max datapoints returned per metric. 1-50. Default 10 (most-recent-first)."
687
+ },
688
+ "fy_only": {
689
+ "type": "boolean",
690
+ "description": "If true, only fiscal-year (10-K) values are returned, skipping quarterly 10-Q data. Default false."
691
+ }
692
+ }
693
+ }
694
+ }
695
+ ];
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@agentutility/mcp-edge-finance",
3
+ "version": "0.1.8",
4
+ "description": "MCP server for the @agentutility edge-finance cluster — pay-per-call x402 tools, no API keys, USDC on Base.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "bin": {
9
+ "agentutility-mcp-edge-finance": "dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/rooz21/x402",
18
+ "directory": "packages/mcp-edge-finance"
19
+ },
20
+ "homepage": "https://mcp.agentutility.ai/edge-finance/",
21
+ "scripts": {
22
+ "build": "tsc",
23
+ "prepublishOnly": "npm run build"
24
+ },
25
+ "keywords": [
26
+ "mcp",
27
+ "model-context-protocol",
28
+ "x402",
29
+ "agentutility",
30
+ "agent-tools",
31
+ "edge-finance"
32
+ ],
33
+ "dependencies": {
34
+ "@modelcontextprotocol/sdk": "^1.0.4",
35
+ "@x402/fetch": "^2.12.0",
36
+ "@x402/evm": "^2.12.0",
37
+ "viem": "^2.21.0"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^22.0.0",
41
+ "typescript": "^5.5.0"
42
+ },
43
+ "engines": {
44
+ "node": ">=18"
45
+ }
46
+ }