# π Sean-MCP
> PR Automation & GitHub Integration Tool with personality!
A Model Context Protocol (MCP) server and CLI tool for automating GitHub pull request management. Built with TypeScript, Node.js, and pure vibes.
## β¨ Features
- **π PR Creation** - Create pull requests with auto-generated descriptions
- **βοΈ PR Updates** - Update PR descriptions (auto-updates on push!)
- **π PR Listing** - List and browse PRs for any repo
- **π§ MCP Server** - Let Claude manage your PRs for you
- **π Webhook Server** - Auto-update PRs when you push
- **π¨ Sleek CLI** - Beautiful terminal UI with multiple personalities
## π Quick Start
### 1. Install Dependencies
```bash
cd seantokuzo-mcp
npm install
```
### 2. Configure
```bash
# Copy the example env file
cp .env.example .env
# Edit with your GitHub token
# Get one at: https://github.com/settings/tokens
```
Or run the interactive setup:
```bash
npm run cli setup
```
### 3. Build
```bash
npm run build
```
### 4. Use!
**CLI Mode:**
```bash
# Interactive mode
npm run cli
# Specific commands
npm run cli pr create
npm run cli pr update
npm run cli pr list
npm run cli config status
```
**MCP Mode (for Claude):**
See the MCP Setup section below.
## π Project Structure
```
seantokuzo-mcp/
βββ src/
β βββ index.ts # Main entry point
β βββ server.ts # Express webhook server
β βββ cli/
β β βββ index.ts # CLI entry point
β β βββ commands/ # CLI commands (pr, config)
β β βββ ui/ # Display utilities, messages
β βββ mcp/
β β βββ server.ts # MCP server implementation
β βββ services/
β β βββ github.ts # GitHub API service
β βββ types/
β β βββ index.ts # TypeScript types
β βββ utils/
β βββ config.ts # Configuration management
β βββ logger.ts # Logging utility
βββ package.json
βββ tsconfig.json
βββ .env.example
βββ README.md
```
## π§ MCP Setup (For Claude)
The MCP server lets Claude use your PR tools directly. Here's how to set it up:
### VS Code with Continue or GitHub Copilot
Add to your MCP settings (`.vscode/mcp.json` or VS Code settings):
```json
{
"mcpServers": {
"sean-mcp": {
"command": "node",
"args": ["/path/to/seantokuzo-mcp/dist/mcp/server.js"],
"env": {
"GITHUB_TOKEN": "your-github-token",
"GITHUB_USERNAME": "your-username"
}
}
}
}
```
### Claude Desktop
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"sean-mcp": {
"command": "node",
"args": ["/path/to/seantokuzo-mcp/dist/mcp/server.js"],
"env": {
"GITHUB_TOKEN": "your-github-token",
"GITHUB_USERNAME": "your-username"
}
}
}
}
```
### Available MCP Tools
Once configured, Claude can use these tools:
| Tool | Description |
| --------------------- | ----------------------------------------------- |
| `create_pull_request` | Create a new PR with auto-generated description |
| `update_pull_request` | Update a PR's title and/or description |
| `get_pull_request` | Get details about a specific PR |
| `list_pull_requests` | List PRs for a repository |
| `find_pr_for_branch` | Find the PR for a specific branch |
## π Webhook Server
The webhook server listens for GitHub push events and auto-updates PR descriptions.
### Start the Server
```bash
npm run start:webhook
```
### Configure GitHub Webhook
1. Go to your repo β Settings β Webhooks β Add webhook
2. **Payload URL:** `https://your-server.com/webhook/github`
3. **Content type:** `application/json`
4. **Secret:** Use the `WEBHOOK_SECRET` from your `.env`
5. **Events:** Select "Pushes" and "Pull requests"
### Local Development
For local testing, use a tool like [ngrok](https://ngrok.com/):
```bash
ngrok http 3847
```
Then use the ngrok URL as your webhook URL.
## π CLI Personalities
The CLI has three personality modes:
- **π₯ Chaotic** (default) - Fun, energetic, memes
- **πΌ Professional** - Clean, minimal output
- **π§ Zen** - Calm, philosophical vibes
Set in your `.env`:
```
CLI_PERSONALITY=chaotic # or: professional, zen
```
## π Environment Variables
| Variable | Required | Description |
| ------------------------ | -------- | ------------------------------------------ |
| `GITHUB_TOKEN` | Yes | GitHub Personal Access Token |
| `GITHUB_USERNAME` | Yes | Your GitHub username |
| `WEBHOOK_PORT` | No | Webhook server port (default: 3847) |
| `WEBHOOK_SECRET` | No | GitHub webhook secret |
| `CLI_PERSONALITY` | No | CLI personality (chaotic/professional/zen) |
| `DEFAULT_PR_BASE_BRANCH` | No | Default target branch (default: main) |
| `DEFAULT_PR_DRAFT` | No | Create draft PRs by default (true/false) |
## π οΈ Development
```bash
# Run CLI in dev mode (with hot reload)
npm run dev:cli
# Run MCP server in dev mode
npm run dev
# Type check
npm run typecheck
# Build
npm run build
```
## πΊοΈ Roadmap
Future features planned:
- [ ] **Jira Integration** - Create/move tickets, manage subtasks
- [ ] **Confluence Integration** - Generate documentation
- [ ] **PR Reviewers** - Auto-assign reviewers
- [ ] **PR Labels** - Auto-apply labels based on changes
- [ ] **AI-Enhanced Descriptions** - Use AI for better PR descriptions
---
_Built with π₯ and TypeScript_