Overview
HoxCore's primary AI integration is a built-in MCP (Model Context Protocol) server. MCP is an open standard that lets LLM clients connect to external tools and data sources. When the HoxCore MCP server is running, an AI assistant can query, search, and inspect your registry in real time, without you having to copy-paste YAML files manually.
There are two ways HoxCore works with AI:
- Active (MCP) — Start the MCP server and connect a compatible LLM client. The assistant can call tools, read resources, and use prompt templates to interact with your registry dynamically.
- Passive (YAML context) — Export entity YAML with
hxc show <identifier> --rawand paste it directly into any LLM chat window. No server required.
What is MCP?
The Model Context Protocol is an open standard that allows AI assistants to securely connect to external data sources and tools through a standardized interface. Think of it as a plugin system for LLMs. Any MCP-compatible client — Claude Desktop, LM Studio, Cursor, Continue, and others — can connect to the HoxCore server using the same interface.
Starting the Server
The MCP server is started with the hxc mcp subcommand. It communicates over stdio, the transport expected by most MCP-compatible clients. A standalone alias hxc-mcp is also installed and behaves identically.
# Start with the default or configured registry
hxc mcp
# Start with a specific registry path
hxc mcp --registry /path/to/your/registry
# Specify transport explicitly (only stdio is supported currently)
hxc mcp --transport stdio
# Show server capabilities (tools, resources, prompts) and exit without starting
hxc mcp --capabilities
# Start in read-only mode — expose only read tools to the LLM
hxc mcp --read-only
You can also start the server programmatically from Python:
from hxc.mcp.server import create_server
server = create_server(registry_path="/path/to/registry")
server.run_stdio()
Registry discovery
If --registry is not provided, the server resolves the registry path using the same order as the CLI: current directory → parent directories → configured default.
Connecting MCP Clients
Any MCP-compatible client can connect to the HoxCore server using stdio transport. The server implements the 2024-11-05 version of the MCP protocol. Below are configuration examples for common clients.
Claude Desktop
Add HoxCore to your claude_desktop_config.json:
{
"mcpServers": {
"hoxcore": {
"command": "hxc",
"args": ["mcp", "--registry", "/path/to/your/registry"]
}
}
}
Restart Claude Desktop after saving. Claude will then have access to all HoxCore tools, resources, and prompts.
LM Studio
In LM Studio's Developer settings, add a new MCP server entry:
{
"name": "hoxcore",
"command": "hxc",
"args": ["mcp", "--registry", "/path/to/your/registry"],
"transport": "stdio"
}
Cursor
In your project's .cursor/mcp.json (or the global Cursor MCP config), add:
{
"mcpServers": {
"hoxcore": {
"command": "hxc",
"args": ["mcp", "--registry", "/path/to/your/registry"]
}
}
}
Continue (VS Code / JetBrains)
In your ~/.continue/config.json, add HoxCore under mcpServers:
{
"mcpServers": [
{
"name": "hoxcore",
"command": "hxc",
"args": ["mcp", "--registry", "/path/to/your/registry"],
"transport": "stdio"
}
]
}
Example prompts
Once connected, you can ask your LLM assistant things like:
- "List all active projects in my registry."
- "What is the status of project P-001?"
- "Search for entities related to machine learning."
- "Show me all projects due before the end of the month."
- "What are the tags on entity proj_abc123?"
- "Which projects are children of program prog_abc123?"
Available Tools
Tools are callable functions that the LLM can invoke to interact with your registry. HoxCore exposes seven tools: four read-only and three write tools.
| Tool | Type | Description |
|---|---|---|
list_entities |
Read | List entities in the registry with optional filters for type, status, tags, category, and parent. Supports sorting and pagination. |
get_entity |
Read | Retrieve full details of a specific entity by its ID or UID. |
search_entities |
Read | Full-text search across entity titles and descriptions, with optional filters for type, status, tags, and category. |
get_entity_property |
Read | Fetch a specific property from an entity. Supports list indexing and key-based filtering for complex fields like repositories or tools. |
create_entity |
Write | Create a new entity (program, project, mission, or action) in the registry. Returns the new entity's UID and file path. |
edit_entity |
Write | Edit scalar fields and tags on an existing entity. Returns the updated entity. |
delete_entity |
Write | Delete an entity from the registry. Returns a confirmation prompt when force is false (the default); set force: true to confirm. |
Read-only mode
Start the server with hxc mcp --read-only to expose only the four read tools. Write tools (create_entity, edit_entity, delete_entity) are not registered and do not appear in the server's capabilities response. Use this when you want an LLM to observe your registry without being able to modify it.
Read tools
list_entities
{
"entity_type": "project",
"status": "active",
"tags": ["python", "api"],
"sort_by": "title",
"descending": false,
"max_items": 20
}
get_entity
{
"identifier": "P-001"
}
Accepts both human-readable IDs (e.g. P-001) and system UIDs (e.g. proj_abc123def456).
search_entities
{
"query": "machine learning",
"entity_type": "all",
"status": "active"
}
Matches the query string against both title and description fields.
get_entity_property
{
"identifier": "P-001",
"property": "repositories",
"key": "name:github"
}
The key argument filters list properties using key:value syntax. The index argument retrieves a specific item by position. Pass "property": "all" to return the complete entity.
Write tools
Registry mutations
Write tools create, modify, or remove YAML files in your registry. Consider using --read-only mode when you only need the LLM to query the registry.
create_entity
Create a new entity. type and title are required. All other fields are optional; status defaults to active and start_date defaults to today.
{
"type": "project",
"title": "New API Service",
"description": "Internal REST API for the billing system.",
"status": "active",
"id": "P-042",
"category": "software.dev/api",
"tags": ["python", "api"],
"parent": "prog_abc123",
"start_date": "2025-03-01",
"due_date": "2025-12-31"
}
On success, the tool returns the new entity's uid, id, file_path, and the full entity object.
edit_entity
Modify an existing entity. identifier accepts either a UID or a human-readable ID. Scalar fields are updated with set_* arguments. Tags can be incrementally added or removed.
{
"identifier": "P-042",
"set_title": "Billing API Service",
"set_status": "completed",
"add_tags": ["deployed"],
"remove_tags": ["wip"]
}
On success, the tool returns the updated entity, a list of changes, and the file_path.
delete_entity
Delete an entity from the registry. Because deletion is irreversible, a two-step confirmation guard is enforced:
- Call
delete_entitywith"force": false(the default). The tool returns aconfirmation_requiredresponse describing which entity would be deleted — no file is removed. - Call again with
"force": trueto proceed with deletion.
// Step 1 — inspect
{ "identifier": "P-042", "force": false }
// Step 2 — confirm
{ "identifier": "P-042", "force": true }
Prefer archiving over deletion
Deleting an entity removes its UID from the registry, which may break references in other entities. In most cases it is safer to set status to cancelled or completed with edit_entity to preserve history and referential integrity.
Available Resources
Resources are read-only data endpoints accessible via hxc:// URIs. An MCP client can subscribe to these URIs to retrieve structured data from the registry.
| URI | MIME Type | Description |
|---|---|---|
hxc://entity/{identifier} |
application/x-yaml |
A specific entity by ID or UID, returned as YAML. |
hxc://entities/{type} |
application/json |
All entities of a given type (project, mission, etc.), returned as JSON. |
hxc://hierarchy/{identifier} |
application/json |
An entity together with its parent, children, and related entities. |
hxc://registry/stats |
application/json |
Registry-wide statistics: entity counts by type, status, category, and tag frequency. |
hxc://search?q={query} |
application/json |
Search results for a free-text query across all entity titles and descriptions. |
Example — registry stats
{
"total_entities": 39,
"by_type": {
"program": 4,
"project": 23,
"mission": 7,
"action": 5
},
"by_status": {
"active": 22,
"completed": 10,
"on-hold": 4,
"cancelled": 3
},
"tags": {
"python": 9,
"api": 7,
"backend": 6
}
}
Example — entity hierarchy
Reading hxc://hierarchy/P-001 returns an object with three keys: root (the entity itself), children (child entities), and related (non-hierarchical references).
Available Prompts
Prompts are reusable message templates that guide the LLM when working with the registry. They are surfaced via the prompts/list and prompts/get MCP methods.
| Prompt | Description |
|---|---|
get_entity | Retrieve detailed information about a specific entity. |
search_entities | Search for entities using text, type, status, tags, or category filters. |
list_entities | List entities with optional filtering and sorting. |
get_entity_property | Retrieve a specific property value from an entity. |
analyze_registry | Analyze registry structure, relationships, and statistics. |
get_related_entities | Find parent, children, and related entities for a given entity. |
query_by_date | Query entities based on date ranges (start date, due date, completion date). |
Extending the Server
You can register custom tools, resources, and prompts at runtime by creating the server programmatically:
from hxc.mcp.server import create_server
server = create_server(registry_path="/path/to/registry")
# Register a custom tool
def summarize_overdue(registry_path=None, **kwargs):
"""Return all active projects that are past their due date."""
from datetime import date
from hxc.mcp.tools import list_entities_tool
result = list_entities_tool(entity_type="project", status="active", registry_path=registry_path)
today = date.today().isoformat()
overdue = [
e for e in result.get("entities", [])
if e.get("due_date") and str(e["due_date"]) < today
]
return {"overdue": overdue, "count": len(overdue)}
server.register_tool("summarize_overdue", summarize_overdue)
# Register a custom prompt
server.register_prompt({
"name": "weekly_review",
"description": "Generate a weekly status summary across all active projects",
"arguments": [
{"name": "focus_tag", "description": "Optional tag to focus the review on", "required": False}
]
})
server.run_stdio()
Tool function signature
Custom tool functions must accept a registry_path keyword argument. The server injects this automatically when calling any registered tool.
Using YAML as LLM Context
Even without running the MCP server, your HoxCore YAML files are immediately useful as LLM context. Because HoxCore stores everything as human-readable YAML, you can feed entity data directly into any chat interface.
Export a single entity
# Print raw YAML to the terminal, then copy into a chat
hxc show P-001 --raw
# Output as JSON
hxc show P-001 --format json
# Output as YAML (structured, same as --raw but parsed and re-serialised)
hxc show P-001 --format yaml
Collect multiple entities
# List all active projects as JSON and redirect to a file
hxc list project --status active --format json > context.json
# List all entities as YAML
hxc list all --format yaml > registry-snapshot.yml
# Narrow by tag, output JSON
hxc list project --tag ml --format json
Programmatic use
import subprocess, json
result = subprocess.run(
["hxc", "show", "P-001", "--format", "json"],
capture_output=True, text=True
)
project = json.loads(result.stdout)
context = f"""
Project: {project['title']}
Status: {project['status']}
Tags: {', '.join(project.get('tags', []))}
Description:
{project.get('description', '')}
"""
# Pass `context` to your LLM of choice
YAML is naturally LLM-friendly
YAML is structured, concise, and fits well within LLM context windows. A single HoxCore entity file gives an LLM everything it needs to understand a project: purpose, status, relationships, tools, and dates — without any special tooling.
Best Practices
Use UIDs for stable references
When asking an LLM to reference a specific entity across multiple tool calls, prefer UIDs (e.g. proj_abc123def456) over human-readable IDs. UIDs are immutable and will never break if you rename an entity.
Start with list_entities, drill down with get_entity
A natural conversation pattern is to first call list_entities to get an overview, then call get_entity or get_entity_property to retrieve specific details. This keeps token usage efficient.
Write rich descriptions
The search_entities tool searches title and description fields. The more context you include in descriptions when creating entities, the more useful natural-language searches will be.
Keep registries focused
The MCP server exposes your entire registry. Smaller, topic-focused registries produce better LLM interactions than one enormous registry covering unrelated domains. Consider maintaining separate registries for work, research, and personal projects.
Validate before connecting
Run hxc validate before starting the MCP server to ensure all entity files are well-formed. Malformed YAML files are silently skipped by the server, which can cause entities to appear missing.