Skip to main content
Glama

test_bloodhound_connection

Test connectivity to BloodHound API and retrieve version information for Active Directory penetration testing assessments.

Instructions

connect to bloodhoundapi and get version

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler decorated with @mcp.tool, implementing the core logic by calling bloodhound.connectToApi() to test the BloodHound connection and retrieve version.
    @mcp.tool(name="test_bloodhound_connection",description="connect to bloodhoundapi and get version") def test_bloodhound_connection(): return bloodhound.connectToApi()
  • Supporting helper function connectToApi() that creates BloodHound client credentials from config and fetches the API version via the Client class.
    def connectToApi(): # This might be best loaded from a file credentials = Credentials( token_id=config.BHE_TOKEN_ID, token_key=config.BHE_TOKEN_KEY, ) client = Client(scheme=BHE_SCHEME, host=config.BHE_DOMAIN, port=config.BHE_PORT, credentials=credentials) return client.get_version().api_version
  • The Client.get_version() method called by connectToApi() to perform the actual API request for version information.
    def get_version(self) -> APIVersion: response = self._request("GET", "/api/version") payload = response.json() return APIVersion(api_version=payload["data"]["API"]["current_version"], server_version=payload["data"]["server_version"])
  • The @mcp.tool decorator registering the 'test_bloodhound_connection' tool.
    @mcp.tool(name="test_bloodhound_connection",description="connect to bloodhoundapi and get version")

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/YoussefSahnoun/PentestMCP'

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