feat: implement AI Workspace context MCP server with read-only access and add related tests

This commit is contained in:
2026-05-20 14:57:54 -06:00
parent 9f8d3b975f
commit d3e909d39e
7 changed files with 595 additions and 5 deletions

View File

@@ -0,0 +1,53 @@
# AIW Context MCP
Read-only local Model Context Protocol server for AI Workspace context.
The server exposes bounded local evidence and canonical Markdown context to MCP clients. It does not capture traffic, send messages, mutate files, or promote memory.
## HTTP transport
The service manager starts the HTTP transport by default:
```bash
python3 scripts/aiw/services.py start aiw-context-mcp --profile fidelity
```
Endpoint:
```text
http://127.0.0.1:8765/mcp
```
Health:
```text
http://127.0.0.1:8765/health
```
## stdio transport
For clients that require stdio, launch:
```bash
python3 scripts/mcp/aiw-context-mcp/server.py --transport stdio
```
## Tools
- `context_profiles`
- `communication_latest`
- `communication_date_context`
- `communication_standup_context`
- `communication_channel_context`
- `communication_thread_context`
- `project_current_context`
- `project_search_memory`
- `photos_latest`
All tools are read-only. Mattermost tools read `ai/inbox/mattermost-mirror/`; photo tools list local Photo Inbox files without embedding image data; project tools read canonical Markdown under `project-knowledge/`.
## Tests
```bash
python3 scripts/mcp/aiw-context-mcp/test_server.py
```