MCP HubMCP Hub
kleneway

awesome-cursor-mpc-server

by: kleneway

Example of an MCP server with custom tools that can be called directly from cursor

282created 05/02/2025
Visit
custom
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:

  1. Open Cursor
  2. Go to Cursor Settings > Features > MCP
  3. Click + Add New MCP Server
  4. 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:

  1. What you were trying to do
  2. What happened instead
  3. Steps to reproduce
  4. 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.