codebase
MCP server from MyunghoBae/codebase-mcp-server
claude mcp add --transport stdio myunghobae-codebase-mcp-server npx codebase-mcp-server@latest
How to use
Codebase MCP Server provides a secure, context-aware interface for analyzing a Codebase project. It exposes tools to read essential project metadata, locate and inspect configuration files, traverse dependency trees, list directory contents, and read files with metadata, all while restricting file operations to a predefined root. Supported languages include JavaScript/TypeScript and CSS/CSS preprocessors, making it suitable for analyzing modern JavaScript projects and styling files. To use it, run the server through your preferred runtime (via npx, Docker, or a local install) and connect your MCP client to the configured server name (e.g., Codebase). The server’s tools include get-project-basics, search-config-files, get-dependency-tree, list-directory, and read-file-with-metadata, which you can invoke by providing the appropriate file paths and root directory. This enables efficient codebase analysis and guidance from your LLM with concrete project context.
How to install
Prerequisites:\n- Node.js v18 or later (NPM comes with Node.js)\n- Access to the target Codebase project you want to analyze\n\nInstallation and setup (preferred method: using npx):\nbash\n# Ensure Node.js is installed (v18+). Check version: \nnode -v\nnpm -v\n\n# Install and run the Codebase MCP Server on demand via npx\n# This does not install a global package; it runs the server from npm registry when invoked.\nnpx codebase-mcp-server@latest\n\n\nAlternative: local installation (if you want to host the server yourself):\nbash\n# Install as a local dev dependency\nnpm install --save-codebase codebase-mcp-server@latest\n# Build if the package requires a build step (follow package.json scripts)\nnpm run build\n# Start the server (adjust path to entry if needed)\nnode dist/server.js\n\n\nDocker workflow (recommended for isolated environments):\nbash\ndocker build -t mcp/codebase -f Dockerfile .\n# Then configure MCP to point to the container and root path as needed, for example:\ndocker run -i --rm -v /path/to/your/codebase:/projects -v /path/to/config:/config mcp/codebase "/projects"\n
Additional notes
Tips and common considerations:\n- Ensure the root directory provided to the MCP server is restricted to a safe path to prevent unauthorized access to the filesystem. The server is designed to restrict file operations to a predefined root.\n- If you encounter path resolution issues, verify the rootDir and mounted volumes in your Docker configuration or MCP client settings.\n- The server exposes a set of tools (get-project-basics, search-config-files, get-dependency-tree, list-directory, read-file-with-metadata). Use these with explicit file paths relative to the configured root.\n- For CI/CD environments, consider using the Docker deployment to encapsulate dependencies and avoid host system discrepancies.\n- If you need to customize behavior, you can typically modify environment variables or the MCP server configuration file, depending on how the package exposes its runtime options.\n- When using npx, ensure network access to fetch the latest version (codebase-mcp-server@latest).
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud