AI Switch MCP Server
Enables session continuity across AI coding assistants by preserving context and generating handoff markdown, allowing seamless switching between tools like Cursor, Claude Code, and Claude Desktop.
README
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.
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 test
Run server over stdio:
node dist/src/index.js
Cursor 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.js
With 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.js
Project-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 public
Then 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。