Skip to main content
Glama
ahnlabio

BICScan MCP Server

by ahnlabio

get_risk_score

Assess risk for crypto addresses, domains, and dApps using a 0-100 scoring system. Input an EOA, CA, ENS, CNS, KNS, or Hostname to receive a detailed risk evaluation summary.

Instructions

Get Risk Score for Crypto, Domain Name, ENS, CNS, KNS or even Hostname Address

Args: address: EOA, CA, ENS, CNS, KNS or even HostName Returns: Dict: where summary.bicscan_score is from 0 to 100. 100 is high risk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes

Implementation Reference

  • The primary handler function for the 'get_risk_score' tool. It is registered via the @mcp.tool() decorator and implements the tool logic by sending a POST request to the BICScan API's /v1/scan endpoint with assets=False to retrieve the risk score.
    @mcp.tool() async def get_risk_score(address: str) -> dict: """Get Risk Score for Crypto, Domain Name, ENS, CNS, KNS or even Hostname Address Args: address: EOA, CA, ENS, CNS, KNS or even HostName Returns: Dict: where summary.bicscan_score is from 0 to 100. 100 is high risk. """ logger.info(f"Getting risk score for address: {address}") endpoint = "/v1/scan" data = { "query": address, "sync": True, "assets": False, } return await post_request(endpoint, data=data)
  • Supporting utility function used by get_risk_score to perform authenticated asynchronous POST requests to the BICScan API, including logging and error handling.
    async def post_request( endpoint: str, data: dict[str, Any] | None = None ) -> dict[str, Any] | None: """Make a request to BICScan API with proper error handling.""" headers = { "User-Agent": "bicscan-mcp/1.0", "Accept": "application/json", "X-Api-Key": BICSCAN_API_KEY, } url = urljoin(BICSCAN_API_BASE, endpoint) async with httpx.AsyncClient() as client: try: logger.info(f"Making request to {url}") logger.debug(f"{headers=} {data=}") response = await client.post(url, headers=headers, json=data, timeout=30) response.raise_for_status() logger.info(f"Received response: {response.status_code}") return response.json() except httpx.HTTPStatusError as http_err: logger.error(f"Received response: {http_err}, {response.text}") return response.json() except Exception as e: logger.exception(f"Received response: {e}, {response.text}") return {}
  • Type annotations and docstring defining the input schema (address: str) and output (dict with risk score details) for the get_risk_score tool.
    async def get_risk_score(address: str) -> dict: """Get Risk Score for Crypto, Domain Name, ENS, CNS, KNS or even Hostname Address Args: address: EOA, CA, ENS, CNS, KNS or even HostName Returns: Dict: where summary.bicscan_score is from 0 to 100. 100 is high risk. """
  • The @mcp.tool() decorator registers the get_risk_score function as an MCP tool.
    @mcp.tool()

Other Tools

Related 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/ahnlabio/bicscan-mcp'

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