Skip to main content
Glama
co0ontty

Chaitin IP Intelligence Search Tool

by co0ontty

长亭 IP 情报查询

Query IP threat intelligence to assess risk: obtain geolocation, ASN, and historical malicious behavior from Chaitin's honeypot network and defense nodes.

Instructions

基于长亭威胁情报,获取给定 IP 的威胁情报信息,包括 IP 地址、地理位置、ASN、历史恶意行为等信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipYesIP address

Implementation Reference

  • src/server.ts:4-78 (registration)
    The createServer() function that registers the '长亭 IP 情报查询' tool with MCP, including schema definition, API fetch logic, data cleaning, and response formatting.
    export function createServer(): McpServer {
      const server = new McpServer({
        name: "IP Intelligence Search Tool",
        version: "0.1.1",
      });
    
      server.tool(
        "长亭 IP 情报查询",
        "基于长亭威胁情报,获取给定 IP 的威胁情报信息,包括 IP 地址、地理位置、ASN、历史恶意行为等信息",
        {
          ip: z.string().describe("IP address"),
        },
        async ({ ip }) => {
          if (!ip) {
            throw new Error("IP address is required.");
          }
    
          try {
            const response = await fetch(
              `https://intelligence.app.safepoint.cloud/api/v1/ip_info?ip=${ip}`,
              {
                headers: {
                  'Accept': 'application/json, text/plain, */*',
                  'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36',
                },
              }
            );
    
            if (!response.ok) {
              throw new Error(`HTTP error! status: ${response.status}`);
            }
    
            const summary_data = await response.json();
            for (let i = 0; i < summary_data.data.activities.length; i++) {
              if (summary_data.data.activities[i].malicious_level === 0){
                  summary_data.data.activities.splice(i, 1);
                  i--;
              }
            }
            // 历史攻击
            const response_detail = await fetch(`https://intelligence.app.safepoint.cloud/api/v1/intelligences/list?page=1&per_page=20&ip=${ip}`,{
              headers: {
                'Accept': 'application/json, text/plain, */*',
                'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36',
              },
            }
            ); 
            const detail_data = await response_detail.json();
            // clear unused fields
            for (let i = 0; i < detail_data.data.data.length; i++) {
              delete detail_data.data.data[i].id;
              delete detail_data.data.data[i].type;
              delete detail_data.data.data[i].stats;  
              delete detail_data.data.data[i].count;  
              delete detail_data.data.data[i].creator.avatar;  
            }
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify({
                    summary_data: summary_data.data,
                    detail_data: detail_data.data.data,
                  }, null, 2),
                },
              ],
            };
          } catch (error) {
            throw new Error(`Failed to fetch IP information: ${(error as Error).message}`);
          }
        },
      );
    
      return server;
    }
  • The async handler function that fetches IP intelligence data from two endpoints (ip_info and intelligences/list), filters out benign activities, cleans unused fields, and returns structured JSON.
    async ({ ip }) => {
      if (!ip) {
        throw new Error("IP address is required.");
      }
    
      try {
        const response = await fetch(
          `https://intelligence.app.safepoint.cloud/api/v1/ip_info?ip=${ip}`,
          {
            headers: {
              'Accept': 'application/json, text/plain, */*',
              'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36',
            },
          }
        );
    
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
    
        const summary_data = await response.json();
        for (let i = 0; i < summary_data.data.activities.length; i++) {
          if (summary_data.data.activities[i].malicious_level === 0){
              summary_data.data.activities.splice(i, 1);
              i--;
          }
        }
        // 历史攻击
        const response_detail = await fetch(`https://intelligence.app.safepoint.cloud/api/v1/intelligences/list?page=1&per_page=20&ip=${ip}`,{
          headers: {
            'Accept': 'application/json, text/plain, */*',
            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36',
          },
        }
        ); 
        const detail_data = await response_detail.json();
        // clear unused fields
        for (let i = 0; i < detail_data.data.data.length; i++) {
          delete detail_data.data.data[i].id;
          delete detail_data.data.data[i].type;
          delete detail_data.data.data[i].stats;  
          delete detail_data.data.data[i].count;  
          delete detail_data.data.data[i].creator.avatar;  
        }
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                summary_data: summary_data.data,
                detail_data: detail_data.data.data,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to fetch IP information: ${(error as Error).message}`);
      }
  • Schema definition for the tool input: requires a single 'ip' parameter (string) described as 'IP address'.
    {
      ip: z.string().describe("IP address"),
    },
  • Entry point that creates the server using createServer() and connects it via stdio transport.
    #!/usr/bin/env node
    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
    
    import { createServer } from "./server.js";
    
    async function main() {
      const server: McpServer = createServer();
      const transport = new StdioServerTransport();
      await server.connect(transport);
      console.debug("IP Intelligence Search Tool running on stdio");
Behavior2/5

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

No annotations are present, so the description must fully convey behavioral traits. It implies a read-only query but does not explicitly state idempotency, side effects, or requirements (e.g., authentication, rate limits). The listed return types provide some transparency, but critical behavioral details are missing.

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 a single, clear sentence that efficiently conveys the tool's function and output. It avoids unnecessary words and is well-structured for quick comprehension, though a slightly more structured format could improve scanability.

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

Completeness4/5

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

For a simple tool with one parameter and no output schema, the description adequately explains the purpose and return value categories. It does not go into excessive detail, but covers the essential information an agent needs to decide whether to invoke it.

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?

The schema covers 100% of the single 'ip' parameter with a basic description. The tool's description adds no extra semantic value beyond what the schema already provides, so the baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool's purpose: querying threat intelligence for a given IP. It uses the verb '获取' and explicitly lists the types of information returned (IP, location, ASN, malicious behavior), making it specific and unambiguous.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool, prerequisites, or alternatives. Without sibling tools, the lack of usage context is less critical, but the description still fails to set expectations for typical use cases or limitations.

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/co0ontty/chaitin-ip-intelligence-search-tool'

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