AIDA MCP server - Developer actions (lint, test, typecheck) for monorepos
Project description
AIDA MCP
aida-mcp is the MCP server and CLI package for AIDA.
It gives AI assistants a repository-owned workflow layer for guidance retrieval, validation, and Git/GitHub operations.
Use this package when you want assistant behavior controlled by versioned repository policy instead of large client-specific prompts.
Why This Package Exists
Most coding assistants are good at generating text and code, but weak at staying inside repository-specific workflow constraints.
aida-mcp closes that gap by moving the control plane into repository-owned files under .aida/ and exposing the right operations through MCP and CLI.
That means teams can:
- keep rules, validation routing, and Git policy in version control
- share the same behavior across Cursor, Claude Code, OpenAI Codex, JetBrains AI Chat, and Junie — adding another MCP-compatible client is straightforward because AIDA builds on the open MCP standard
- evolve onboarding and workflow behavior without rewriting client prompts
- give less technical contributors safer defaults for validation, commits, PRs, and review follow-up
What You Get
get_rules: hybrid retrieval over embedded and repository-owned rules, with compact responses, provenance, and session-aware delta modevalidate_command: MCP planner for repository-defined validation routing across lint, format, types, tests, codegen, and other project-specific checksaida-mcp validate: CLI executor for the planned validation commands with streamed outputcommit_command: executes a policy-compliantgit commitserver-side and returns structured results (sha, subject, files changed)pr_command: executes a policy-compliantgh pr createserver-side and returns structured results (PR URL, number)github_comments: lists, replies to, and resolves GitHub PR review threads- CLI commands for bootstrap, migration, health checks, policy checks, template previews, alias installation, and policy-aware commits
- unified rule-selection controls for embedded and repo-owned rules, including shared defaults plus per-user local overrides
Design Principles
- Client-agnostic: package the workflow logic once and reuse it across MCP-capable assistants
- Repository-owned policy: keep operational behavior in
.aida/instead of hiding it in client prompts - Extensible by default: add new validation domains, pipelines, commands, and rules without forking the package
- Workflow-oriented: support more than coding, including onboarding, validation, commit/PR policy, review response, and CI triage
Requirements
- Python
>=3.12,<3.15 - An MCP-compatible client
- A repository where you want to enable AIDA
Install from PyPI
Recommended:
uv tool install aida-mcp
Pip fallback:
pip install aida-mcp
Prerelease/dev builds:
uv tool install --prerelease allow aida-mcp
pip install --pre aida-mcp
Quick Start
From the repository you want to onboard:
aida-mcp init
Then reload your MCP client and let it discover the aida server and tools.
To run the server manually:
aida-mcp
In most environments the client launches it for you, so manual startup is mainly for troubleshooting.
Experimental HTTP mode is also available:
aida-mcp serve-http --path /mcp
This is an opt-in alternative to stdio for local testing. Stdio remains the default and recommended setup.
Onboarding Flow
The practical onboarding path is:
- Install
aida-mcp. - Run
aida-mcp initin the target repository root. - Reload the client so MCP tools are discovered.
- Ask the assistant to call
get_rulesfor a concrete task. - Ask it to call
validate_command(...)for your current changes, then run the returnedaida-mcp validate ...command. - Refine repository-owned rules and validation wiring under
.aida/as needed.
For repositories that already contain assistant-specific rules, bootstrap files, or older AIDA material:
aida-mcp migrateis the onboarding normalization/upgrade path: it backs up old client/bootstrap files, updates repo config versions, reconciles missing/default config keys, and rewrites current stubsaida-mcp doctoris the onboarding health check and also works as a standalone repository audit before, during, or after onboardingaida-mcp doctor --auto-fixapplies only safe semantic config fixes where supported, then re-runs the audit
Current AIDA config files are versioned. That gives you an upgrade path where doctor and migrate can distinguish outdated config from missing config instead of treating every repo the same.
If onboarding is still incomplete after deterministic setup, get_rules returns an onboarding_incomplete response for normal tasks.
In that case, ask the assistant to call get_rules again with an onboarding-focused query such as finalize onboarding after aida-mcp migrate.
What init Writes
aida-mcp init bootstraps both repository policy files and client bootstrap files.
Repository-owned AIDA config:
.aida/change_domains.yaml.aida/validation_policy.yaml.aida/validation_registry.yaml.aida/rules_selection.yaml.aida/.gitignorecontainingrules_selection.local.yaml.aida/rules/- optional:
.aida/git_policy.yaml - optional:
.aida/templates/commit-message.txt,.aida/templates/pr-title.txt,.aida/templates/pr-body.md
Minimal assistant bootstrap files:
.cursor/rules/aida.mdc.claude/CLAUDE.mdAGENTS.md.aiassistant/rules/aida.md.junie/guidelines.md
These bootstrap files stay intentionally small. Detailed task guidance should come from get_rules, not from copying large static instructions into every client file.
MCP Client Setup
init writes repository-local MCP config for clients that support it and merges with existing config where possible.
Project-local targets:
- Cursor:
.cursor/mcp.json - Claude Code:
.mcp.json - OpenAI Codex:
.codex/config.toml
By default, these repository-local configs are root-agnostic and rely on native MCP roots from the client.
That lets one installed AIDA server entry work across multiple repositories without pinning
AIDA_WORKSPACE_ROOT in the generated config.
You can also install or refresh MCP wiring explicitly:
aida-mcp install-mcp --target cursor
aida-mcp install-mcp --target claude
aida-mcp install-mcp --target codex
Experimental HTTP wiring can be written explicitly with:
aida-mcp init --http
aida-mcp install-mcp --target codex --http
This writes URL-based MCP config instead of stdio command entries. It is intentionally experimental.
The generated HTTP config uses http://localhost:9910/mcp by default. If you need a different port,
pass --http-port, for example aida-mcp init --http --http-port 9911 or
aida-mcp install-mcp --target codex --http --http-port 9911. The generated HTTP config does not inject
AIDA_WORKSPACE_ROOT; workspace selection is expected to come from native MCP roots.
Recommended conventions:
- Use
9910as the shared default for normal repository usage. - If you are actively developing
packages/aida-mcpand also using HTTP MCP in other repositories at the same time, use a dedicated override such as9911in this repository so AIDA changes do not disrupt the default server used elsewhere. - Example for AIDA contributors:
aida-mcp init --http --http-port 9911
aida-mcp install-mcp --target codex --http --http-port 9911
aida-mcp serve-http --port 9911
Some clients currently require global MCP config:
aida-mcp install-mcp --global --target jetbrains
aida-mcp install-mcp --global --target junie
Current global locations:
- JetBrains AI Chat:
~/.ai/mcp/mcp.json - Junie:
~/.junie/mcp/mcp.json
If you need to pin AIDA to one repository, use --workspace-root or set AIDA_WORKSPACE_ROOT
manually. That override is optional and mainly useful for single-repo or non-standard client setups.
Rule Retrieval Model
get_rules is the central mechanism for dynamic guidance.
How it works:
- repository rules live in
.aida/rules/** - embedded defaults and profiles come from the package
- selection is controlled by
.aida/rules_selection.yaml - optional per-user opt-out lives in
.aida/rules_selection.local.yaml - assistants should call
get_rulesat task start and when task scope changes significantly - commit/push-only flows should use
commit_command/pr_commandinstead of refreshingget_rules
Important behavior:
session_idis required and enables delta mode across the same chat- normal responses are optimized for use, returning
contextplus concisereporting - partially onboarded repositories block normal retrieval and return
onboarding_incomplete warmup_embeddingsexists only for one-time model download/index warmup when requested
Default rule-selection semantics:
- embedded rules:
core/**enabled by default - repository rules:
.aida/rules/**enabled by default (repo: all)
That default keeps local rule authoring intuitive while still making embedded overlays opt-in.
Validation Model
Validation is split into an MCP planner and a CLI executor.
Repository-owned config still controls the routing:
.aida/change_domains.yamlmaps changed files to domains and roots.aida/validation_policy.yamlmaps domains to pipelines.aida/validation_registry.yamldefines commands and processors
Common MCP planning calls:
validate_command(scope="pre_commit")
validate_command(scope="pre_push")
validate_command(scope="pre_commit", focus_paths=["path/to/component"])
Typical CLI execution:
aida-mcp validate --scope pre_commit
aida-mcp validate --scope pre_push --upstream-ref origin/main
aida-mcp validate --scope pre_commit --focus-path path/to/component
Useful characteristics:
- scope is high-level; routing details stay repo-owned
focus_pathsnarrows validation to specific paths/componentsexplain=Trueincludes routing details in the planner responsepre_commitcan includecommit_guidancethat points assistants tocommit_commandpre_pushcan include commit-policy checks for the branch range being validated
The package does not hardcode project-specific validation logic. Instead, repositories own the external commands and decide whether those commands run in check mode, autofix mode, or a fix-then-validate flow.
Policy-Aware Git and PR Workflows
aida-mcp now covers more of the delivery workflow than validation alone.
Commit flow:
- CLI:
aida-mcp commit - MCP:
commit_command - shared source of truth:
.aida/git_policy.yamlplus optional commit templates
Important behavior:
- pre-commit validation runs before the commit
- when validation modifies files, the commit flow continues with automatic staging of current changes
- the commit is executed server-side following repository footer and template policy
- the MCP tool returns structured results so assistants never need to run
git committhemselves
Useful CLI commands:
aida-mcp commit --type feat --title "add policy-aware release workflow" --risk low
aida-mcp check-commit-policy --from-ref origin/main --to-ref HEAD
aida-mcp preview-commit-template --title "example" --type docs --risk low
PR flow:
- MCP:
pr_command - CLI:
aida-mcp preview-pr-template,aida-mcp check-pr-policy - shared source of truth:
.aida/git_policy.yamland.aida/templates/
The MCP tool executes gh pr create server-side and returns the PR URL and number, so assistants never need to construct or run the command themselves.
GitHub Workflow Tools
The package also exposes GitHub-focused MCP helpers:
github_commentsfor listing review threads, replying in-thread, and resolving discussions
CI triage is handled through gh CLI workflow guidance returned by get_rules.
Typical Assistant Workflow
- Run
aida-mcp initonce in the repository. - Ask the assistant to call
get_rulesfor the concrete task. - Implement the change.
- Ask the assistant to call
validate_command(...)and run the returnedaida-mcp validate ...command. - Use
commit_commandoraida-mcp commitfor the final commit. - Use
pr_command,github_comments, andghCLI CI triage during PR preparation and review follow-up.
CLI Surface
Main lifecycle commands:
aida-mcp initaida-mcp update-rulesaida-mcp migrateaida-mcp doctoraida-mcp install-mcpaida-mcp serve-httpaida-mcp validateaida-mcp validate-python
Git/policy commands:
aida-mcp commitaida-mcp check-commit-policyaida-mcp check-pr-policyaida-mcp preview-commit-templateaida-mcp preview-pr-template
Convenience commands:
aida-mcp alias statusaida-mcp alias installaida-mcp alias uninstall
Configure in Your Repository
To make AIDA fully operational in a repository:
- Install
aida-mcp. - Run
aida-mcp init. - Review
.aida/rules/**and.aida/*.yaml. - Reload your client.
- Verify with:
aida-mcp doctor- an assistant call to
get_rules - an assistant call to
validate_command
If doctor passes and validate_command resolves repository-specific commands, onboarding is in good shape.
Minimal Repository Wiring Sketch
init gives you a starting point, but the core ownership model is:
# .aida/change_domains.yaml
domains:
- id: python_service
match_globs:
- "services/*/**/*.py"
- "services/*/pyproject.toml"
root_depth: 2
# .aida/validation_policy.yaml
validation_policy:
routes:
- domain: python_service
pipeline: python-default
pipelines:
python-default:
steps:
- command_id: python.validate.engine
processor_id: external_json
# .aida/validation_registry.yaml
registry:
commands:
python.validate.engine:
argv:
- "bash"
- "{workspace_root}/scripts/validate_python.sh"
- "--project-path"
- "{workspace_root}/{root}"
cwd: "{workspace_root}"
timeout_sec: 3600
processors: {}
That is the main contract: the package owns orchestration and repositories own policy plus executable validation commands.
Source Repository Docs
If you are working from the source repository, additional long-form docs live in:
CONTRIBUTING.mddocs/validation-tools.mddocs/external-validation-interface.md../../docs/aida/configuring-a-repository.md../../docs/aida/cli-usage.md
Roadmap: Adaptive Quality Loops
Auto-tuning for rule behavior is partially available and expected to expand. The target model is eval-driven improvement of retrieval and routing quality while preserving repository-owned controls.
Planned direction includes:
- evaluating assistant outcomes against explicit quality signals
- feeding observability and trace data into tuning workflows
- supporting optional telemetry backends such as Langfuse
The package is meant to keep those feedback loops repository-visible and reviewable rather than hidden inside the client.
Opt-Out
To opt out for a specific client:
- disable or remove that client’s AIDA MCP wiring
- remove the corresponding bootstrap instruction file for that client scope
That disables AIDA cleanly while leaving normal repository CI and rulesets untouched.
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 aida_mcp-0.4.1.dev4.tar.gz.
File metadata
- Download URL: aida_mcp-0.4.1.dev4.tar.gz
- Upload date:
- Size: 142.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
636b3fbf0a4e65938b54207f8d2732312116f87463ee5237dea3718caeb14512
|
|
| MD5 |
581742abad47cd51f13f1f9cc861dbab
|
|
| BLAKE2b-256 |
f9301034e4cdc3dd037f2d454baa1e57acf420c0fb8ce4abdb3cadb1755c2484
|
Provenance
The following attestation bundles were made for aida_mcp-0.4.1.dev4.tar.gz:
Publisher:
python-dev-release.yaml on gooddata/gdc-aida
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aida_mcp-0.4.1.dev4.tar.gz -
Subject digest:
636b3fbf0a4e65938b54207f8d2732312116f87463ee5237dea3718caeb14512 - Sigstore transparency entry: 1096287569
- Sigstore integration time:
-
Permalink:
gooddata/gdc-aida@170821729190256dc8f5b0f0f36a97d87febd5ca -
Branch / Tag:
refs/tags/v0.4.1.dev4 - Owner: https://github.com/gooddata
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-dev-release.yaml@170821729190256dc8f5b0f0f36a97d87febd5ca -
Trigger Event:
push
-
Statement type:
File details
Details for the file aida_mcp-0.4.1.dev4-py3-none-any.whl.
File metadata
- Download URL: aida_mcp-0.4.1.dev4-py3-none-any.whl
- Upload date:
- Size: 212.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac8619f22e9331fac81615cfc603a15f24132c73f3fd07eb8a7239f0698d765c
|
|
| MD5 |
29affad6db304636402ec229b7171228
|
|
| BLAKE2b-256 |
e2092ab48a703a0b22ee68781fd64ec2a64402822fb1838b00c35057f184da6f
|
Provenance
The following attestation bundles were made for aida_mcp-0.4.1.dev4-py3-none-any.whl:
Publisher:
python-dev-release.yaml on gooddata/gdc-aida
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aida_mcp-0.4.1.dev4-py3-none-any.whl -
Subject digest:
ac8619f22e9331fac81615cfc603a15f24132c73f3fd07eb8a7239f0698d765c - Sigstore transparency entry: 1096287572
- Sigstore integration time:
-
Permalink:
gooddata/gdc-aida@170821729190256dc8f5b0f0f36a97d87febd5ca -
Branch / Tag:
refs/tags/v0.4.1.dev4 - Owner: https://github.com/gooddata
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-dev-release.yaml@170821729190256dc8f5b0f0f36a97d87febd5ca -
Trigger Event:
push
-
Statement type: