Portable AI coding-agent toolkit — MCP server with indexed code retrieval, session management, and persistent memory
Project description
AIDOCS MCP
v1.2.0 — Optional MCP runtime layer for AIDOCS Core.
core/ remains the canonical Markdown-first system.
mcp/ adds runtime enforcement, indexing, and retrieval over that file-backed system.
Principles
- Files remain the only source of truth.
- MCP never stores a second canonical memory.
- MCP reads, validates, and writes the existing AIDOCS files.
- MCP is optional; the Markdown system must still work without it.
- Indexes are project-wide; sessions guide retrieval and ranking, not index scope.
- SQLite indexes are derived only — rebuildable from files at any time.
Install
cd mcp
pip install -e . # standard install
pip install -e ".[dev]" # with pytest
pip install -e ".[ast]" # with tree-sitter for JS/TS AST parsing
Architecture
mcp/
server/aidocs_mcp/ # 21 Python service modules
mcp_server.py # FastMCP tool registration (88 tools)
service_hub.py # Composition root
runtime_service.py # High-level orchestration
session_store.py # Session CRUD + lifecycle
memory_store.py # Memory read/write/capture
index_store.py # Memory/session SQLite index
code_index_store.py # Code symbol/dependency index
schema_index_store.py # Schema entity/field index
policy_service.py # Preflight + routing policy
managed_mode_service.py # Project managed-mode state
workflow_action_service.py # Workflow rule compilation
legacy_migration_service.py # NOW.md/plans migration
updater_service.py # Cross-platform script bridge
frontend_ast.py # JS/TS tree-sitter AST parsing
...
pyproject.toml # Python package config
README.md # This file
HOST_INTEGRATION.md # Host integration contract
Runtime Model
- Canonical files:
core/templates + project-local/.MEMORY/** - MCP server: optional execution layer over those files
- Local index: SQLite, derived only, rebuildable
- Code retrieval: symbol outlines, dependency edges, context bundles
- Built-in language indexing now comes from shipped TOML descriptor files under
mcp/server/aidocs_mcp/index_languages/, and project-localindex_languages/*.tomlfiles can extend or override that built-in descriptor set.
Release Status
- Current release:
1.2.0
OpenCode Caveats
- OpenCode can now mirror multilingual
action_tokens, but that classification is still advisory. - Claude currently uses runtime classification directly; OpenCode still relies on plugin-side context shaping plus command rewriting.
- The installer creates
action_tokens/opencode/links or fallback copies so OpenCode-visible language packs are accessible to users.
Benchmarking
- Run
aidocs benchmark . --json --iterations 10 --scenario-set publicfor the public benchmark set. - Run
aidocs benchmark . --json --iterations 10to see benchmark output format.
Extensible Indexing
- Built-in language descriptors live in
mcp/server/aidocs_mcp/index_languages/. - Project-local descriptor files can be added in
index_languages/*.toml. - See
mcp/INDEX_LANGUAGE_DESCRIPTORS.mdfor the TOML schema, semantic keys, outline families, and validation model. - Inspect descriptor state with:
aidocs descriptorsaidocs descriptors --validateaidocs descriptors --match <path>
Index Snapshots
- Local copied test snapshots can be inspected with:
aidocs snapshotsaidocs snapshots --json
Tool Model
The MCP server exposes 88 tools, but agents should not start by memorizing all 88.
Start Here
Use these as the default entry points:
aidocs_orchestrate—/aidocsbootstrap/orchestration entryaidocs_classify_prompt+aidocs_route_prompt— lightweight advisory routingcode_investigate— broad “start here” investigationcode_find— unified find surfacecode_trace— unified trace surfacecode_bundle— unified retrieval/context surfaceschema_query— unified schema surface
Core Runtime Surfaces
These make up the main operational AIDOCS runtime:
- managed mode:
aidocs_mode_get,aidocs_mode_set,aidocs_mode_clear - session lifecycle:
session_start,session_list,session_select,session_read,session_create,session_update - task lifecycle:
task_begin,task_update,task_complete - memory:
memory_read,memory_capture,memory_search - project operations:
project_init,project_bootstrap_or_resume,project_sync_indexes,project_status
Advanced / Specialist Surfaces
These remain useful when the host or agent already knows what it needs:
- code specialists such as
code_get_outline,code_get_symbol_snippet,code_search,code_get_dependencies - precision helpers such as
code_get_method_signature,code_get_method_signatures,code_get_constructor_params,code_get_enum_values,code_get_service_api - lighter schema helpers such as
schema_query(mode="properties")andschema_query(mode="batch_entity") - git analysis tools such as
git_fork_status,git_merge_plan,git_conflict_analysis,git_upstream_changes - action-surface and execution-evidence tools for operator-level debugging and runtime analysis
- capability inspection tools for understanding the indexed MCP surface
- procedure and procedure-link tools as advanced/optional structure derived from workflow definitions, not required for normal AIDOCS use
Important Guidance
- Prefer unified entry points over old granular search habits.
- Prefer advisory runtime routing over raw keyword guessing.
- Treat many specialist tools as advanced surfaces, not the default starting point.
- Treat procedures as optional structure for workflow/execution analysis, not as a prerequisite for runtime value.
- For deep test or validation work, use test-inclusive indexing only when intentionally needed, then prefer the precision chain over guessing: service API -> method signatures -> constructor params -> enum values -> entity properties.
- Use
mcp/HOST_INTEGRATION.mdfor the host behavior contract instead of inferring it from the raw tool list.
Run (after installing dependencies)
cd mcp
pip install -e .
aidocs --version
aidocs benchmark . --json --iterations 10
aidocs-mcp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aidocs_mcp-1.3.0.tar.gz.
File metadata
- Download URL: aidocs_mcp-1.3.0.tar.gz
- Upload date:
- Size: 179.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eef93e32c2ed0f3f136256cd45dc51a0de78abed63714243216f2dd14b2629d
|
|
| MD5 |
183f0d0525a0a3b1344bc7c6b042b64c
|
|
| BLAKE2b-256 |
8aab010e7bd95ed32eb75de6e49edf8a34919169e4c8797cd64f43d3accf1b1e
|
File details
Details for the file aidocs_mcp-1.3.0-py3-none-any.whl.
File metadata
- Download URL: aidocs_mcp-1.3.0-py3-none-any.whl
- Upload date:
- Size: 190.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e2ad33963c186fe1f8bc35c866639419c23eeca4ef28e47b19f5bced9a82873
|
|
| MD5 |
cdb7e5c594c5ec4c2f933f9a927e2141
|
|
| BLAKE2b-256 |
ed6bb606f35a1b563e8fbe8f55124f3e525a74e9e6dbaca756b63a837ae7b8ea
|