Skip to content

Commit 6778274

Browse files
committed
docs(example): Add Context7 MCP service to docker-compose
1 parent 46695c3 commit 6778274

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

examples/mcp/docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,29 @@ services:
4343
networks:
4444
- mcp-demo
4545

46+
context7:
47+
image: mekayelanik/context7-mcp:stable
48+
container_name: context7
49+
ports:
50+
- "3002:8010"
51+
environment:
52+
PORT: "8010"
53+
NODE_ENV: production
54+
PROTOCOL: SHTTP
55+
restart: unless-stopped
56+
healthcheck:
57+
test:
58+
- CMD
59+
- sh
60+
- -c
61+
- 'wget --spider -q http://localhost:8010/healthz || exit 1'
62+
interval: 10s
63+
timeout: 5s
64+
retries: 3
65+
start_period: 30s
66+
networks:
67+
- mcp-demo
68+
4669
cli:
4770
profiles:
4871
- cli

examples/mcp/mcp-config.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,19 @@ servers:
99
# Example 1: Manually started server (via docker-compose in this directory)
1010
- name: demo-server
1111
host: mcp-demo-server
12-
ports:
13-
- "3000:8080"
12+
port: 3000
1413
enabled: true
1514
description: "Demo MCP server with example tools"
1615
# run: false (default) - server must be started manually
1716

1817
# Example 2: Context7 - Production documentation search with Streamable HTTP
1918
- name: context7
19+
host: context7
20+
port: 8010
2021
enabled: true
21-
run: true # Auto-start this server when CLI starts
2222
description: "Context7 - Up-to-date code documentation for LLMs"
23-
ports:
24-
- "3002:8010" # Maps host port 3002 to container port 8010
2523
path: /mcp
26-
oci: mekayelanik/context7-mcp:stable
27-
startup_timeout: 90
28-
health_cmd: 'wget --spider -q http://localhost:8010/healthz || exit 1'
29-
env:
30-
PORT: "8010"
31-
NODE_ENV: "production"
32-
PROTOCOL: "SHTTP" # Uses Streamable HTTP (SSE format responses)
24+
# run: false (default) - server must be started via docker-compose
3325
# Context7 provides library documentation search tools:
3426
# - MCP_context7_resolve-library-id: Find library IDs from package names
3527
# - MCP_context7_get-library-docs: Fetch up-to-date docs for any library

0 commit comments

Comments
 (0)