frontrun-mcp-server
Advanced tools
+88
-19
@@ -7,3 +7,3 @@ #!/usr/bin/env node | ||
| * Gives AI agents native access to Frontrun's social signal intelligence API. | ||
| * All tools return computed, synthesized intelligence — no raw data pass-throughs. | ||
| * All tools return computed, synthesized intelligence - no raw data pass-throughs. | ||
| * | ||
@@ -160,3 +160,3 @@ * Auth: Set FRONTRUN_API_KEY env var (get one at https://frontrun.vc → Settings → API Keys) | ||
| async function interactiveLogin(apiUrl) { | ||
| // Init session — server generates the session_id | ||
| // Init session - server generates the session_id | ||
| const initRes = await fetch(`${apiUrl}/api/mcp/auth/init`, { | ||
@@ -212,3 +212,3 @@ method: 'POST', | ||
| // ============================================================ | ||
| // Normal MCP server startup — resolve API key | ||
| // Normal MCP server startup - resolve API key | ||
| // ============================================================ | ||
@@ -228,12 +228,14 @@ | ||
| if (!API_KEY || args[0] === '--login') { | ||
| // Interactive login flow | ||
| if (!process.stdin.isTTY && args[0] !== '--login') { | ||
| // Non-interactive and no key — try login anyway since MCP clients pipe stdio | ||
| API_KEY = await interactiveLogin(API_URL); | ||
| } else { | ||
| API_KEY = await interactiveLogin(API_URL); | ||
| } | ||
| if (args[0] === '--login') { | ||
| // Explicit interactive login flow | ||
| API_KEY = await interactiveLogin(API_URL); | ||
| } | ||
| if (!API_KEY) { | ||
| // No key - start anyway. Pre-auth tools (trending_teaser, send_feedback) | ||
| // work without one; authed tools return login instructions on first use. | ||
| console.error(' Frontrun MCP: no API key configured - running in free-sample mode.'); | ||
| console.error(' Try the trending_teaser tool, or authenticate: npx frontrun-mcp-server --login\n'); | ||
| } | ||
| // ============================================================ | ||
@@ -289,2 +291,40 @@ // API CLIENT | ||
| // Unauthenticated call - for pre-auth endpoints (teaser, agent-feedback). | ||
| // Never sends the API key, so it works before any key is configured. | ||
| async function publicApiCall(method, path, body = null) { | ||
| const url = `${API_URL}/v1${path}`; | ||
| const options = { | ||
| method, | ||
| headers: { 'Content-Type': 'application/json' }, | ||
| }; | ||
| if (body) { | ||
| options.body = JSON.stringify(body); | ||
| } | ||
| const controller = new AbortController(); | ||
| const timeout = setTimeout(() => controller.abort(), 30000); | ||
| options.signal = controller.signal; | ||
| let response; | ||
| try { | ||
| response = await fetch(url, options); | ||
| } catch (err) { | ||
| clearTimeout(timeout); | ||
| if (err.name === 'AbortError') return { error: 'Request timed out (30s). Try again.' }; | ||
| return { error: `Network error: ${err.message}` }; | ||
| } | ||
| clearTimeout(timeout); | ||
| if (response.status === 429) { | ||
| const retry = response.headers.get('Retry-After') || '60'; | ||
| return { error: `Rate limited. Retry in ${retry}s.` }; | ||
| } | ||
| if (!response.ok) { | ||
| const text = await response.text(); | ||
| return { error: `HTTP ${response.status}: ${text.slice(0, 500)}` }; | ||
| } | ||
| return response.json(); | ||
| } | ||
| function buildQS(params) { | ||
@@ -309,6 +349,35 @@ const qs = new URLSearchParams(); | ||
| name: 'frontrun', | ||
| version: '2.5.0', | ||
| version: '2.6.0', | ||
| }); | ||
| // ============================================================ | ||
| // PRE-AUTH (no API key required) | ||
| // ============================================================ | ||
| server.tool( | ||
| 'trending_teaser', | ||
| 'FREE SAMPLE - no auth or API key needed. Top 5 trending companies from Frontrun\'s follow graph over the last 7 days: name, X handle, sector, follower count, first-flagged date, and how many tracked investors newly followed each (counts only - investor identities require a plan). Use this to try Frontrun before configuring a key.', | ||
| {}, | ||
| async () => result(await publicApiCall('GET', '/teaser/trending')) | ||
| ); | ||
| server.tool( | ||
| 'send_feedback', | ||
| 'Send feedback to the Frontrun team - no auth or API key needed. Hit a confusing error, a missing capability, or a docs gap? Report it here so we can fix it for agents like you. Include the tool name and your agent runtime if relevant.', | ||
| { | ||
| message: z.string().max(2000).describe('The feedback itself (required, max 2000 chars)'), | ||
| tool: z.string().max(200).optional().describe('Which Frontrun tool/endpoint this is about, e.g. "frontrun_trending"'), | ||
| agent: z.string().max(200).optional().describe('Your agent runtime, e.g. "claude-code"'), | ||
| contact: z.string().max(200).optional().describe('Optional contact (email/X handle) if you want a reply'), | ||
| }, | ||
| async ({ message, tool, agent, contact }) => { | ||
| const body = { message }; | ||
| if (tool) body.tool = tool; | ||
| if (agent) body.agent = agent; | ||
| if (contact) body.contact = contact; | ||
| return result(await publicApiCall('POST', '/agent-feedback', body)); | ||
| } | ||
| ); | ||
| // ============================================================ | ||
| // ACCOUNT | ||
@@ -362,3 +431,3 @@ // ============================================================ | ||
| 'frontrun_new_follows', | ||
| 'Detect new follows across tracked accounts. Returns temporal diffs — who each tracked account recently followed and when. 16 credits.', | ||
| 'Detect new follows across tracked accounts. Returns temporal diffs - who each tracked account recently followed and when. 16 credits.', | ||
| { | ||
@@ -414,3 +483,3 @@ since: z.string().optional().describe('Time window: "24h", "7d", "30d", or ISO date. Default: "24h"'), | ||
| 'frontrun_convergence', | ||
| 'Detect convergence: entities followed by multiple tracked accounts independently. The highest-signal endpoint — when 3+ VCs independently follow the same account, it strongly suggests pre-funding interest. 60 credits.', | ||
| 'Detect convergence: entities followed by multiple tracked accounts independently. The highest-signal endpoint - when 3+ VCs independently follow the same account, it strongly suggests pre-funding interest. 60 credits.', | ||
| { | ||
@@ -432,3 +501,3 @@ min_accounts: z.number().optional().describe('Minimum tracked accounts that must follow. Default: 2. Use 3+ for high-conviction.'), | ||
| 'frontrun_trending', | ||
| 'Entities ranked by follow velocity — how many tracked accounts recently followed them. Use this for daily deal flow. 24 credits (+16 credits per item if classify=true).', | ||
| 'Entities ranked by follow velocity - how many tracked accounts recently followed them. Use this for daily deal flow. 24 credits (+16 credits per item if classify=true).', | ||
| { | ||
@@ -469,3 +538,3 @@ since: z.string().optional().describe('Time window. Default: "7d"'), | ||
| 'frontrun_thesis_search', | ||
| 'Semantic thesis search over your database (companies surfaced by the investors you track). Describe an investment thesis in plain language (e.g. "information markets — platforms where people trade on what they know") and get companies whose descriptions match the meaning, not just the exact words. Ranked by similarity. 40 credits.', | ||
| 'Semantic thesis search over your database (companies surfaced by the investors you track). Describe an investment thesis in plain language (e.g. "information markets - platforms where people trade on what they know") and get companies whose descriptions match the meaning, not just the exact words. Ranked by similarity. 40 credits.', | ||
| { | ||
@@ -650,3 +719,3 @@ q: z.string().describe('Investment thesis in plain language (min 10 characters)'), | ||
| 'frontrun_vc_similar', | ||
| 'Find VCs with similar follow patterns. Computed from temporal follow graph overlap — not raw follower lists. Use this to discover related investors. 60 credits.', | ||
| 'Find VCs with similar follow patterns. Computed from temporal follow graph overlap - not raw follower lists. Use this to discover related investors. 60 credits.', | ||
| { | ||
@@ -694,3 +763,3 @@ handle: z.string().describe('Twitter/X handle of the tracked VC'), | ||
| 'frontrun_discover', | ||
| 'Personalized account recommendations based on your tracked set and custom classification rules. "You track 50 VCs — here are accounts they follow that you\'re not tracking yet." 60 credits.', | ||
| 'Personalized account recommendations based on your tracked set and custom classification rules. "You track 50 VCs - here are accounts they follow that you\'re not tracking yet." 60 credits.', | ||
| { | ||
@@ -706,3 +775,3 @@ sector: z.string().optional().describe('Narrow by sector'), | ||
| 'frontrun_reports', | ||
| 'Historical daily reports — the companies discovered in your daily email reports. Filter by date range and sector. "Show me last week\'s stablecoin discoveries." 4 credits.', | ||
| 'Historical daily reports - the companies discovered in your daily email reports. Filter by date range and sector. "Show me last week\'s stablecoin discoveries." 4 credits.', | ||
| { | ||
@@ -709,0 +778,0 @@ since: z.string().optional().describe('Time range: "7d", "14d", "30d", or "YYYY-MM-DD". Default: "7d"'), |
+2
-2
| { | ||
| "name": "frontrun-mcp-server", | ||
| "mcpName": "io.github.jongall45/frontrun-mcp-server", | ||
| "version": "2.5.2", | ||
| "description": "Frontrun MCP Server — VC follow signal intelligence, company research, and deal discovery for AI agents. 33 tools.", | ||
| "version": "2.6.0", | ||
| "description": "Frontrun MCP Server - VC follow signal intelligence, company research, and deal discovery for AI agents. 35 tools.", | ||
| "type": "module", | ||
@@ -7,0 +7,0 @@ "main": "index.js", |
+29
-13
| # Frontrun MCP Server | ||
| VC follow intelligence for AI agents. Track what top investors follow on X — detect new follows, convergence signals, and trending companies before they're announced. | ||
| VC follow intelligence for AI agents. Track what top investors follow on X - detect new follows, convergence signals, and trending companies before they're announced. | ||
| 33 tools. Version 2.5.0. | ||
| 35 tools. Version 2.6.0. | ||
| ## Try it without an account | ||
| Two tools work with no API key at all - the server runs in free-sample mode if you skip auth: | ||
| ```bash | ||
| npx frontrun-mcp-server # no key, no login - trending_teaser and send_feedback just work | ||
| ``` | ||
| > "Show me the Frontrun trending teaser" | ||
| ## Setup (1 minute) | ||
@@ -14,3 +24,3 @@ | ||
| ```bash | ||
| # Step 1: Log in — opens browser, saves credentials locally | ||
| # Step 1: Log in - opens browser, saves credentials locally | ||
| npx frontrun-mcp-server --login | ||
@@ -126,3 +136,3 @@ | ||
| ### Deep research | ||
| - "Tell me everything about @hitdotone — who founded it, what they're building, and who's backing them" | ||
| - "Tell me everything about @hitdotone - who founded it, what they're building, and who's backing them" | ||
| - "Who are the founders of @someproject and what's their background?" | ||
@@ -152,3 +162,3 @@ - "What funding has @tempofinance raised?" | ||
| **The signal:** VCs typically follow companies 2-8 weeks before a funding announcement. Convergence — multiple VCs independently following the same account — is the strongest signal. | ||
| **The signal:** VCs typically follow companies 2-8 weeks before a funding announcement. Convergence - multiple VCs independently following the same account - is the strongest signal. | ||
@@ -161,3 +171,3 @@ **What you're paying for:** Every response is computed intelligence, not raw data. Sectors are classified by AI, convergence is detected algorithmically, and company profiles are synthesized from multiple sources. | ||
| Your API key has a credit balance — Pro includes 10,000 credits every month, and you can add more (or turn on auto-refill) at frontrun.vc/api/billing. Each query costs credits: | ||
| Your API key has a credit balance - Pro includes 10,000 credits every month, and you can add more (or turn on auto-refill) at frontrun.vc/api/billing. Each query costs credits: | ||
@@ -174,3 +184,3 @@ | What you're doing | Credits | | ||
| A typical daily check-in (feed + convergence + a few company deep-dives) runs ~300 credits — an included month covers it more than 30x over. Agent-scale usage is what auto-refill is for. | ||
| A typical daily check-in (feed + convergence + a few company deep-dives) runs ~300 credits - an included month covers it more than 30x over. Agent-scale usage is what auto-refill is for. | ||
@@ -181,4 +191,10 @@ --- | ||
| The agent has access to these tools automatically. You don't need to call them by name — just ask your question and the agent picks the right tool. | ||
| The agent has access to these tools automatically. You don't need to call them by name - just ask your question and the agent picks the right tool. | ||
| ### No auth needed | ||
| | Tool | What it does | | ||
| |---|---| | ||
| | `trending_teaser` | Free sample - top 5 trending companies (7d), no API key required | | ||
| | `send_feedback` | Send feedback to the Frontrun team - errors, missing capabilities, docs gaps | | ||
| ### Tracking | ||
@@ -191,3 +207,3 @@ | Tool | What it does | | ||
| | `frontrun_untrack` | Stop monitoring an account | | ||
| | `frontrun_preview` | Preview an account before tracking — signal score, sector hints, recommendation | | ||
| | `frontrun_preview` | Preview an account before tracking - signal score, sector hints, recommendation | | ||
@@ -203,6 +219,6 @@ ### Signals | ||
| | `frontrun_search` | Search discovered entities by sector, keyword, type | | ||
| | `frontrun_thesis_search` | Semantic search — describe a thesis in plain language, get matching companies | | ||
| | `frontrun_thesis_search` | Semantic search - describe a thesis in plain language, get matching companies | | ||
| | `frontrun_feed` | Real-time activity feed across all tracked accounts | | ||
| | `frontrun_sectors` | Sector breakdown of discovered entities | | ||
| | `frontrun_discover` | Personalized recommendations — "accounts your VCs follow that you're not tracking" | | ||
| | `frontrun_discover` | Personalized recommendations - "accounts your VCs follow that you're not tracking" | | ||
| | `frontrun_reports` | Generated intelligence reports for your tracked accounts | | ||
@@ -213,3 +229,3 @@ | ||
| |---|---| | ||
| | `frontrun_company` | Company overview — what they do, sector, stage | | ||
| | `frontrun_company` | Company overview - what they do, sector, stage | | ||
| | `frontrun_company_founders` | Founder profiles, backgrounds, previous companies | | ||
@@ -223,3 +239,3 @@ | `frontrun_company_signals` | Social buzz, sentiment, notable engagements | | ||
| |---|---| | ||
| | `frontrun_vc_activity` | VC follow patterns — velocity, sector focus, recent follows | | ||
| | `frontrun_vc_activity` | VC follow patterns - velocity, sector focus, recent follows | | ||
| | `frontrun_vc_similar` | Find VCs with overlapping follow patterns | | ||
@@ -226,0 +242,0 @@ |
44245
8.21%737
9.02%283
5.99%5
25%