Skip to main content

Switch IDEs without losing your AI conversation context. An MCP server that bridges conversations across coding assistants.

Project description

swAItch

Switch IDEs without losing your AI conversation context.

PyPI version Python License: MIT MCP

An MCP server that bridges AI conversations across coding assistants.
Stop losing context. Start where you left off — in any IDE.

Install · Quick Start · Tools · Docs · Contributing


Why swAItch?

You're deep in a conversation with your AI assistant in Cursor. You've discussed architecture, iterated on a plan, debugged a tricky issue. Now you want to switch to another IDE — but all that context is gone.

swAItch makes IDE conversations portable. It's an MCP server that reads your conversation history from any supported IDE and exposes it as tools that any MCP-compatible client can call.

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Cursor    │     │  VS Code    │     │  Windsurf   │
│  (source)   │     │  (source)   │     │  (source)   │
└──────┬──────┘     └──────┬──────┘     └──────┬──────┘
       │                   │                   │
       └───────────┬───────┘───────────────────┘
                   │
           ┌───────▼────────┐
           │    swAItch     │
           │   MCP Server   │
           │                │
           │  ┌───────────┐ │
           │  │  Parsers  │ │  ← Extensible parser registry
           │  │  Registry │ │
           │  └───────────┘ │
           │  ┌───────────┐ │
           │  │   File    │ │  ← Live updates via filesystem watching
           │  │  Watcher  │ │
           │  └───────────┘ │
           └───────┬────────┘
                   │
       ┌───────────┼───────────┐
       ▼           ▼           ▼
  list_sources  list_convs  get_conv
  (MCP tools exposed to any client)

Highlights

  • MCP-native — built with FastMCP v3, works with any MCP client (Cursor, Claude Desktop, etc.)
  • Extensible — plugin-style parser system. Add new IDEs by implementing one class.
  • Live updates — file system watcher detects new conversations in real-time.
  • Zero config — auto-detects installed IDEs and their conversation data.
  • One commandpip install swaitch && swaitch and you're running.
  • SOLID architecture — clean abstractions, dependency inversion, single-responsibility modules.

Supported IDEs

IDE Status Storage Format
Cursor Supported SQLite (state.vscdb)
VS Code Copilot Roadmap JSON (chatSessions/)
Windsurf Roadmap Protobuf (.pb)
Codex Roadmap Pending

Want to add support for your IDE? See Contributing — just implement BaseParser!

Install

pip

pip install swaitch

uv (recommended)

uv pip install swaitch

From source (development)

git clone https://github.com/yourusername/swaitch.git
cd swaitch
uv pip install -e ".[dev]"

Quick Start

1. Run the server

# stdio mode (default — for MCP clients)
swaitch run

# HTTP mode (for remote/web access)
swaitch run --transport http --port 8000

2. Connect from your IDE

Add to your MCP client configuration:

Cursor / Claude Desktop (mcp_config.json):

{
  "mcpServers": {
    "swaitch": {
      "command": "swaitch",
      "args": [
        "run"
      ]
    }
  }
}

3. Use the tools

Once connected, your AI assistant can:

You: "What conversations do I have from my other IDEs?"
→ Agent calls list_sources → list_conversations

You: "Bring in that architecture discussion from Cursor"
→ Agent calls get_conversation with the ID
→ Full context is now available in your current session

Tools

swAItch exposes three MCP tools:

Tool Description Parameters
list_sources Discover which IDEs have conversation data available
list_conversations List conversations from an IDE with summaries source, limit
get_conversation Get full conversation content (messages + artifacts) conversation_id, source

Typical Workflow

sequenceDiagram
    participant User
    participant Agent
    participant swAItch

    User->>Agent: "Bring in my Cursor conversations"
    Agent->>swAItch: list_sources()
    swAItch-->>Agent: [{ide: "cursor", status: "available", count: 4}]
    Agent->>swAItch: list_conversations(source="cursor")
    swAItch-->>Agent: [{id: "abc-123", title: "Auth Architecture", ...}]
    Agent->>User: "Found 4 conversations. Which one?"
    User->>Agent: "The auth architecture one"
    Agent->>swAItch: get_conversation(id="abc-123", source="cursor")
    swAItch-->>Agent: {messages: [...], artifacts: {...}}
    Agent->>User: "Got it! Here's the context..."

Architecture

swAItch follows SOLID principles with a clean, extensible design:

src/swaitch/
├── server.py          # FastMCP server + lifespan management
├── models.py          # Pydantic v2 data models (the shared language)
├── config.py          # Platform-aware path resolution
├── tools.py           # MCP tool definitions (depend on abstractions)
├── watcher.py         # Async file system watcher (watchfiles)
└── parsers/
    ├── base.py        # Abstract BaseParser (the contract)
    ├── registry.py    # Parser registry (discovery + lookup)
    └── cursor.py      # Cursor parser implementation

Adding a new IDE parser

from swaitch.parsers.base import BaseParser
from swaitch.models import IDEType, IDESource, Conversation

class MyIDEParser(BaseParser):
    @property
    def ide_type(self) -> IDEType:
        return IDEType.MY_IDE

    @property
    def display_name(self) -> str:
        return "My IDE"

    def detect(self) -> IDESource:
        # Check if data exists on the system
        ...

    def get_watch_paths(self) -> list[Path]:
        # Return directories to monitor
        ...

    def list_conversation_ids(self) -> list[str]:
        # Return a list of all conversation IDs
        ...

    def get_conversation(self, conversation_id: str) -> Conversation:
        # Return full conversation with messages
        ...

Then register it in server.py:

registry.register(MyIDEParser())

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/yourusername/swaitch.git
  3. Install dev dependencies: uv pip install -e ".[dev]"
  4. Create a branch: git checkout -b feature/my-parser
  5. Make your changes
  6. Run linting: ruff check .
  7. Submit a PR

Adding a new IDE parser

The fastest way to contribute is by adding support for a new IDE:

  1. Add the IDE type to IDEType enum in models.py
  2. Add data paths to IDEPaths in config.py
  3. Create parsers/my_ide.py extending BaseParser
  4. Register it in server.py's _build_registry()

License

MIT — see LICENSE


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swaitch-1.0.0.tar.gz (121.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swaitch-1.0.0-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file swaitch-1.0.0.tar.gz.

File metadata

  • Download URL: swaitch-1.0.0.tar.gz
  • Upload date:
  • Size: 121.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for swaitch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e1cddc99d4e81e559a4376898559799123ce937d11de1928eee242230082363f
MD5 426f7adc7e81559dcc5be1de044e16e5
BLAKE2b-256 2e8e063615819f023f3ecdfc68658a4f651b899cc2c741b7e859eac92b9a42ed

See more details on using hashes here.

File details

Details for the file swaitch-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: swaitch-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for swaitch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2e2dc9218ac34c0b9c4fcd6acb4914f6e6ba3375f7219e072ec8518fef89527
MD5 738eaed6adf5f96df225ee3f6cfd0ddf
BLAKE2b-256 7e119ca56cad85b058f3bd407205e12f5ea9f4f89c6cffba8d83d9e577d091d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page