The BloodHound MCP Server enables Large Language Models (primarily Claude Desktop) to query and analyze BloodHound Community Edition data using natural language for Active Directory security assessments and attack path identification.
Core Domain Analysis
Query domains, users, groups, computers, OUs, and GPOs with pagination support
Search objects by name or Object ID with optional type filtering
Analyze user administrative rights, group memberships, sessions, DCSync privileges, and various remote access rights (RDP/PSRemote/DCOM/SQL)
Examine group memberships, controllers, administrative rights, and member sessions
Investigate computer administrative access, sessions, constrained delegation, and remote access rights
Explore OU hierarchies and contained security objects
Analyze GPO assignments, controllers, linked containers, and Tier Zero associations
Attack Path & Privilege Analysis
Find shortest paths between security principals and identify privilege escalation opportunities
Analyze edge compositions and complex relationships between nodes
Discover DCSync capabilities, kerberoastable users, and relay attack targets
Map constrained delegation rights and lateral movement paths
Cross-Domain Analysis
Identify foreign admins, groups, users, and GPO controllers across domains
Analyze inbound/outbound trust relationships and foreign security principals
ADCS Infrastructure Analysis
Investigate Certificate Authorities (Root, Enterprise, AIA), templates, and controllers
Support identification of certificate-based attack paths (ESC1-ESC6)
Advanced Capabilities
Execute and interpret custom Cypher queries for complex Neo4j graph analysis
Perform fuzzy and exact graph searches
Create and manage saved queries
Map all control relationships between security principals
OpenGraph CRUD operations on custom nodes (BloodHound 8.0+)
Assess data quality and completeness
Organize assets into logical groups (Tier Zero, Owned, custom)
Technical Features
Direct REST API integration with BloodHound Community Edition
Properly formatted, paginated results with counts and metadata
Graceful error handling
Enables querying and analysis of BloodHound Community Edition data through its REST API and Cypher queries, providing tools for Active Directory attack path analysis, user/group/computer assessment, privilege escalation identification, and security principal relationship mapping.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BloodHound MCP Serverfind all users with admin rights to the domain controller"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
BloodHound MCP
A Model Context Protocol (MCP) server that connects LLMs to BloodHound Community Edition. Ask questions in natural language, get attack path analysis, run Cypher queries, and explore Active Directory, Azure/Entra ID, and OpenGraph environments — all from your AI assistant.
Demo
Watch the demonstration video (updated demo coming soon)
How It Works
The server exposes BloodHound CE's REST API and Neo4j graph through a set of 11 composite MCP tools, 10 reference resources, and a system prompt tuned for offensive security analysis.
Composite Tools
Each tool uses an info_type parameter to select what data is returned, keeping the tool surface small and token-efficient:
Tool |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Resources
Reference material the LLM loads on demand — no extra API calls:
Resource URI | Contents |
| Cypher syntax, schema, property names, patterns |
| Battle-tested templates: DCSync, Kerberoasting, GPO abuse, delegation, ADCS, shadow credentials, NTLM relay, and more |
| AD node types and relationships quick reference |
| Full AD attack methodology and workflow |
| Azure/Entra ID analysis quick reference |
| Full Azure attack chains |
| ADCS ESC1–ESC13 quick reference |
| Detailed ESC analysis and exploitation |
| Custom node schema design and best practices |
| SQL Server and Web App OpenGraph examples |
System Prompt
The bloodhound_assistant prompt includes behavioral rules that guide the LLM:
Load the offensive query library before writing Cypher for any attack scenario
Never draw privilege conclusions without checking group memberships and
admincountRespect BloodHound's property naming conventions (
hasspn,enabled,admincount— all lowercase)Handle uppercase name storage (
DOMAIN ADMINS@CORP.LOCAL) correctly in filtersFollow proper DCSync and GPO edge traversal patterns
Prerequisites
Python 3.11+
BloodHound Community Edition instance with data loaded
BloodHound API credentials (Token ID + Token Key)
Installation
git clone https://github.com/mwnickerson/bloodhound_mcp.git
cd bloodhound-mcp
uv syncCreate a .env file in the project root:
BLOODHOUND_DOMAIN=your-bloodhound-instance.domain.com
BLOODHOUND_TOKEN_ID=your-token-id
BLOODHOUND_TOKEN_KEY=your-token-keyThe server defaults to https on port 443. Override if needed:
BLOODHOUND_PORT=8080
BLOODHOUND_SCHEME=httpConfiguration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"bloodhound_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/bloodhound-mcp",
"run",
"main.py"
]
}
}
}Claude Code
Add to ~/.claude/mcp.json:
{
"mcpServers": {
"bloodhound_mcp": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/path/to/bloodhound-mcp",
"run",
"main.py"
]
}
}
}OpenAI Codex CLI
Add to ~/.codex/config.toml (or .codex/config.toml for project-scoped config):
[mcp_servers.bloodhound_mcp]
command = "uv"
args = ["--directory", "/path/to/bloodhound-mcp", "run", "main.py"]Since the server loads credentials from .env automatically, no env block is needed. If you prefer to pass them explicitly:
[mcp_servers.bloodhound_mcp]
command = "uv"
args = ["--directory", "/path/to/bloodhound-mcp", "run", "main.py"]
[mcp_servers.bloodhound_mcp.env]
BLOODHOUND_DOMAIN = "your-bloodhound-instance.domain.com"
BLOODHOUND_TOKEN_ID = "your-token-id"
BLOODHOUND_TOKEN_KEY = "your-token-key"MCP Inspector
Command:
uvArgs:
--directory /path/to/bloodhound-mcp run main.py
BloodHound API Token
Log into BloodHound CE
Navigate to Administration → API Tokens
Create a new token and copy the Token ID and Token Key into your
.env
Usage
Example Queries
Reconnaissance:
What domains are in BloodHound?
Show me all Domain Admins in CORP.LOCAL
Find all kerberoastable users
Which computers have unconstrained delegation?User and Group Analysis:
What admin rights does jsmith@corp.local have?
Show me all sessions for the administrator account
What groups is this user a member of?
Who controls the IT ADMINS group?Attack Path Analysis:
Find the shortest path from jsmith@corp.local to Domain Admins
Who has DCSync rights in the domain?
Show me all GPO abuse paths
Find ADCS ESC1 paths in the domainCustom Cypher:
Run a Cypher query to find all users with SPN set and admincount=1
Find all computers where DOMAIN USERS can RDPOpenGraph Support
BloodHound 8.0+ supports custom node types via OpenGraph, letting you model non-AD infrastructure (cloud resources, databases, custom assets) in the same graph as Active Directory.
The custom_nodes tool handles CRUD operations on node type configurations. Use the bloodhound://opengraph/guide and bloodhound://opengraph/examples resources for schema design and Cypher patterns.
Requires BloodHound CE 8.0 or later.
Security Considerations
BloodHound data processed through this tool is transmitted to your LLM provider's servers. Do not use this with production AD data unless you have assessed that risk.
Recommended use cases:
Lab environments (GOAD, DetectionLab, custom ranges)
Training and certification prep
Research and tool development
Non-production domain analysis
Best practices:
Rotate BloodHound API tokens regularly
Use a read-only API token where possible
Consider a local LLM bridge for sensitive environments
Testing
# Full test suite (307 tests)
uv run pytest
# Specific modules
uv run pytest tests/test_main_mcp_tools.py -v
uv run pytest tests/test_bloodhound_api.py -v
# Integration tests (requires a live BloodHound instance)
BLOODHOUND_INTEGRATION_TESTS=1 uv run pytest tests/test_integration.py -vRoadmap
Direct Neo4j access mode (bypass REST API for complex graph traversal)
Enhanced Azure/Entra ID tooling
Improved ADCS attack path coverage
Additional OpenGraph examples and templates
Contributing
Contributions are welcome. Open an issue to discuss significant changes before submitting a PR.
Fork the repo
Create a feature branch
Add tests for new functionality
Run
uv run pytestand confirm everything passesSubmit a pull request
Acknowledgments
SpecterOps for BloodHound Community Edition
Orange Cyberdefense for GOAD (used for testing)
@jlowin for FastMCP
@xpn for MCP inspiration via the Mythic MCP project
License
GNU General Public License v3.0 — see LICENSE for details.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.