Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,24 @@ Take UI design screenshots and use them with the composer agent.

### 🔍 Code Review

Use git diffs to trigger code reviews.
Use git diffs to trigger code reviews against configurable target branches.

## 🚀 Getting Started

### 1. Environment Setup

First, you'll need to set up your environment variables. Create a file at `src/env/keys.ts`:
Configure the server using environment variables in your `mcp.json` (cursor will suggest to create this file according to "Adding to Cursor below"):

```typescript
export const OPENAI_API_KEY = "your_key_here";
// Add any other keys you need
```
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `OPENAI_API_KEY` | Yes | - | Your OpenAI API key |
| `OPENAI_BASE_URL` | No | OpenAI default | Custom API endpoint (e.g., for Perplexity) |
| `OPENAI_MODEL` | No | `o3-mini-2025-01-31` | LLM model to use |
| `CODE_REVIEW_TARGET_BRANCH_NAME` | No | `main` | Target branch for code reviews |

> ⚠️ **Security Note**: Never commit API keys to source control. Always use environment variables for sensitive data.

> ⚠️ **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.
> ⚠️ **Security Note**: Project consists of backward compatible solution with configuring secretes via [env/keys.ts](env/keys.ts), but it does not recommended.

### 2. Installation

Expand All @@ -50,10 +54,23 @@ This project is designed to be used as an MCP server in Cursor. Here's how to se
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`
4. Fill out the `mcp.json`:
```json
{
"mcpServers": {
"ai-development-assistant": {
"command": "node",
"args": ["/path/to/your/project/build/awesome-cursor-mpc-server/build/index.js"],
"env": {
"OPENAI_API_KEY": "get your key from https://platform.openai.com/api-keys",
"OPENAI_BASE_URL": "optional to use Perplexity e.g.",
"OPENAI_MODEL": "optional <...>",
"CODE_REVIEW_TARGET_BRANCH_NAME": "optional <...>"
}
}
}
}
```

> 📘 **Pro Tip**: You might need to use the full path to your project's built index.js file.

Expand All @@ -75,6 +92,8 @@ The agent will ask for your approval before making any tool calls.

> 📘 **Pro Tip**: You can update your .cursorrules file with instructions on how to use the tools for certain scenarios, and the agent will use the tools automatically.

> 📘 **Pro Tip**: To make sure server is used for e.g. "Review this code for best practices" you could add smth like "use code review tool"

## 📁 Project Structure

```
Expand All @@ -83,8 +102,9 @@ src/
│ ├── 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!)
├── env/ # Deprecated! Legacy, add env to mcp.json instead
│ └── keys.ts # Deprecated! Legacy, add env to mcp.json instead
├── settings.ts # Environment variables and server configuration
└── index.ts # Main entry point
```

Expand Down
Loading