Skip to main content
Glama
jongall45

Frontrun MCP Server

by jongall45

frontrun_account_activity

Analyze venture capital activity on X by tracking account follows, sector distribution, and follow velocity to identify investment trends and behavior patterns.

Instructions

Get activity profile for a tracked account: follow velocity, sector distribution, snapshot coverage, and recent follows with classification. Use this to analyze a specific VC's recent behavior.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesTwitter/X username of the tracked account
sinceNoTime window: "7d", "30d", "90d", or ISO date. Default: "30d"

Implementation Reference

  • The 'frontrun_account_activity' tool handler implementation. Makes a GET request to /v1/vc/:username/activity endpoint to retrieve a tracked account's activity profile including follow velocity, sector distribution, and recent follows.
    server.tool(
      'frontrun_account_activity',
      'Get activity profile for a tracked account: follow velocity, sector distribution, snapshot coverage, and recent follows with classification. Use this to analyze a specific VC\'s recent behavior.',
      {
        username: z.string().describe('Twitter/X username of the tracked account'),
        since: z.string().optional().describe('Time window: "7d", "30d", "90d", or ISO date. Default: "30d"'),
      },
      async ({ username, since }) => {
        const params = new URLSearchParams();
        if (since) params.set('since', since);
        const qs = params.toString();
        const result = await apiCall('GET', `/vc/${encodeURIComponent(username)}/activity${qs ? '?' + qs : ''}`);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Input schema definition using Zod for 'frontrun_account_activity' tool. Defines two parameters: 'username' (required Twitter/X username) and 'since' (optional time window for filtering activity data).
    {
      username: z.string().describe('Twitter/X username of the tracked account'),
      since: z.string().optional().describe('Time window: "7d", "30d", "90d", or ISO date. Default: "30d"'),
    },
  • The apiCall helper function used by the tool handler to make HTTP requests to the Frontrun API. Handles authentication, timeouts, rate limiting, and error responses.
    async function apiCall(method, path, body = null) {
      const url = `${API_URL}/v1${path}`;
      const options = {
        method,
        headers: {
          'X-API-Key': API_KEY,
          'Content-Type': 'application/json',
        },
      };
      if (body) {
        options.body = JSON.stringify(body);
      }
    
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), 60000);
      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 (60s). Try a narrower query.' };
        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.status === 401) {
        return { error: 'Invalid API key. Check FRONTRUN_API_KEY.' };
      }
      if (response.status === 402) {
        const data = await response.json();
        return { error: 'Insufficient balance', ...data };
      }
      if (!response.ok) {
        const text = await response.text();
        return { error: `HTTP ${response.status}: ${text.slice(0, 500)}` };
      }
    
      return response.json();
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jongall45/frontrun-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server