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
feat: add MCP server Docker support and AI agent integration docs
Add Docker integration for the MCP server so it runs alongside FastAPI
and Next.js inside the container on port 8008 (streamable-http transport).
Changes:
- Dockerfile: expose port 8008, launch MCP server in start.sh
- docker-compose.yml: add 8008:8008 port mapping
- api/mcp/server.py: bind to 0.0.0.0 in HTTP mode (configurable via
MCP_HOST/MCP_PORT env vars) for Docker container accessibility
- api/pyproject.toml: add mcp[cli] as Poetry dependency
- api/poetry.lock: regenerated with mcp[cli] and transitive deps
- MCP_SETUP.md: replace "Optional, Future" Docker section with working
setup docs including Claude Code and Claude Desktop config examples
- README.md: add MCP server section with tool descriptions, Docker and
local connection instructions, and port reference table
AI agents (Claude Desktop, Claude Code, Cursor, Windsurf) can now query
wiki documentation via 5 MCP tools: list_projects, get_wiki_overview,
get_wiki_page, search_wiki, and ask_codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docker run -p 8001:8001 -p 3000:3000 -p 8008:8008 \
212
215
-e GOOGLE_API_KEY=your_key \
213
216
-e OPENAI_API_KEY=your_key \
214
217
-v ~/.adalflow:/root/.adalflow \
@@ -221,6 +224,81 @@ Or use Docker Compose:
221
224
docker-compose up
222
225
```
223
226
227
+
### Ports
228
+
229
+
| Port | Service |
230
+
|------|---------|
231
+
| 3000 | Next.js frontend |
232
+
| 8001 | FastAPI backend |
233
+
| 8008 | MCP server (streamable-http) |
234
+
235
+
## MCP Server — AI Agent Integration
236
+
237
+
BetterCodeWiki includes a built-in [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that lets AI coding agents query your wiki documentation in real-time.
238
+
239
+
### What It Does
240
+
241
+
Any MCP-compatible client (Claude Desktop, Claude Code, Cursor, Windsurf) can:
242
+
- Discover which repos have generated wikis
243
+
- Look up architecture overviews and specific wiki pages
244
+
- Search documentation for relevant context
245
+
- Ask questions about a codebase using wiki content
246
+
247
+
### 5 MCP Tools
248
+
249
+
| Tool | Description |
250
+
|------|-------------|
251
+
|`list_projects`| Discover all cached wiki repos |
252
+
|`get_wiki_overview`| Get project architecture in one call |
253
+
|`get_wiki_page`| Fetch a specific page by title (fuzzy match) or ID |
254
+
|`search_wiki`| Full-text search across all wiki pages |
255
+
|`ask_codebase`| Get relevant wiki context for a question |
256
+
257
+
### Connect via Docker (HTTP)
258
+
259
+
When running with Docker, the MCP server is available at `http://localhost:8008/mcp`.
260
+
261
+
**Claude Code:**
262
+
```bash
263
+
claude mcp add bettercodewiki --transport streamable-http http://localhost:8008/mcp
0 commit comments