Skip to content

Commit 41f51c1

Browse files
authored
Add GitHub Actions workflow for building CodeAlive MCP Docker image and update README with Docker usage instructions (#3)
1 parent fec2316 commit 41f51c1

File tree

2 files changed

+115
-19
lines changed

2 files changed

+115
-19
lines changed

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build CodeAlive MCP Server docker image
2+
3+
on:
4+
push:
5+
6+
env:
7+
DOCKER_REGISTRY: ghcr.io
8+
DOCKER_USERNAME: ${{ github.actor }}
9+
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
10+
IMAGE_NAME: ghcr.io/codealive-ai/codealive-mcp
11+
12+
jobs:
13+
build-mcp-server:
14+
name: MCP Server docker image
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
steps:
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v2
22+
- name: Docker meta
23+
id: meta
24+
uses: docker/metadata-action@v3
25+
with:
26+
images: ${{ env.IMAGE_NAME }}
27+
- name: Login to GitHub Container Registry
28+
uses: docker/login-action@v2
29+
with:
30+
registry: ${{ env.DOCKER_REGISTRY }}
31+
username: ${{ env.DOCKER_USERNAME }}
32+
password: ${{ env.DOCKER_PASSWORD }}
33+
- name: Build and push
34+
uses: docker/build-push-action@v3
35+
with:
36+
push: true
37+
platforms: linux/amd64,linux/arm64
38+
file: ./Dockerfile
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}
41+
cache-from: type=gha
42+
cache-to: type=gha

README.md

Lines changed: 73 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,16 @@ For more details, see [Anthropic’s MCP docs](https://docs.anthropic.com/claude
202202
### Claude Desktop
203203

204204
1. Edit your Claude Desktop configuration file:
205+
205206
* **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
206207
* **Windows:** `%APPDATA%\Claude\claude_desktop_config.json` (usually `C:\Users\YourUsername\AppData\Roaming\Claude\claude_desktop_config.json`)
207208

208209
2. Add the MCP server configuration:
209210

211+
You can configure the CodeAlive MCP server to run either with Python (recommended for local development) or with Docker (for easier setup without a Python environment).
212+
213+
**Option 1: Using Python**
214+
210215
```json
211216
{
212217
"mcpServers": {
@@ -223,6 +228,31 @@ For more details, see [Anthropic’s MCP docs](https://docs.anthropic.com/claude
223228
}
224229
}
225230
```
231+
232+
**Option 2: Using Docker**
233+
234+
```json
235+
{
236+
"mcpServers": {
237+
"codealive": {
238+
"command": "docker",
239+
"args": [
240+
"run",
241+
"--rm",
242+
"-i",
243+
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
244+
"ghcr.io/codealive-ai/codealive-mcp:latest"
245+
]
246+
}
247+
}
248+
}
249+
```
250+
*If the `latest` tag is not available, you can use `ghcr.io/codealive-ai/codealive-mcp:main` instead.*
251+
252+
> **Note:**
253+
> The `-i` flag keeps STDIN open for the MCP protocol.
254+
> The environment variable is set using `-e`, followed by `"CODEALIVE_API_KEY=YOUR_API_KEY_HERE"` as a separate argument.
255+
226256
*(Ensure this merges correctly if the file already has content)*
227257

228258
3. Restart Claude Desktop completely.
@@ -266,28 +296,52 @@ For more details, see [Anthropic’s MCP docs](https://docs.anthropic.com/claude
266296
1. Open Cursor settings (`Cmd+,` or `Ctrl+,`).
267297
2. Navigate to the "MCP" section in the left panel.
268298
3. Click "Add new global MCP server".
269-
4. Enter the following JSON configuration, updating paths and API key:
299+
4. Enter one of the following JSON configurations, updating paths and API key as needed:
270300

271-
```json
272-
{
273-
"mcpServers": {
274-
"codealive": {
275-
"command": "uv",
276-
"args": [
277-
"--directory",
278-
"/path/to/your/codealive-mcp", // Path to the MCP server project root
279-
"run",
280-
"python",
281-
"src/codealive_mcp_server.py",
282-
"--debug" // Optional: Enable debug logging
283-
],
284-
"env": {
285-
"CODEALIVE_API_KEY": "YOUR_API_KEY_HERE"
286-
}
287-
}
301+
**Option 1: Using Python (recommended for local development)**
302+
303+
```json
304+
{
305+
"mcpServers": {
306+
"codealive": {
307+
"command": "/path/to/your/codealive-mcp/.venv/bin/python",
308+
"args": [
309+
"/path/to/your/codealive-mcp/src/codealive_mcp_server.py",
310+
"--debug" // Optional: Enable debug logging
311+
],
312+
"env": {
313+
"CODEALIVE_API_KEY": "YOUR_API_KEY_HERE"
288314
}
289315
}
290-
```
316+
}
317+
}
318+
```
319+
320+
**Option 2: Using Docker (no Python environment required)**
321+
322+
```json
323+
{
324+
"mcpServers": {
325+
"codealive": {
326+
"command": "docker",
327+
"args": [
328+
"run",
329+
"--rm",
330+
"-i",
331+
"-e", "CODEALIVE_API_KEY=YOUR_API_KEY_HERE",
332+
"ghcr.io/codealive-ai/codealive-mcp:latest"
333+
]
334+
}
335+
}
336+
}
337+
```
338+
*If the `latest` tag is not available, use `ghcr.io/codealive-ai/codealive-mcp:main` instead.*
339+
340+
> **Note:**
341+
> The `-i` flag keeps STDIN open for the MCP protocol.
342+
> The environment variable is set using `-e`, followed by `"CODEALIVE_API_KEY=YOUR_API_KEY_HERE"` as a separate argument.
343+
344+
*(Ensure this merges correctly if your file already has content)*
291345

292346
5. Save the configuration.
293347
6. Restart Cursor completely.

0 commit comments

Comments
 (0)