Code MCP Server
Provides tools for Docker container and image management, including building images, running containers, and managing services via Docker Compose.
Enables comprehensive Git workflow management with tools for status checks, committing changes, and performing enhanced diff analysis.
Supports execution of JavaScript code within the workspace, including package management and dependency resolution.
Allows interaction with the npm ecosystem for package installation, project scaffolding, and running custom scripts.
Integrates with pnpm for package management and project development tasks within the workspace.
Enables automated testing workflows by supporting the execution and management of pytest suites.
Supports Python code execution and dependency management within the project environment.
Provides scaffolding tools for creating and managing React-based projects.
Utilizes TOML for experimental project-specific configuration management and security allowlisting.
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., "@Code MCP Server show me the current git status and the diff for my local changes"
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.
Code MCP Server
โ ๏ธ Experimental Project - This is an experimental MCP server for VS Code integration. While it includes comprehensive testing, it's still in active development. Use with caution in production environments and expect potential breaking changes.
An experimental Model Context Protocol (MCP) server that aims to enable AI assistants like Claude to interact with VS Code workspaces. This project attempts to provide development tools for file operations, code execution, Git management, Docker integration, and project management, though it's still evolving and may have limitations.
Inspired by codemcp - This experimental project adapts security and configuration concepts from the codemcp project, exploring project-specific TOML configuration, restricted command execution, and session management features. We're learning and iterating on these concepts.
โจ Key Features (Experimental)
๐ฏ Workspace Management - Attempts to provide smart VS Code workspace detection and path validation
๐ก๏ธ Project Configuration - Experimental
.vscode-mcp.tomlconfiguration system for project-specific settings๐ File Operations - Basic file CRUD operations, search, and comparison features
โก Code Execution - Experimental support for Python and JavaScript execution with package management
๐ง Git Integration - Git workflow tools with diff analysis (still being refined)
๐ณ Docker Integration - Basic Docker container and image operations
๐๏ธ Project Scaffolding - Template-based project creation (limited framework support)
๐ Code Analysis - Experimental code analysis and quality metrics
Note: All features are experimental and may not work perfectly in all environments. We're actively working to improve reliability and coverage.
Related MCP server: vscode-mcp-server
๐ Quick Start
โ ๏ธ Experimental Software: Please test thoroughly in development environments before using with important projects. This MCP server is under active development and may have unexpected behaviors.
Method 1: NPM Installation (Experimental)
Try the experimental package installation:
# Install globally (experimental)
npm install -g code-mcp
# Or use with npx (recommended for testing)
npx code-mcp --helpExperimental Claude Desktop integration:
# Generate configuration (may need adjustments)
npx code-mcp --config
# Follow the instructions to add the config to Claude DesktopManual Claude Desktop Configuration: Add this to your Claude Desktop config file:
{
"mcpServers": {
"code-mcp": {
"command": "npx",
"args": ["code-mcp"],
"env": { "NODE_ENV": "production" }
}
}
}Method 2: Local Development Installation
Prerequisites
Node.js 18+ with ES Modules support
pnpm 8+ (recommended package manager)
VS Code (any recent version)
Claude Desktop or other MCP-compatible AI
Installation
Clone and build:
git clone https://github.com/agentics-ai/code-mcp.git cd code-mcp pnpm install && pnpm run buildAuto-configure Claude Desktop:
# macOS/Linux ./scripts/generate-claude-config.sh # Windows scripts\generate-claude-config.batManual configuration (if needed):
Add to your Claude Desktop config file:
{ "mcpServers": { "code-mcp": { "command": "node", "args": ["/path/to/code-mcp/dist/src/index.js"], "env": { "NODE_ENV": "production" } } } }Test installation:
pnpm test # Run 473 testsRestart Claude Desktop and ask: "What development tools are available?"
โ๏ธ Project Configuration (Experimental)
This experimental feature allows creating a .vscode-mcp.toml file in your project root for project-specific settings. Please note that this configuration system is still being developed and may change:
[general]
projectName = "My Project"
autoCommit = true # Experimental feature
sessionTracking = true # Still in development
[security]
# Experimental allowlist-based security
allowedCommands = [
"npm install", "npm test", "npm run build",
"git status", "git add .", "git commit",
"python -m pytest", "docker build"
]
commandTimeout = 300
[project]
language = "typescript"
framework = "node"
testCommand = "npm test"
buildCommand = "npm run build"
[[customTools]]
name = "deploy-staging"
description = "Deploy to staging environment"
commands = ["npm run build", "npm run deploy:staging"]Experimental Features:
Command allowlisting - Attempts to restrict command execution for security
Session management - Experimental development session tracking
Custom tools - Define project-specific command sequences (basic implementation)
Auto-commit - Experimental AI change tracking (may miss some changes)
Warning: The configuration system is experimental and may not provide complete security. Always review and test commands before relying on them.
Docker Setup (Alternative)
# Quick Docker setup
docker-compose up -d
# Configure Claude for Docker
{
"mcpServers": {
"code-mcp": {
"command": "docker",
"args": ["exec", "-i", "code-mcp-server", "node", "/app/dist/src/index.js"]
}
}
}๐ ๏ธ Available Tools (Experimental)
This experimental server provides development tools organized by category. Please note that not all tools may work reliably in all environments:
๐ File Operations - Basic CRUD operations, search, comparison (still refining reliability)
โก Code Execution - Python and JavaScript execution with package management (experimental)
๐ง Git Integration - Git workflow tools with diff analysis (may have edge cases)
๐ณ Docker - Container and image operations (basic implementation)
๐๏ธ Project Management - Scaffolding and workspace detection (limited templates)
๐ก๏ธ Security - Experimental command restriction and session management
Key Tools (All Experimental):
read_file/write_file- File operations with backup supportrun_python/run_javascript- Code execution with dependency managementgit_status/git_commit/enhanced_git_diff- Git operationsdocker_build/docker_run/docker_compose- Container managementcreate_project- Multi-framework project scaffoldingsecure_run_command- Allowlist-based command executionload_project_config- Project-specific configuration management
Explore available tools through the Claude interface, but please test functionality before relying on it for important work.
๐ฏ Usage Examples (Experimental Results May Vary)
๐ก Best Practice: Always specify full project paths for more reliable workspace detection and operations. This helps the MCP server understand your project context better.
Project Setup with Full Path:
๐ค "Create a new React project at /Users/username/projects/my-react-app"
๐ค Attempts to use: create_project, npm_command, create_file
๐ Note: Full paths help with workspace detection and file operationsCode Analysis with Specific Project:
๐ค "Analyze the codebase at /Users/username/projects/my-app and run tests"
๐ค Tries to use: analyze_code, search_files, run_tests, git_status
๐ Note: Specifying the project path improves analysis accuracyGit Workflow with Project Context:
๐ค "Review changes in /Users/username/projects/my-app and commit my work"
๐ค Uses: git_status, enhanced_git_diff, git_add, git_commit
๐ Note: Full paths ensure Git operations target the correct repositoryWorking with Multiple Projects:
๐ค "Compare the package.json files between /Users/username/projects/app-v1 and /Users/username/projects/app-v2"
๐ค Uses: read_file, compare_files with proper workspace context
๐ Note: Full paths prevent confusion when working with multiple projectsDocker Operations with Project Path:
๐ค "Build a Docker image for the project at /Users/username/projects/my-docker-app"
๐ค Uses: docker_build, read_file (for Dockerfile) with correct working directory
๐ Note: Ensures Docker commands run in the correct project contextExperimental Security Features:
๐ค "Start a development session for /Users/username/projects/secure-app and run tests"
๐ค Attempts: start_coding_session, secure_run_command, auto_commit_changes
๐ Note: Project-specific security settings work better with full paths๐งช Development & Testing
Setup:
pnpm install && pnpm run build
pnpm test # Run test suite (currently 473 tests across 15 suites)
pnpm run dev # Development with auto-rebuildDocker (Experimental):
docker-compose up --build # Run with Docker (may need adjustments)
docker-compose run --rm app pnpm test # Test in containerTesting: We maintain a comprehensive test suite with 473 tests covering unit, integration, and e2e scenarios. However, as an experimental project, real-world usage may reveal edge cases not covered by tests.
Note: While we have extensive tests, this is still experimental software. Test thoroughly in your specific environment before relying on it.
๐ค Contributing
We welcome contributions to this experimental project! Please keep in mind that we're still figuring out best practices and the architecture may evolve:
Fork the repository
Create a feature branch:
git checkout -b feature-nameAdd tests for new functionality (our test suite helps catch regressions)
Run the test suite:
pnpm testSubmit a pull request with a clear description
See CONTRIBUTING.md for detailed guidelines. As an experimental project, we're especially interested in:
Bug reports and edge cases
Suggestions for improving reliability
Use cases that don't work well yet
Ideas for better security and configuration approaches
๐ License
MIT License - see LICENSE for details.
๐ Support & Known Limitations
This is experimental software - please be patient as we work through issues and limitations.
Known Limitations:
Incomplete error handling: Some edge cases may not be handled gracefully
Platform-specific issues: Primarily tested on macOS and Linux; Windows support may be incomplete
Performance: Some operations may be slower than expected
Security: Experimental security features need more real-world testing
Common Issues:
MCP server won't start: Check Node.js version (18+) and run
pnpm testto identify issuesClaude connection issues: Verify config file path and restart Claude Desktop (may need manual config adjustments)
Command execution blocked: Commands must be in
.vscode-mcp.tomlallowlist (security feature is experimental)VS Code detection issues: Ensure VS Code is running with open workspaces (detection logic is still being refined)
Getting Help:
Create an issue on GitHub with detailed reproduction steps
Check the test suite for usage examples (though real usage may differ)
Review tool descriptions in the Claude interface
Be specific about your environment and use case when reporting issues
๐ Acknowledgments
Inspired by codemcp by Edward Z. Yang. We're experimenting with and learning from key security and configuration concepts while exploring VS Code integration and MCP tool coverage.
Experimental adaptations from codemcp:
Project-specific
.vscode-mcp.tomlconfiguration (still refining the format)Allowlist-based command execution security (needs more testing)
Development session tracking and rollback capabilities (basic implementation)
Built with โค๏ธ for the AI development community as an experimental contribution. We're learning as we build and welcome feedback on what works and what doesn't.
Available Tools
73 toolsadd_allowed_commandB
Add a command to the project's allowed commands list
Inputs: command (required).
analyze_codeC
Analyze code structure and dependencies
Inputs: path (required), language.
analyze_file_differencesC
Analyze differences between two files with detailed statistics
Inputs: file1 (required), file2 (required).
apply_patchC
Apply a patch file to the workspace
Inputs: patchFile (required), dryRun, reverse, stripPaths, +1 more.
auto_commit_changesC
Automatically commit AI-made changes with tracking
Inputs: message (required), files, amendSession.
auto_select_workspaceC
Automatically select the most appropriate VS Code workspace
Inputs: no named parameters.
compare_commitsC
Compare two commits with detailed analysis
Inputs: commit1 (required), commit2 (required), filePattern, format, +1 more.
compare_filesB
Compare two files and show differences with multiple format options
Inputs: file1 (required), file2 (required), format, contextLines, +4 more.
create_directoryC
Create a new directory
Inputs: path (required).
create_patchB
Create a patch file from differences between files or directories
Inputs: source (required), target (required), outputFile.
create_projectC
Create a new project with boilerplate
Inputs: name (required), type (required), path.
delete_fileC
Delete a file or directory
Inputs: path (required).
detect_vscode_workspacesB
Automatically detect open VS Code instances and their workspaces
Inputs: includeRecent, includeRunning, maxResults.
docker_buildB
Build a Docker image from a Dockerfile
Inputs: context, dockerfile, tag, build_args, +4 more.
docker_check_availabilityB
Check if Docker is installed and available
Inputs: no named parameters.
docker_cleanupB
Clean up tracked Docker containers and resources
Inputs: no named parameters.
docker_composeC
Manage Docker Compose services
Inputs: action (required), service, file, detach, +7 more.
docker_containersB
Manage Docker containers (list, start, stop, remove, etc.)
Inputs: action (required), container, command, follow, +4 more.
docker_imagesC
Manage Docker images (list, pull, push, remove, etc.)
Inputs: action (required), image, tag, force, +2 more.
docker_networksC
Manage Docker networks
Inputs: action (required), network, container, driver, +2 more.
docker_runC
Run a Docker container
Inputs: image (required), name, command, args, +13 more.
docker_systemC
Docker system operations and information
Inputs: action (required), all, volumes, force.
docker_volumesC
Manage Docker volumes
Inputs: action (required), volume, driver, force, +1 more.
end_coding_sessionA
End the current coding session
Inputs: no named parameters.
enhanced_git_diffC
Show git diff with multiple format options (unified, side-by-side, stat, word-diff)
Inputs: staged, file, format, contextLines, +5 more.
find_and_replaceC
Find and replace text across multiple files with preview option
Inputs: searchPattern (required), replacement (required), files, filePattern, +5 more.
generate_docker_composeC
Generate a Docker Compose file template
Inputs: services (required), include_database.
generate_dockerfileB
Generate a Dockerfile template for a specific language/framework
Inputs: language (required), framework.
generate_sample_configC
Generate a sample .vscode-mcp.toml configuration file
Inputs: saveToFile.
get_allowed_commandsA
Get list of commands that are allowed to run in this project
Inputs: no named parameters.
get_current_sessionB
Get information about the current coding session
Inputs: no named parameters.
get_diff_statsB
Get diff statistics (files changed, lines added/removed)
Inputs: staged, file, commit1, commit2, +1 more.
get_session_historyA
Get history of all coding sessions and their commits
Inputs: limit.
get_session_infoB
Get information about the current coding session
Inputs: no named parameters.
get_workspaceB
Get current workspace path
Inputs: no named parameters.
git_addB
Stage files for commit
Inputs: files, all, cwd.
git_branchC
List, create, or switch branches
Inputs: action (required), name, cwd.
git_commitB
Commit staged changes
Inputs: message (required), cwd.
git_diffC
Show git diff
Inputs: staged, file, cwd.
git_logB
Show commit history
Inputs: limit, oneline, cwd.
git_pullC
Pull changes from remote
Inputs: remote, branch, cwd.
git_pushB
Push commits to remote
Inputs: remote, branch, cwd.
git_statusC
Get git repository status
Inputs: cwd.
install_dependenciesC
Install all project dependencies
Inputs: path.
list_directoryC
List contents of a directory with details
Inputs: path (required), recursive.
list_processesA
List all running processes started by the agent
Inputs: no named parameters.
list_workspacesB
List recently used workspaces
Inputs: no named parameters.
load_project_configB
Load project-specific configuration from .vscode-mcp.toml
Inputs: path.
move_fileB
Move or rename a file or directory
Inputs: source (required), destination (required).
npm_commandB
Run npm commands (install, test, build, etc)
Inputs: command (required), args, cwd.
pip_installC
Install Python packages using pip
Inputs: packages, requirements_file, venv.
present_workspace_choiceB
Present detected workspaces to user for selection
Inputs: no named parameters.
preview_changesB
Preview all changes before committing
Inputs: no named parameters.
preview_changes_enhancedC
Enhanced change preview with multiple format options
Inputs: format, contextLines, ignoreWhitespace, filePattern, +1 more.
read_fileB
Read the contents of a file
Inputs: path (required).
remove_allowed_commandB
Remove a command from the project's allowed commands list
Inputs: command (required).
rollback_sessionB
Rollback all changes made in the current AI session
Inputs: confirm (required), preserveUnstaged.
run_commandC
Execute a shell command
Inputs: command (required), cwd, env.
run_custom_toolB
Execute a custom tool defined in project configuration
Inputs: toolName (required), args.
run_javascriptB
Execute JavaScript code or script with Node.js
Inputs: code, script_path, args.
run_pythonC
Execute Python code or script
Inputs: code, script_path, args, venv.
run_testsC
Run tests using appropriate test runner
Inputs: language (required), framework, path, pattern.
save_project_configB
Save project-specific configuration to .vscode-mcp.toml
Inputs: config (required), path.
search_codeC
Search for patterns in code
Inputs: query (required), path (required), file_pattern, regex.
secure_run_commandA
Execute a command with security restrictions (only allowed commands)
Inputs: command (required), cwd, timeout, env, +2 more.
secure_run_command_sequenceC
Execute multiple commands in sequence with security restrictions
Inputs: commands (required), cwd, timeout, commitResult, +2 more.
set_workspaceC
Set the active workspace directory
Inputs: path (required).
smart_workspace_initB
Intelligently initialize workspace with VS Code detection and user choice
Inputs: no named parameters.
start_coding_sessionB
Start a new coding session for change tracking
Inputs: description (required), branch.
start_serverC
Start a development server
Inputs: command (required), name (required), port, cwd.
stop_serverB
Stop a running server
Inputs: name (required).
update_project_configC
Update specific project configuration settings
Inputs: allowedCommands, formatOnSave, gitAutoCommit, formatCommand, +1 more.
write_fileB
Write content to a file
Inputs: path (required), content (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 73 tools
Many tools have overlapping purposes, especially in the diff/analyze category (analyze_code, analyze_file_differences, compare_files, compare_commits, enhanced_git_diff, git_diff, preview_changes, etc.) and command execution (run_command, secure_run_command, npm_command, pip_install, run_javascript, run_python, run_custom_tool). Descriptions help distinguish some but not all.
Most tools follow verb_noun (snake_case) naming, e.g., add_allowed_command, analyze_code. There are minor deviations like docker_images (noun) vs docker_build (verb), and some redundant prefixes like get_current_session vs get_session_info, but overall pattern is consistent.
With 73 tools, this is far beyond a well-scoped set. Many tools could be merged (e.g., multiple diff and preview tools, multiple Docker management tools). The count feels excessive for a coding assistant, leading to potential confusion and inefficiency.
The tool surface covers file operations, git workflows, Docker management, session tracking, project configuration, and command execution comprehensively. There are no obvious gaps; even features like rollback, smart workspace init, and secure command sequences are included.
Maintenance
Related MCP Connectors
Nifty's MCP server โ exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides VSCode context and filesystem operations for AI assistants.9MIT
- FlicenseAqualityDmaintenanceA portable MCP server enabling AI assistants to operate VS Code, including file management, extension control, and workspace automation.6-
- AlicenseBqualityCmaintenanceA comprehensive MCP server for developers providing file operations, shell execution, git integration, and smart caching to enhance AI-assisted development.1124 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that lets AI assistants securely operate on local workspaces, including guarded binary and image artifact downloads/uploads on Windows and Linux.3MIT