Content
# 📦 pr-creator-mcp
This is an MCP server that can be integrated with tools like Cursor and Claude to automate the creation of GitHub Pull Requests (PRs). It automatically generates PR titles, descriptions, checklists, and impact scopes, and pushes them to GitHub.
## 🚀 Installation Instructions
### 1. Clone the Repository and Navigate to the Directory
```bash
git clone https://github.com/urijan44/pr_creator_mcp.git
cd pr_creator_mcp
```
### 2. Install Dependencies
```bash
npm install
```
### 3. Register the MCP
```bash
npm run setup
```
> This script creates a `.cursor/mcp.json` file to register the MCP server and automatically configures the execution settings, including GitHub environment variables.
## ⚙️ Environment Variable Configuration (`.env`)
### 1. Create the `.env` File
```bash
cp .env.example .env
```
### 2. Fill in the Contents
```dotenv
GITHUB_TOKEN=ghp_your_token_here
GITHUB_API_BASE=https://api.github.com
GITHUB_WEB_BASE=https://github.com
```
> If you are using GitHub Enterprise, please change the `API_BASE` and `WEB_BASE`.
## 🛠 Provided MCP Tools
- `pr-creator`: Automatically generates PR titles and descriptions based on Git diff and commit logs.
- `pr-submitter`: Creates a PR on GitHub or updates it if it already exists.
- `get-reviewers`: Retrieves a list of users who can review in the current repository.
## 🧪 Testing
To verify that the MCP is registered correctly, the `.cursor/mcp.json` file should contain the following:
```json
"mcpServers": {
"pr-write": {
"command": "node",
"args": ["/your/path/to/build/index.js"],
"env": {
"GITHUB_TOKEN": "...",
...
}
}
}
```
## 📂 Log Location
All logs are stored in the following path:
```bash
~/.mcp/logs/
```