Skip to content
dtoolkit

MCP Tools

dtoolkit exposes its functionality through the Model Context Protocol (MCP), allowing AI coding agents to interact with memory, project management, and observability services using structured tool calls. Each service runs an MCP server alongside its REST API on the same port.

dbrain is the persistent memory server. Its MCP tools let agents store, search, and manage memories organized as entities and facts with automatic tiering (hot/warm/cold).

Port: 7878 (shared with REST API)

ToolDescriptionParameters
recallSearch memories across all entities. When federation is enabled, results include both local and connected shared brain memories.query (string, required), limit (number), federated (boolean)
rememberSave a single atomic fact about an entity. Creates the entity if it does not exist.entity (string, required), fact (string, required), source (string)
get_entityRetrieve full context for a specific entity, including all associated facts and metadata.name (string, required)
list_entitiesList entities filtered by category or type. Returns name, category, type, and summary for each.category (string), type (string)
create_entityCreate a new entity with metadata. Use remember afterwards to attach facts.name (string, required), category (string, required), type (string, required), summary (string)
bumpTouch a fact to reset its decay timer and keep it in the hot tier.factId (string, required)
logStore conversation messages at natural breakpoints for later review.messages (array, required)
overviewReturn brain statistics: entity count, fact count, tier distribution, connection status.
sharePush a fact to a connected shared brain. Only available when the brain has active connections.factId (string, required)
compactDeduplicate facts and recalculate memory tiers. Admin-only operation.

Facts in dbrain are automatically organized into three tiers based on recency and access frequency:

TierBehavior
HotRecently accessed or bumped. Prioritized in recall results.
WarmAccessed within a moderate window. Included in recall but ranked lower.
ColdStale facts. Still searchable but deprioritized. Candidates for compaction.

Use bump to promote important facts back to hot tier. The compact tool deduplicates redundant facts and recalculates tiers across the entire brain.

When a personal brain is connected to a shared brain (via dbrain connect), the recall tool automatically federates queries across both. Use share to explicitly push a fact from your personal brain to the shared brain.

dwork is the AI-native project manager. Its 21 MCP tools plus 5 graph tools cover project CRUD, task management, documentation, search, and code intelligence.

Port: 7881 (shared with REST API)

ToolDescriptionParameters
create_projectScaffold a new project with directory structure and initial BACKLOG.md.name (string, required), description (string), template (string)
get_projectRetrieve project metadata, task summary, and doc count.projectId (string, required)
list_projectsList all registered projects with status summaries.
update_projectUpdate project metadata (name, description, status).projectId (string, required), name (string), description (string), status (string)

Tasks are stored in each project’s BACKLOG.md file. The SQLite FTS5 index is derived from these Markdown files.

ToolDescriptionParameters
add_taskAdd a new task to a project’s BACKLOG.md.projectId (string, required), title (string, required), description (string), priority (string), status (string)
get_tasksList tasks for a project, optionally filtered by status or priority.projectId (string, required), status (string), priority (string)
update_taskUpdate task fields (title, description, status, priority).projectId (string, required), taskId (string, required), title (string), description (string), status (string), priority (string)
ToolDescriptionParameters
add_docAdd a numbered Markdown document to a project.projectId (string, required), title (string, required), content (string, required)
get_docRetrieve a specific document by ID.projectId (string, required), docId (string, required)
get_docsList all documents for a project.projectId (string, required)
update_docUpdate document title or content.projectId (string, required), docId (string, required), title (string), content (string)
ToolDescriptionParameters
searchFull-text search across all projects, tasks, and docs using FTS5 OR matching.query (string, required), projectId (string)
overviewGlobal statistics: project count, task breakdown by status, recent activity.
syncRe-index Markdown files into SQLite. Run after external edits to BACKLOG.md.projectId (string)
ToolDescriptionParameters
get_roadmapRetrieve the project roadmap derived from task priorities and statuses.projectId (string, required)
what_to_do_nextAI-prioritized suggestion of the next task to work on, based on status, priority, and dependencies.projectId (string)

These tools are powered by @dtoolkit/codegraph-sdk and provide semantic code intelligence over the project’s codebase.

ToolDescriptionParameters
graph_searchSemantic search over code symbols (functions, classes, types) in the project’s knowledge graph.query (string, required), projectId (string), kind (string)
graph_statsStatistics about the code graph: symbol counts by kind, file counts, edge counts.projectId (string, required)
graph_traceTrace the dependency chain of a symbol — what it depends on and what depends on it.projectId (string, required), symbol (string, required), direction (string)
graph_impactAnalyze the impact radius of changing a symbol — all transitive dependents.projectId (string, required), symbol (string, required)
graph_contextRetrieve full context for a symbol: definition, references, documentation, and surrounding code.projectId (string, required), symbol (string, required)

dops provides agent observability. Its MCP tools allow agents and dashboards to log sessions and query usage metrics.

Port: 7883 (shared with REST API)

ToolDescriptionParameters
log_sessionIngest a completed session with token counts, cost, tool usage, and outcome.sessionId (string, required), provider (string, required), tokens (object), cost (number), tools (array), success (boolean), error (string)
get_statsRetrieve aggregated statistics: total sessions, tokens, cost, success rate, by provider and time range.provider (string), from (string), to (string)
get_costsCost breakdown by provider, model, and time period.provider (string), from (string), to (string), groupBy (string)
get_sessionsList recorded sessions with filtering and pagination.provider (string), from (string), to (string), limit (number), offset (number)
healthService health check. Returns status and uptime.

MCP clients discover available tools automatically when connecting to a dtoolkit service. Each service exposes its tool list via the standard MCP tools/list method.

To connect an AI coding agent to dtoolkit services, use dcontext:

terminal
dcontext init
dcontext install

This configures the agent’s native hook system (e.g., Claude Code’s settings.json, Gemini CLI’s settings.json) to connect to running dtoolkit MCP servers.

If you prefer manual configuration, point your MCP client at the service URL:

terminal
# dbrain MCP endpoint
http://localhost:7878/mcp
# dwork MCP endpoint
http://localhost:7881/mcp
# dops MCP endpoint
http://localhost:7883/mcp

All endpoints accept standard MCP JSON-RPC messages over HTTP with SSE streaming for server-initiated messages.

All dtoolkit MCP services share these conventions:

PatternDetail
AuthenticationBearer token via Authorization header. Generate keys with <service> keys create.
TransportMCP over HTTP on the same port as the REST API.
Error formatStandard MCP error responses with code and message fields.
IdempotencyRead operations are safe to retry. Write operations use unique IDs to prevent duplicates.
PermissionsSome tools (e.g., compact) require admin-level API keys.