Skip to content

Dynamic Project Switching for MCP Server #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2025
Merged

Dynamic Project Switching for MCP Server #203

merged 2 commits into from
Apr 25, 2025

Conversation

butschster
Copy link
Collaborator

This functionality allows users to work with multiple project, significantly improving the workflow for developers managing multiple codebases.

Key Features

  • Multi-Project Registry: Register and manage an unlimited number of projects
  • Project Aliases: Create shortcut names for quick project switching
  • Configuration Persistence: Each project maintains its own configuration and environment settings
  • Interactive Selection: Choose projects through an intuitive CLI interface
  • Current Directory Support: Easily set the current directory as an active project

New Commands

  • ctx project:add - Register a new project with optional alias and configuration
  • ctx project - View current project or switch projects interactively
  • ctx project <path|alias> - Switch to a specific project by path or alias
  • ctx project:list - List all registered projects with details

Implementation Details

  • Project state is stored in a JSON file for persistence across sessions
  • Projects can have custom configuration files and environment settings
  • The MCP server automatically uses the current project's context when started
  • Comprehensive validation ensures project paths and configurations are valid

Implements new console commands that allow switching between projects. This feature enables seamless work across multiple codebases while using CTX with Claude.

Key features:
- Switch to any project with `ctx project` or `ctx project .` (current dir)
- Use project aliases for quick switching with `ctx project <alias>`
- Add multiple projects with `ctx project:add <path>`
- View registered projects with `ctx project:list`
- Store project state based on OS conventions
@butschster butschster self-assigned this Apr 21, 2025
@butschster butschster added type:enhancement New feature or request console:cli Console commands and CLI interface mcp MCP server components labels Apr 21, 2025
@butschster butschster added this to the 1.27 milestone Apr 21, 2025
@butschster butschster linked an issue Apr 21, 2025 that may be closed by this pull request
@butschster butschster moved this to In review in Context Generator Apr 22, 2025
@butschster butschster merged commit 0f24155 into main Apr 25, 2025
17 of 19 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Context Generator Apr 25, 2025
@butschster butschster deleted the issue/160 branch April 25, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console:cli Console commands and CLI interface mcp MCP server components type:enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Dynamic Project Switching for MCP
1 participant