Skip to content

Commit 0a75385

Browse files
authored
chore: bump packages, fix mcp, and make it stable (#203)
1 parent 74cfc28 commit 0a75385

File tree

5 files changed

+1065
-2026
lines changed

5 files changed

+1065
-2026
lines changed

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ lgtm-ai is your AI-powered code review companion. It generates code reviews usin
2323
- [Local Changes](#local-changes)
2424
- [Reviewer Guide](#reviewer-guide)
2525
- [Installation](#installation)
26+
- [Model Context Protocol (MCP)](#model-context-protocol-mcp)
27+
- [Setup](#setup)
28+
- [Usage](#usage)
2629
- [How it works](#how-it-works)
2730
- [Review scores and comment categories](#review-scores-and-comment-categories)
2831
- [Supported Code Repository Services](#supported-code-repository-services)
@@ -106,7 +109,42 @@ Or you can use the official Docker image:
106109
docker pull elementsinteractive/lgtm-ai
107110
```
108111

109-
## How it works
112+
### Model Context Protocol (MCP)
113+
114+
Use lgtm-ai as an MCP server with Claude Desktop, VS Code Copilot, or other MCP-compatible tools.
115+
116+
**Installation:**
117+
118+
```sh
119+
pip install lgtm-ai[mcp]
120+
```
121+
122+
**Setup example for VS Code** (Add to `.vscode/mcp.json`):
123+
124+
```json
125+
{
126+
"servers": {
127+
"lgtm-review": {
128+
"type": "stdio",
129+
"command": ".venv/bin/lgtm-mcp",
130+
"env": {
131+
"LGTM_AI_API_KEY": "${input:LGTM_AI_API_KEY}"
132+
}
133+
}
134+
},
135+
"inputs": [
136+
{
137+
"id": "LGTM_AI_API_KEY",
138+
"type": "promptString",
139+
"description": "Your LGTM AI API key. This will be securely stored and never checked into source control."
140+
}
141+
]
142+
}
143+
```
144+
145+
The `lgtm-review` tool accepts a `repo_path` (required) and optional `compare` branch. Configuration follows the same priority as the CLI: config files in the current directory, then environment variables with the `LGTM_` prefix. See [Configuration](#configuration) for all options.
146+
147+
## How lgtm works
110148

111149
lgtm reads the given pull request and feeds it to several AI agents to generate a code review or a reviewer guide. The philosophy of lgtm is to keep the models out of the picture and totally configurable, so that you can choose which model to use based on pricing, security, data privacy, or whatever is important to you.
112150

@@ -163,6 +201,7 @@ lgtm-ai can enhance code reviews by including context from linked issues or user
163201
- `--issues-user`: (Optional) Username for the issues platform (required if source is `jira`).
164202

165203
**Example:**
204+
166205
```sh
167206
lgtm review \
168207
--issues-url "https://github.com/your-org/your-repo/issues" \

0 commit comments

Comments
 (0)