Skip to main content
Glama
CloudWaddie

OSINT MCP Server

securitytrails_subdomains

Discover subdomains for any domain using SecurityTrails data to enhance security research and reconnaissance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to find subdomains in SecurityTrails

Implementation Reference

  • The getSubdomains method implementation in the SecurityTrailsApiClient class, which performs the actual API call to retrieve subdomains.
    async getSubdomains(domain: string): Promise<SecurityTrailsResult> {
      const apiKey = configManager.get("SECURITYTRAILS_API_KEY");
      if (!apiKey) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          "SECURITYTRAILS_API_KEY is not configured"
        );
      }
    
      try {
        const data = await this.fetch<any>(`domain/${domain}/subdomains`, {
          method: "GET",
          headers: {
            APIKEY: apiKey,
          },
        });
    
        return SecurityTrailsResultSchema.parse(data);
      } catch (error) {
        if (error instanceof McpError) throw error;
        throw new McpError(
          ErrorCode.InternalError,
          `SecurityTrails error: ${(error as Error).message}`
        );
      }
    }
  • src/index.ts:293-301 (registration)
    The MCP tool registration for 'securitytrails_subdomains' in src/index.ts.
    server.tool(
      "securitytrails_subdomains",
      { domain: z.string().describe("Domain to find subdomains in SecurityTrails") },
      async ({ domain }) => {
        const result = await stClient.getSubdomains(domain);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
  • The Zod schema for validating the output of the SecurityTrails API request.
    export const SecurityTrailsResultSchema = z.object({
      endpoint: z.string().optional(),
      subdomains: z.array(z.string()).optional(),
      current_dns: z.any().optional(),
      history: z.any().optional(),
    });

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

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