Offers code linting functionality through the example of adding ESLint as a custom tool, allowing for automatic fixing of code quality issues.
Provides code formatting capabilities across all projects using Prettier, allowing automatic code styling with the 'mcp-formatter' tool.
Enables JavaScript to TypeScript migration using the 'mcp-translator' tool, helping convert existing JavaScript projects to TypeScript.
MCP Basics
A centralized Model Context Protocol (MCP) server that provides common development tools across all your Cline projects. Instead of installing tools individually in each project, use this single MCP server to access formatting, translation, and other development utilities.
Features
- mcp-formatter: Code formatting using Prettier (
npx prettier --write .
) - mcp-translator: JavaScript to TypeScript migration (
npx ts-migrate
) - Centralized tool management: Add tools once, use everywhere
- Directory-specific execution: Run tools in any project directory
Installation
- Clone this repository:
- Install dependencies:
- Test the server (optional):
Configuration
In VSCode, set up your MCP settings and add Local MCP Basics as a new entry inside the mcpServers object:
Configuration:
Replace /path/to/mcp-basics/index.js
with the actual path to your cloned repository.
Usage
Once configured, you can use these tools in any Cline project by simply asking:
- "Use the mcp-formatter tool to format this code"
- "Run the mcp-translator tool to convert JavaScript to TypeScript"
- "Format the code using prettier"
The tools will execute in your current project directory automatically.
Tool Parameters
Each tool accepts an optional directory
parameter:
If no directory is specified, tools run in the current working directory.
Adding New Tools
To add new tools to the server:
- Edit
tools.json
and add your tool:
- The tool will automatically be available in Cline without restarting.
Example: Adding ESLint
Project Structure
Development
Running the Server
The server will start and listen for MCP protocol messages via stdio.
Testing Tools
You can test individual tools by calling them through the MCP protocol or by running the commands directly:
How It Works
This MCP server:
- Reads tool definitions from
tools.json
- Exposes tools via the MCP protocol to Cline
- Executes commands in the specified directory when called
- Returns results with stdout, stderr, and execution status
Requirements
- Node.js (v14 or higher)
- npm or yarn
- Cline with MCP support
License
MIT License - feel free to use and modify as needed.
Contributing
- Fork the repository
- Add your tools to
tools.json
- Test the changes
- Submit a pull request
Note: This server runs locally and doesn't require any external API keys or authentication. All tools execute using your local development environment.
local-only server
The server can only run on the client's local machine because it depends on local resources.
A centralized Model Context Protocol server that provides common development tools (like formatting and translation) across all your Cline projects without needing to install them individually.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.Last updated -121PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that allows Claude to interact with Linear's API for managing teams, issues, projects, and cycles.Last updated -132TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables large language models to interact with Linear's issue tracking system, allowing management of issues, projects, teams, and other Linear resources.Last updated -554TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that connects AI assistants like Cline to Atlassian Jira and Confluence, enabling them to query data and perform actions through a standardized interface.Last updated -5038TypeScriptMIT License