feat: MCP server — let AI agents control Jean via tools#111
Draft
yigitkonur wants to merge 1 commit intocoollabsio:mainfrom
Draft
feat: MCP server — let AI agents control Jean via tools#111yigitkonur wants to merge 1 commit intocoollabsio:mainfrom
yigitkonur wants to merge 1 commit intocoollabsio:mainfrom
Conversation
Adds a Model Context Protocol (MCP) server that exposes Jean's
capabilities as tools for AI agents. This lets any MCP-compatible
client (Claude Desktop, Cursor, other AI tools) control Jean
programmatically — send chat messages, manage sessions, load contexts,
and track task progress.
Also includes comprehensive API documentation covering Jean's HTTP
and WebSocket interfaces.
MCP Server (jean-mcp-server/):
Tools:
- jean_send_chat Send a message to a session (with streaming progress)
- jean_get_sessions List sessions for a worktree
- jean_create_session Create a new session in a worktree
- jean_get_chat_history Retrieve chat history for a session
- jean_list_projects List all projects and worktrees
- jean_get_project_details Get details for a specific project
- jean_list_contexts List saved context files
- jean_list_skills List available Claude skills
- jean_server_status Check Jean server health
Resources (jean:// URI scheme):
- jean://projects All projects
- jean://sessions All sessions across worktrees
- jean://saved-contexts Saved context index
- jean://skills/claude Available skills
- jean://project/{id} Individual project details
Transport:
- Connects to Jean's local HTTP/WebSocket server
- Bearer token auth with configurable port
- Real-time event streaming via WebSocket
- Chat task tracker with progress notifications
Task tracking:
- JeanChatTaskTracker listens to WebSocket events during chat
- Maps streaming events to MCP task progress notifications
- Handles completion, errors, and cancellation
API Documentation (jean-api-docs/):
11 documents covering:
- HTTP API surface and authentication
- WebSocket RPC protocol and event streams
- Full command catalog with request/response schemas
- Skills (documented and undocumented)
- Native vs web client feature coverage
- MCP server integration playbook
- Reverse engineering notes and architecture audit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
An MCP (Model Context Protocol) server that lets AI agents interact with Jean programmatically. Any MCP-compatible client — Claude Desktop, Cursor, other coding assistants — can use Jean's capabilities as tools: send chat messages, manage sessions, browse projects, load contexts.
Think of it as giving your AI assistant a remote control for Jean.
Why this matters
Right now, if you want an AI agent to work with Jean, it has to go through the UI. This is limiting for workflows like:
The MCP server bridges this gap by exposing Jean's full command set as structured tools with proper schemas, input validation, and streaming progress.
Tools available
jean_send_chatjean_get_sessionsjean_create_sessionjean_get_chat_historyjean_list_projectsjean_get_project_detailsjean_list_contextsjean_list_skillsjean_server_statusResources (jean:// URIs)
MCP resources let clients read Jean data as structured documents:
jean://projects— all projectsjean://sessions— all sessions across all worktreesjean://saved-contexts— saved context file indexjean://skills/claude— available skill definitionsjean://project/{id}— individual project detailsHow it works
jean-mcp-servervia stdiosend_chat_message,get_sessions, etc.)JeanChatTaskTrackerlistens to WebSocket events and maps them to MCP progress notifications, so the client sees streaming chunks in real-timeChat task tracking
The
JeanChatTaskTrackeris the interesting part. When you calljean_send_chat:chat:chunk→ progress notification,chat:done→ completion,chat:error→ errorAPI Documentation
Also includes 11 documentation files (
jean-api-docs/) covering:These docs are useful for anyone building on Jean's API, not just MCP.
Setup
Files
jean-mcp-server/— 17 source files (server, tools, transport, resources, task tracker)jean-api-docs/— 11 documentation filesmcp_servers.json— default MCP server configpackage.json— addedmcp:jean:dev/build/startscriptsTest plan
cd jean-mcp-server && npm install && npm run buildcompilesjean_server_statusreturns healthy connectionjean_list_projectsreturns project listjean_send_chatstreams progress and completes