Skip to main content
Glama
usensedata

usensedata-mcp-server-query-china-company

Official
by usensedata

query_company_software_copyright_info

Retrieve detailed registration information for a company's software copyrights using its full name. Ideal for verifying intellectual property holdings or conducting due diligence on Chinese enterprises.

Instructions

Query the registration information of an company's software copyrights by its full name. Please use the fuzzy query tool to obtain the company full name before calling this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entNameYescompany full name

Implementation Reference

  • src/index.ts:206-228 (registration)
    Registers the 'query_company_software_copyright_info' tool using server.tool(), including description, input schema, and inline handler function.
    server.tool( "query_company_software_copyright_info", "Query the registration information of an company's software copyrights by its full name. Please use the fuzzy query tool to obtain the company full name before calling this tool.", { entName: z.string().describe("company full name"), }, async ({entName}) => { const requestData = { entName: entName, skip: "0" }; const prodId = "COM137"; const data = await yushantwo(requestData, prodId); return { content: [ { type: "text", text: data, }, ], }; } );
  • Handler function executes the tool logic by preparing request data with entName and skip=0, calling the shared yushantwo helper with product ID 'COM137', and returning the API response as text content.
    async ({entName}) => { const requestData = { entName: entName, skip: "0" }; const prodId = "COM137"; const data = await yushantwo(requestData, prodId); return { content: [ { type: "text", text: data, }, ], }; }
  • Input schema defined using Zod: requires 'entName' as a string describing the company full name.
    { entName: z.string().describe("company full name"), },
  • Shared utility function 'yushantwo' that handles API calls to Yushan service: generates SN, encrypts request with AES, sends POST, decrypts response. Used by the tool handler.
    async function yushantwo(requestData: RequestData, prodId: string): Promise<string> { const url = "***"; const reqTime = Date.now(); const requestSN = Array.from({ length: 32 }, () => "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678"[Math.floor(Math.random() * 58)]).join(""); const requestBody = JSON.stringify({ prod_id: prodId, req_data: requestData, req_time: reqTime, request_sn: requestSN, }); // 加密请求数据 const encryptedRequest = encrypt(requestBody, apiKey); const headers = { AES_KEY: apiKey, ACCT_ID: apiUserId, ENCODE: "AES256", }; try { const response = await fetch(url, { method: "POST", headers: headers, body: encryptedRequest, }); const responseText = await response.text(); // 解密返回数据 const decryptedString = decrypt(responseText, apiKey); return decryptedString; } catch (e) { console.error("Error:", e); return "error"; } }

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/usensedata/usensedata-mcp-server-query-china-company'

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