Skip to content

feat: complete MCP Server integration with security fixes and UI improvements#2

Merged
gamesme merged 4 commits intomainfrom
claude/api-mcp-server-XXS3m
Mar 25, 2026
Merged

feat: complete MCP Server integration with security fixes and UI improvements#2
gamesme merged 4 commits intomainfrom
claude/api-mcp-server-XXS3m

Conversation

@gamesme
Copy link
Owner

@gamesme gamesme commented Mar 25, 2026

No description provided.

claude and others added 4 commits March 24, 2026 14:59
Add settings section in Basic Settings tab to enable, configure, and
control the MCP Server from within ChatLab. Supports HTTP/Stdio transport
mode selection, port configuration, auto-start on app launch, and displays
external tool configuration info for Claude Code/Cursor integration.

https://claude.ai/code/session_01U2bFTH9Gme7yYN8q4gE6YB
__dirname in electron-vite points to out/main/ which caused incorrect
path traversal. app.getAppPath() reliably returns the project root in
dev and the app.asar path in production.

https://claude.ai/code/session_01U2bFTH9Gme7yYN8q4gE6YB
… endpoints

Security:
- Bind HTTP server to 127.0.0.1 only (no external access)
- Add API key authentication for REST API endpoints (Bearer token)
- Add CORS headers for browser clients

New MCP Tools:
- get_session_overview: comprehensive session stats (messages, members, types, top users)
- export_messages: export filtered messages as text/markdown/json
- get_word_frequency: lightweight word frequency analysis (CJK n-gram + whitespace splitting)

MCP Resources:
- chatlab://sessions: browsable session list
- chatlab://sessions/{id}/members: session members
- chatlab://sessions/{id}/schema: database table structure

New REST API Endpoints:
- GET /api/v1/sessions/:id/overview
- GET /api/v1/sessions/:id/export
- GET /api/v1/sessions/:id/word-frequency

Settings UI:
- API Key input field for HTTP mode
- Security warning when running without API key
- REST API URL display when server is running

https://claude.ai/code/session_01U2bFTH9Gme7yYN8q4gE6YB
…ovements

- Packaging: bundle mcp-server via extraResources; fix ms module missing in asar
- Build: add build:mcp, build:mac:zip scripts; fix electron_builder_binaries_mirror
- New tools: get_date_range_messages, get_member_profile, get_interaction_frequency
- New REST endpoints: /messages/range, /members/:id/profile, /interaction-frequency
- Settings UI: enabled toggle starts/stops HTTP server directly (option B)
- Settings UI: remove separate Start/Stop buttons and autoStart section
- Settings UI: show Claude Desktop config snippet with copy button
- Settings UI: auto-start HTTP server when switching transport from stdio→http
- Security: extend API key auth to cover /sse and /messages endpoints (not just /api)
- Security: include Authorization header in Claude Desktop config snippet when key is set
- Fix: message type enum mapping aligned with base.ts (LINK=7, SYSTEM=80, RECALL=81, etc.)
- Fix: getInteractionFrequency uses 5-minute window instead of adjacent row numbers
- Fix: IPC auto-start uses enabled+transport=http instead of enabled+autoStart
- README: add MCP Server section (tools list, HTTP/stdio config) in all 4 languages
- i18n: add stdioAbiWarning explaining Electron ABI incompatibility for stdio mode

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gamesme gamesme merged commit bf484f8 into main Mar 25, 2026
@gamesme gamesme deleted the claude/api-mcp-server-XXS3m branch March 25, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants