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. Note that this is mostly a tutorial demo, not a production-ready tool.
β¨ Features
π¨ Code Architect
Call advanced reasoning LLMs to generate plans and instructions for coding agents.
πΈ Screenshot Buddy
Take UI design screenshots and use them with the composer agent.
π Code Review
Use git diffs to trigger code reviews.
π Getting Started
1. Environment Setup
Create a file at src/env/keys.ts
:
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. This is only for local development and learning purposes. You can set the env var inline in the Cursor MCP interface as well.
2. Installation
npm install
# or
yarn install
3. Build the Server
npm run build
4. Adding to Cursor
This project is designed to be used as an MCP server in Cursor. To set it up:
- 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
π Pro Tip: You might need to use the full path to your project's built index.js file.
After adding the server, your tools should appear under "Available Tools". If not, try refreshing the MCP server section.
For more details about MCP setup, see the Cursor MCP Documentation.
π οΈ Using the Tools
Once configured, use these tools directly in Cursor's Composer. The AI will suggest relevant tools or you can request them by name or description.
Try typing in Composer:
- "Review this code for best practices"
- "Help me architect a new feature"
- "Analyze this UI screenshot"
The agent will ask for your approval before making tool calls.
π Pro Tip: Update your
.cursorrules
file with instructions for using the tools automatically in certain scenarios.
π Project Structure
src/
βββ tools/
β βββ architect.ts # Code structure generator
β βββ screenshot.ts # Screenshot analysis tool
β βββ codeReview.ts # Code review tool
βββ env/
β βββ keys.ts # Environment configuration (add your API keys here!)
βββ index.ts # Main entry point
π€ Contributing
Contributions welcome! Please submit a Pull Request.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Issues & Support
Found a bug or need help? Open an issue with:
- What you were trying to do
- What happened instead
- Steps to reproduce
- Your environment details
This is a tutorial demo, not a production-ready tool, so issues may not be fixed. Feel free to fork it and make it your own!
Made with β€οΈ by developers, for developers