Skip to main content
Glama
CloudWaddie

OSINT MCP Server

reverse_image_search_anime

Identify anime characters and scenes by uploading an image URL to search SauceNAO's database for matches and source information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesImage URL to search on SauceNAO

Implementation Reference

  • Registration and handler definition for reverse_image_search_anime.
    server.tool(
      "reverse_image_search_anime",
      { url: z.string().url().describe("Image URL to search on SauceNAO") },
      async ({ url }) => {
        const result = await snClient.searchUrl(url);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • Core logic implementation for searching SauceNAO.
    async searchUrl(url: string): Promise<SauceNaoResult> {
      const apiKey = configManager.get("SAUCENAO_API_KEY");
      if (!apiKey) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          "SAUCENAO_API_KEY is not configured"
        );
      }
    
      try {
        const data = await this.fetch<any>("search.php", {
          method: "GET",
        }, {
          db: 999,
          output_type: 2,
          numres: 5,
          url: url,
          api_key: apiKey,
        });
    
        return SauceNaoResultSchema.parse(data);
      } catch (error) {
        if (error instanceof McpError) throw error;
        throw new McpError(
          ErrorCode.InternalError,
          `SauceNAO error: ${(error as Error).message}`
        );
      }
    }
  • Validation schema for SauceNAO results.
    export const SauceNaoResultSchema = z.object({
      header: z.any(),
      results: z.array(z.object({
        header: z.any(),
        data: z.any(),
      })),
    });

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