Skip to main content

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

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 public for the public benchmark set.
  • Run aidocs benchmark . --json --iterations 10 to see benchmark output format.

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/aidocs bootstrap/orchestration entry
  • aidocs_classify_prompt + aidocs_route_prompt — lightweight advisory routing
  • code_investigate — broad “start here” investigation
  • code_find — unified find surface
  • code_trace — unified trace surface
  • code_bundle — unified retrieval/context surface
  • schema_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") and schema_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.md for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aidocs_mcp-1.2.1.tar.gz (146.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aidocs_mcp-1.2.1-py3-none-any.whl (154.2 kB view details)

Uploaded Python 3

File details

Details for the file aidocs_mcp-1.2.1.tar.gz.

File metadata

  • Download URL: aidocs_mcp-1.2.1.tar.gz
  • Upload date:
  • Size: 146.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for aidocs_mcp-1.2.1.tar.gz
Algorithm Hash digest
SHA256 c306b7a69ee63eea942321136a3cf2de529bd696c081bfe044915ff8813aa19d
MD5 8b7bbeda0fff8feeb9fecc9f487c225b
BLAKE2b-256 87f6cd1f3a61502bf16deec26ead5a31aac1776a67014d51051050e02b370622

See more details on using hashes here.

File details

Details for the file aidocs_mcp-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: aidocs_mcp-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 154.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for aidocs_mcp-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eeba55422880940014d07518337394006c146452b16bfcf0048d5243072aa78
MD5 94803a538e2418ca9756ba7ae7502408
BLAKE2b-256 96f8206233e217f967e25d0a13ae2f76a9ed781b6f0a7bfac73bc2a6fb04ce50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page