Skip to content

Commit 7ac6183

Browse files
committed
feat(mcp): add optional read-only MCP server for deterministic baseline-aware agent workflows
1 parent b5059ab commit 7ac6183

21 files changed

Lines changed: 3439 additions & 18 deletions

AGENTS.md

Lines changed: 31 additions & 9 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [2.0.0b3]
4+
5+
### MCP
6+
7+
- Add optional `codeclone[mcp]` extra and `codeclone-mcp` launcher.
8+
- Add a deterministic, read-only MCP server over the canonical pipeline and report contracts.
9+
- Expose MCP tools/resources for repository analysis, run summaries, report sections, findings, hotlists, and gate previews.
10+
311
## [2.0.0b2]
412

513
### Dependencies

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Live sample report:
3434
score
3535
- **Baseline governance** — known debt stays accepted; CI blocks only new clones and metric regressions
3636
- **Reports** — interactive HTML, deterministic JSON/TXT plus Markdown and SARIF projections from one canonical report
37+
- **MCP server** — optional read-only MCP surface for AI agents, IDEs, and MCP-capable clients
3738
- **CI-first** — deterministic output, stable ordering, exit code contract, pre-commit support
3839
- **Fast*** — incremental caching, parallel processing, warm-run optimization, and reproducible benchmark coverage
3940

@@ -59,6 +60,34 @@ uvx codeclone@latest .
5960

6061
</details>
6162

63+
## MCP Server
64+
65+
Install MCP support only when you need the agent interface:
66+
67+
```bash
68+
pip install "codeclone[mcp]"
69+
```
70+
71+
Then run the optional MCP launcher:
72+
73+
```bash
74+
codeclone-mcp --transport stdio
75+
# or
76+
codeclone-mcp --transport streamable-http --port 8000
77+
```
78+
79+
For local command-based clients, prefer `stdio`. Use `streamable-http` only
80+
when the client expects a remote MCP endpoint.
81+
82+
CodeClone MCP is read-only and baseline-aware. It exposes deterministic tools
83+
for analysis, summaries, findings, hotspots, report sections, and gate previews
84+
without mutating source files or baselines.
85+
86+
Docs:
87+
[MCP interface contract](https://orenlab.github.io/codeclone/book/20-mcp-interface/)
88+
·
89+
[MCP usage guide](https://orenlab.github.io/codeclone/mcp/)
90+
6291
## CI Integration
6392

6493
```bash
@@ -197,7 +226,7 @@ Dynamic/runtime false positives are resolved via explicit inline suppressions, n
197226
{
198227
"report_schema_version": "2.1",
199228
"meta": {
200-
"codeclone_version": "2.0.0b2",
229+
"codeclone_version": "2.0.0b3",
201230
"project_name": "...",
202231
"scan_root": ".",
203232
"report_mode": "full",

0 commit comments

Comments
 (0)