Skip to main content
Glama
badchars

osint-mcp-server

by badchars

vt_subdomains

Enumerate subdomains for a domain using VirusTotal data to identify potential attack surfaces and infrastructure components.

Instructions

Enumerate subdomains for a domain via VirusTotal. Requires VT_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to enumerate subdomains for
limitNoMaximum subdomains to return (default: 40)

Implementation Reference

  • The implementation of the `vtSubdomains` function which fetches subdomains for a given domain from the VirusTotal API.
    export async function vtSubdomains(domain: string, apiKey: string, limit = 40): Promise<VtSubdomainsResult> {
      const data = await vtFetch(`/domains/${encodeURIComponent(domain)}/subdomains?limit=${limit}`, apiKey);
      if (!data) return { domain, subdomains: [], total: 0 };
    
      const subdomains: string[] = (data.data ?? []).map((d: any) => d.id);
      return { domain, subdomains, total: subdomains.length };
    }
  • The TypeScript interface defining the result structure for `vt_subdomains`.
    interface VtSubdomainsResult {
      domain: string;
      subdomains: string[];
      total: number;
    }
  • The registration of the `vt_subdomains` tool within the tool definition framework.
    const vtSubdomainsTool: ToolDef = {
      name: "vt_subdomains",
      description: "Enumerate subdomains for a domain via VirusTotal. Requires VT_API_KEY.",
      schema: {
        domain: z.string().describe("Domain to enumerate subdomains for"),
        limit: z.number().optional().describe("Maximum subdomains to return (default: 40)"),
      },
      execute: async (args, ctx) => {
        const key = requireApiKey(ctx.config.vtApiKey, "VirusTotal", "VT_API_KEY");
        return json(await vtSubdomains(args.domain as string, key, args.limit as number | undefined));
      },
    };

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/badchars/osint-mcp-server'

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