AI Switch MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Switch MCP Server continue the auth feature work"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Switch MCP Server
Open-source MCP server for session continuity across AI coding assistants.
When one assistant runs out of credits, another one can continue with full context from the same persistent session store.
What This Solves
Preserve coding context between Cursor, Claude Code, Claude Desktop, and other MCP clients.
Generate clean handoff markdown + resume prompts.
Keep a timeline of progress, files touched, current step, and next steps.
Store sessions in one shared location so every client sees the same state.
Related MCP server: passoff
Included MCP Tools
continue_task- one-call auto-continue tool for prompts like "continue auth feature".start_session- create a new handoff session.append_progress- append assistant progress to a session.update_session- patch task metadata, notes, status, files, and optional progress.get_session- fetch a session by ID (with optional handoff text).get_latest_session- get most recently updated session for a project.list_sessions- list recent sessions with filters.complete_session- close out a session.generate_handoff- produce portable handoff markdown + resume prompt.delete_session- delete a session (requiresconfirm=true).store_info- show the active session store path.
Storage
By default, sessions are stored in:
~/.aiswitch/sessions.json
You can override this (recommended when sharing across multiple clients/sandboxes):
AISWITCH_STORE_DIRAISWITCH_STORE_FILE
Local Development
npm install
npm run build
npm testRun server over stdio:
node dist/src/index.jsCursor Setup
Use global ~/.cursor/mcp.json or project .cursor/mcp.json:
{
"mcpServers": {
"ai-switch": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/AISwitchMCPServer/dist/src/index.js"],
"env": {
"AISWITCH_STORE_DIR": "/ABSOLUTE/PATH/TO/shared-aiswitch-store"
}
}
}
}After saving, reload Cursor and confirm the server appears in MCP settings.
Claude Code Setup
Recommended (CLI-managed):
claude mcp add --transport stdio --scope user ai-switch -- \
node /ABSOLUTE/PATH/TO/AISwitchMCPServer/dist/src/index.jsWith shared storage path:
claude mcp add --transport stdio --scope user \
--env AISWITCH_STORE_DIR=/ABSOLUTE/PATH/TO/shared-aiswitch-store \
ai-switch -- node /ABSOLUTE/PATH/TO/AISwitchMCPServer/dist/src/index.jsProject-scoped alternative: create .mcp.json in repo root.
{
"mcpServers": {
"ai-switch": {
"type": "stdio",
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/AISwitchMCPServer/dist/src/index.js"],
"env": {
"AISWITCH_STORE_DIR": "/ABSOLUTE/PATH/TO/shared-aiswitch-store"
}
}
}
}Claude Desktop Setup (macOS)
Edit:
~/Library/Application Support/Claude/claude_desktop_config.json
Add:
{
"mcpServers": {
"ai-switch": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/AISwitchMCPServer/dist/src/index.js"],
"env": {
"AISWITCH_STORE_DIR": "/ABSOLUTE/PATH/TO/shared-aiswitch-store"
}
}
}
}Then fully restart Claude Desktop.
Quick Continue (Minimal Prompting)
The server includes continue_task, designed for short prompts like:
"continue the auth feature"
"resume payment webhook work"
How it works:
Tries explicit
session_idif provided.Otherwise matches by
project_path(or current working directory).Otherwise searches by your request text across recent sessions.
Returns:
resume_prompthandoff_markdownquick_continue_instruction
In practice, tell the assistant:
Use ai-switch continue_task for: "continue auth feature", then continue implementation.Recommended Workflow
In current assistant, call
start_sessionat task start.During work, call
append_progressorupdate_session.When switching assistants, call
generate_handoff.Paste
resume_promptinto the next assistant (or callget_latest_sessionthere).Continue updating the same
session_id.
Open Source + GitHub Release
Create a GitHub repository and push this project.
Keep
README.md+LICENSE(MIT) in root.Add CI (optional): run
npm teston PRs.Tag releases (
v1.0.0,v1.1.0, etc.).(Optional) Publish to npm so others can install easily.
Optional npm publish flow
# Update name if needed (must be unique on npm)
npm version patch
npm publish --access publicThen users can run it in MCP configs with:
{
"mcpServers": {
"ai-switch": {
"command": "npx",
"args": ["-y", "ai-switch-mcp-server"]
}
}
}Security Notes
Do not store secrets in session notes.
Keep
AISWITCH_STORE_DIRin a location with proper filesystem permissions.If sharing
.mcp.jsonin a repo, avoid hardcoded secret env vars.
License
MIT
Available Tools
11 toolsappend_progressC
Append a progress update from the active assistant to an existing session.
Inputs: summary (required), assistant (required), session_id (required), next_steps, +3 more.
complete_sessionC
Mark a session completed and optionally append final summary/notes.
Inputs: session_id (required), assistant, final_notes, completion_summary.
continue_taskA
Use this when a user says continue/resume a feature. Auto-selects the best session and returns a ready continuation prompt.
Inputs: session_id, project_path, user_request, target_assistant, +3 more.
delete_sessionA
Delete a saved session by ID. Requires confirm=true to prevent accidental deletion.
Inputs: session_id (required), confirm.
generate_handoffC
Generate a portable markdown handoff and resume prompt from a session.
Inputs: session_id, project_path, target_assistant, include_completed.
get_latest_sessionA
Get the most recently updated session, optionally scoped by project path.
Inputs: project_path, include_handoff, target_assistant, include_completed.
get_sessionA
Fetch one session by ID with optional markdown handoff and resume prompt.
Inputs: session_id (required), include_handoff, target_assistant.
list_sessionsA
List recent sessions with filters for project path and status.
Inputs: limit, status, project_path.
start_sessionB
Create a new cross-assistant coding session for resumable handoff context.
Inputs: task (required), project_path (required), notes, status, +7 more.
store_infoA
Show the active storage file path so different MCP clients share the same history.
Inputs: no named parameters.
update_sessionC
Patch session metadata, task state, notes, status, and optional progress details.
Inputs: session_id (required), task, status, assistant, +9 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools have distinct purposes, but continue_task and generate_handoff both produce handoff/resume prompts, and append_progress overlaps with update_session. However, descriptions clarify the use cases, so ambiguity is minimal.
All tool names follow a consistent verb_noun pattern using snake_case (e.g., start_session, get_latest_session, delete_session). The naming is highly predictable and uniform.
11 tools is well within the ideal 3-15 range. Each tool covers a distinct aspect of session management—create, read, update, delete, resume, and handoff—without unnecessary bloat.
The tool set provides full lifecycle coverage for cross-assistant coding sessions: start, retrieve (single, latest, list), update (append, patch), complete, and delete, along with resume and handoff helpers. No critical ops are missing.
Related MCP Connectors
Capture coding-agent sessions and resume them in any other agent: Claude Code, Codex, Cursor, more.
Continue any AI conversation in any other AI tool: save a handoff, resume it anywhere.
Share context and questions between Claude instances — VS Code, claude.ai web, and mobile.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI coding assistants like Claude Code, Cursor, and Codex to share chat logs, terminal history, and session context with each other. Eliminates the need to re-explain context when switching between different AI coding tools.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables handoff of context between AI coding agents like Claude Code, Cursor, Codex, and Windsurf with built-in provenance tracking.MIT
- AlicenseAqualityDmaintenanceProvides cross-session memory for Claude Code by extracting structured handoffs at session end and retrieving relevant past context at session start.27MIT
- AlicenseNot gradedqualityDmaintenanceTransfers conversation context and git diff snapshots between AI coding IDEs so a new AI can immediately understand ongoing work.MIT