Skip to main content
Glama
badchars

osint-mcp-server

by badchars

censys_certificates

Search Censys certificate database to find SSL/TLS certificate details including fingerprints, subjects, issuers, validity periods, and SANs for security analysis.

Instructions

Search Censys certificate database. Returns certificate fingerprints, subjects, issuers, validity, and SANs. Requires CENSYS_API_ID + CENSYS_API_SECRET.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesCertificate search query (e.g. 'parsed.names: example.com')
per_pageNoResults per page (max 100, default: 25)

Implementation Reference

  • Implementation of the censysCertificates function which queries the Censys API for certificates.
    export async function censysCertificates(query: string, auth: CensysAuth, perPage = 25): Promise<CensysCertsResult> {
      const data = await censysFetch("POST", "/certificates/search", auth, {
        q: query,
        per_page: Math.min(perPage, 100),
      });
    
      const result = data.result ?? {};
      const certificates: CensysCert[] = (result.hits ?? []).map((c: any) => ({
        fingerprint: c.fingerprint_sha256 ?? c.fingerprint ?? "",
        subject: c.parsed?.subject
          ? { commonName: c.parsed.subject.common_name?.[0], organization: c.parsed.subject.organization?.[0] }
          : undefined,
        issuer: c.parsed?.issuer
          ? { commonName: c.parsed.issuer.common_name?.[0], organization: c.parsed.issuer.organization?.[0] }
          : undefined,
        validityStart: c.parsed?.validity?.start,
        validityEnd: c.parsed?.validity?.end,
        names: c.names ?? c.parsed?.names ?? [],
      }));
    
      return { total: result.total ?? 0, certificates, query };
    }
  • Registration of the censys_certificates tool in the protocol layer, invoking the censysCertificates function.
    const censysCertificatesTool: ToolDef = {
      name: "censys_certificates",
      description: "Search Censys certificate database. Returns certificate fingerprints, subjects, issuers, validity, and SANs. Requires CENSYS_API_ID + CENSYS_API_SECRET.",
      schema: {
        query: z.string().describe("Certificate search query (e.g. 'parsed.names: example.com')"),
        per_page: z.number().optional().describe("Results per page (max 100, default: 25)"),
      },
      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 censysCertificates(args.query as string, { id, secret }, args.per_page as number | undefined));
      },
    };
    
    // ═══════════════════════════════════════════════════════════════
  • Type definitions for certificate search results (CensysCert, CensysCertsResult).
    interface CensysCert {
      fingerprint: string;
      subject?: { commonName?: string; organization?: string };
      issuer?: { commonName?: string; organization?: string };
      validityStart?: string;
      validityEnd?: string;
      names: string[];
    }
    
    interface CensysCertsResult {
      total: number;
      certificates: CensysCert[];
      query: string;
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses authentication requirements, which is useful behavioral context. However, it doesn't mention rate limits, pagination behavior, error handling, or whether this is a read-only operation. The description adds some value but leaves gaps in behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: one stating the purpose and return fields, and another stating authentication requirements. It's front-loaded with key information and has minimal waste, though it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description is moderately complete. It covers purpose and authentication but lacks details on return format, error cases, and behavioral constraints. For a search tool with authentication needs, it should provide more context about results and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., no examples beyond the schema's query example, no additional constraints). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches the Censys certificate database and lists specific return fields (fingerprints, subjects, issuers, validity, SANs), providing a specific verb+resource. However, it doesn't explicitly differentiate from sibling tools like 'censys_hosts' or 'crtsh_search', which also search certificate-related data, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for certificate searches but doesn't explicitly state when to use this tool versus alternatives like 'censys_hosts' or 'crtsh_search'. It mentions authentication requirements (CENSYS_API_ID + CENSYS_API_SECRET), which provides some context, but lacks clear when/when-not guidance or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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