awesome-cursor-mpc-server
by: kleneway
Example of an MCP server with custom tools that can be called directly from cursor
πOverview
Purpose: The framework serves as an AI-powered toolkit to enhance development processes through intelligent coding assistance.
Overview: This project functions as a Model Context Protocol (MCP) server tailored for Cursor, mainly designed for educational purposes and as a demonstration rather than for production use. It provides tools that leverage AI capabilities to assist developers in coding tasks.
Key Features:
-
Code Architect: Utilizes advanced reasoning language models to produce structured plans and instructions, aiding developers in organizing their coding efforts efficiently.
-
Screenshot Buddy: Allows users to capture and utilize UI design screenshots seamlessly within the coding environment, improving the design integration process.
-
Code Review: Implements git diff functionality to facilitate comprehensive code review processes, ensuring code quality and adherence to best practices.
AI Development Assistant MCP Server
Welcome to your AI-powered development toolkit, designed as a Model Context Protocol (MCP) server for Cursor. This project provides intelligent coding assistance through custom AI tools.
Features
Code Architect
Generate plans and instructions for coding agents using advanced reasoning LLMs.
Code Review
Trigger code reviews using git diffs.
Getting Started
Environment Setup
Set up your environment variables by creating a file at src/env/keys.ts
with the following content:
export const OPENAI_API_KEY = "your_key_here";
// Add any other keys you need
Security Note: Storing API keys directly in source code is not recommended for production environments.
Installation
Run one of the following commands:
npm install
or
yarn install
Build the Server
Execute the following command:
npm run build
Adding to Cursor
To set up the MCP server in Cursor:
- Open Cursor
- Go to
Cursor Settings > Features > MCP
- Click
+ Add New MCP Server
- Fill out the form:
- Name: AI Development Assistant
- Type: stdio
- Command:
node /path/to/your/project/dist/index.js
After adding the server, you should see your tools listed under "Available Tools."
Using the Tools
Once configured, you can use these tools directly in Cursor's Composer. The AI will suggest relevant tools or you can explicitly request them.
For example, type in Composer:
- "Review this code for best practices"
- "Help me architect a new feature"
The agent will ask for your approval before making any tool calls.
Project Structure
src/
βββ tools/
β βββ architect.ts # Code structure generator
β βββ codeReview.ts # Code review tool
βββ index.ts # Main entry point
Contributing
Contributions welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
Issues & Support
If you encounter a bug or need help, please open an issue with:
- What you were trying to do
- What happened instead
- Steps to reproduce
- Your environment details
Note: This is a tutorial demo and not a production-ready tool, so issues might not be fixed, but feel free to fork it and modify it.