# AIDA MCP

`aida-mcp` is a Model Context Protocol (MCP) server for AI-assisted software development.
AIDA stands for **AI Developer Assistant**.

It helps your AI client use repository-owned rules and validation workflows, so tool behavior stays aligned with each repository instead of hardcoded client prompts.

## What You Get

- `get_rules`: retrieves task-relevant guidance from repository-owned rules.
- `validate`: runs repository-defined validation workflows (lint, tests, type checks, codegen, and similar tasks).
- GitHub helpers: inspect CI failures and work with PR review comments.

## Requirements

- Python `>=3.12,<3.14`
- An MCP-compatible client (for example Cursor, Claude Code, or JetBrains AI)
- A target repository where you want to use AIDA

## Install from PyPI

Recommended:

```bash
uv tool install aida-mcp
```

Pip fallback:

```bash
pip install aida-mcp
```

Prerelease/dev builds (optional):

```bash
uv tool install --prerelease allow aida-mcp
# or pin an exact dev build:
uv tool install "aida-mcp==0.2.0.dev5"
```

```bash
pip install --pre aida-mcp
```

## Basic Usage

Initialize AIDA files in your repository root:

```bash
aida-mcp init
```

Run the MCP server:

```bash
aida-mcp
```

For supported clients, `aida-mcp init` usually auto-wires project-local MCP config.
In most cases, you only need to reload/restart the client.

## Configure in Your Repository (Full Checklist)

To make AIDA fully operational in a repository, you need both MCP wiring and
repository-owned policy files.

1. Install `aida-mcp` (from PyPI).
2. In your target repository root, run:

```bash
aida-mcp init
```

3. Ensure the repository now contains the `.aida/` configuration files:
   - `.aida/change_domains.yaml`
   - `.aida/validation_policy.yaml`
   - `.aida/validation_registry.yaml`
   - `.aida/rules/` (rule files used by `get_rules`)
   - optional: `.aida/git_policy.yaml` (commit/PR policy)
4. Confirm project-local MCP config files exist:
   - `.cursor/mcp.json` (Cursor)
   - `.mcp.json` (Claude Code)
5. Reload/restart your client so the `aida` MCP tools are discovered.
6. If MCP config files already existed and were not updated, rerun:

```bash
aida-mcp init --force
```

7. If your client does not use project-local MCP config, configure global MCP explicitly:

```bash
aida-mcp install-mcp --global --target <cursor|claude|jetbrains|junie>
```

### What each config area does

- `rules/`: task guidance used by `get_rules`
- `change_domains.yaml`: maps changed files to logical domains
- `validation_policy.yaml`: routes domains/scopes to validation pipelines
- `validation_registry.yaml`: defines executable validation commands
- `git_policy.yaml` (optional): commit/footer and workflow constraints

### Quick verification

After setup:

- run `aida-mcp doctor` in the repository root
- ask your AI client to call `get_rules` for a concrete coding task
- ask it to run `validate` for your current changes

If `doctor` passes and `validate` executes repository-specific commands (not just no-op placeholders), AIDA is configured correctly.

## Documentation and Support

For advanced configuration, workflow details, and contribution guidance, use your
organization's internal AIDA documentation and repository onboarding materials.
