You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -106,7 +109,42 @@ Or you can use the official Docker image:
106
109
docker pull elementsinteractive/lgtm-ai
107
110
```
108
111
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
110
148
111
149
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.
112
150
@@ -163,6 +201,7 @@ lgtm-ai can enhance code reviews by including context from linked issues or user
163
201
-`--issues-user`: (Optional) Username for the issues platform (required if source is `jira`).
0 commit comments