Skip to main content
Glama
badchars

osint-mcp-server

by badchars

censys_host_details

Retrieve comprehensive host intelligence from Censys for any IP address, including services, certificates, OS details, location, and ASN data to support security analysis and reconnaissance.

Instructions

Get detailed Censys host information for a single IP: all services, certificates, OS, location, ASN. Requires CENSYS_API_ID + CENSYS_API_SECRET.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address to look up

Implementation Reference

  • The implementation of the `censysHostDetails` function which performs the API request to Censys and maps the result.
    export async function censysHostDetails(ip: string, auth: CensysAuth): Promise<CensysHost> {
      const data = await censysFetch("GET", `/hosts/${encodeURIComponent(ip)}`, auth);
      const h = data.result ?? {};
    
      return {
        ip: h.ip ?? ip,
        services: (h.services ?? []).map((s: any) => ({
          port: s.port,
          serviceName: s.service_name ?? s.extended_service_name ?? "",
          transportProtocol: s.transport_protocol ?? "TCP",
          certificate: s.tls?.certificates?.leaf_data?.fingerprint,
        })),
        location: h.location
          ? { country: h.location.country, city: h.location.city, province: h.location.province }
          : undefined,
        autonomousSystem: h.autonomous_system
          ? { asn: h.autonomous_system.asn, name: h.autonomous_system.name, bgpPrefix: h.autonomous_system.bgp_prefix }
          : undefined,
        lastUpdatedAt: h.last_updated_at,
        operatingSystem: h.operating_system
          ? { product: h.operating_system.product, version: h.operating_system.version }
          : undefined,
      };
    }
  • Registration of the `censys_host_details` tool definition.
    const censysHostDetailsTool: ToolDef = {
      name: "censys_host_details",
      description: "Get detailed Censys host information for a single IP: all services, certificates, OS, location, ASN. Requires CENSYS_API_ID + CENSYS_API_SECRET.",
      schema: {
        ip: z.string().describe("IP address to look up"),
      },
      execute: async (args, ctx) => {
        const id = requireApiKey(ctx.config.censysApiId, "Censys", "CENSYS_API_ID");
        const secret = requireApiKey(ctx.config.censysApiSecret, "Censys", "CENSYS_API_SECRET");
        return json(await censysHostDetails(args.ip as string, { id, secret }));
      },
    };
    
    const censysCertificatesTool: ToolDef = {

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