Skip to main content
Glama

run_blooodhound_query

Execute BloodHound Cypher queries to analyze Active Directory attack paths and identify security vulnerabilities during penetration testing.

Instructions

Run a bloodhound cypher query of your choice (use this to collect information about the network and potentially identify attack vectors)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • Registration of the tool using the @mcp.tool decorator.
    @mcp.tool(name="run_blooodhound_query",description="Run a bloodhound cypher query of your choice (use this to collect information about the network and potentially identify attack vectors)")
  • The tool handler function, which calls into the bloodhound module to execute the query.
    def run_bloodhound_query(query): return bloodhound.run_cypher_query(query)
  • Core helper function that authenticates with BloodHound CE API using HMAC-signed requests and executes the Cypher query via POST to /api/v2/graphs/cypher.
    def run_cypher_query(query): 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) payload={"query":query} data=json.dumps(payload).encode('utf-8') response=client._request("POST","/api/v2/graphs/cypher",body=data,content_type="application/json") return response.json()

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