# Github Mcp Server2

> GitHub MCP Server with DeepSeek AI integration - AI-powered GitHub tools for MCP-compatible clients

- **Type:** MCP server
- **Install:** `agentstack add mcp-ph7klw76-github-mcp-server2`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ph7klw76](https://agentstack.voostack.com/s/ph7klw76)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ph7klw76](https://github.com/ph7klw76)
- **Source:** https://github.com/ph7klw76/github-mcp-server2

## Install

```sh
agentstack add mcp-ph7klw76-github-mcp-server2
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# GitHub MCP Server with DeepSeek AI Integration 🚀

> **Fork of the official [GitHub MCP Server](https://github.com/github/github-mcp-server) with DeepSeek AI-powered tools for intelligent code analysis, content summarization, and description generation.**

[](https://goreportcard.com/report/github.com/ph7klw76/github-mcp-server2)

---

## ✨ What's New: DeepSeek AI Integration

This fork enhances the official GitHub MCP Server with **DeepSeek AI-powered tools**. When `DEEPSEEK_API_KEY` is configured, three new AI tools become available to MCP clients:

| Tool | Description |
|------|-------------|
| `ai_summarize_content` | Analyze and summarize any GitHub content (issues, PRs, code, discussions, READMEs) |
| `ai_code_review` | Review code for bugs, security issues, performance, and best practices |
| `ai_generate_description` | Generate PR descriptions, issue bodies, README sections, release notes, and more |

### Quick Test Results

| Component | Status | Details |
|-----------|--------|---------|
| Build | ✅ PASS | Compiles with Go 1.25.0 |
| DeepSeek API | ✅ PASS | `deepseek-v4-flash` responds correctly |
| Server Startup | ✅ PASS | "DeepSeek AI integration enabled model=deepseek-v4-flash" |
| Tool Registration | ✅ PASS | AI tools auto-register when API key is set |

---

## 🔑 How It Works

### Architecture

```
┌─────────────────────┐     MCP Protocol     ┌──────────────────────┐
│  AI Client (LLM)    │ ◄──────────────────► │  GitHub MCP Server    │
│  (Claude, Copilot,  │                      │  ┌────────────────┐  │
│   DeepSeek, etc.)   │                      │  │ GitHub REST    │  │
└─────────────────────┘                      │  │ GitHub GraphQL │  │
                                             │  │ GitHub Raw     │  │
                                             │  └────────────────┘  │
                                             │  ┌────────────────┐  │
                                             │  │ DeepSeek AI ✨ │  │
                                             │  └────────────────┘  │
                                             └──────────────────────┘
```

The MCP server provides GitHub API tools to any MCP-compatible AI client. The DeepSeek integration adds AI-powered analysis tools that run **server-side**, meaning any MCP client (Claude, Copilot, DeepSeek-powered clients, etc.) can access them without needing their own AI key.

---

## 📦 Installation & Setup

### Prerequisites

- **Go 1.25+** (for building from source)
- **GitHub Personal Access Token** (classic or fine-grained)
- **DeepSeek API Key** (optional, for AI-powered tools)

### Option 1: Build from Source

```bash
git clone https://github.com/ph7klw76/github-mcp-server2.git
cd github-mcp-server2
go build -o github-mcp-server ./cmd/github-mcp-server/
```

### Option 2: Using Docker

```bash
docker build -t github-mcp-server2 .
docker run -i --rm \
  -e GITHUB_PERSONAL_ACCESS_TOKEN= \
  -e DEEPSEEK_API_KEY= \
  github-mcp-server2 stdio
```

---

## 🚀 Quick Start

### Basic Usage (without AI tools)

```bash
export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_xxxx"
./github-mcp-server stdio
```

### With DeepSeek AI Tools Enabled

```bash
export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_xxxx"
export DEEPSEEK_API_KEY="sk-xxxx"
export DEEPSEEK_MODEL="deepseek-v4-flash"  # optional, this is the default
./github-mcp-server stdio
```

When the server starts, you'll see:
```
INFO "starting server" version=... host=... readOnly=false lockdownEnabled=false
INFO "DeepSeek AI integration enabled" model=deepseek-v4-flash
GitHub MCP Server running on stdio
```

### HTTP Mode

```bash
export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_xxxx"
export DEEPSEEK_API_KEY="sk-xxxx"
./github-mcp-server http --port 8082
```

---

## 🤖 MCP Client Configuration

### VS Code / Copilot

```json
{
  "servers": {
    "github-deepseek": {
      "type": "stdio",
      "command": "/path/to/github-mcp-server",
      "args": ["stdio"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}",
        "DEEPSEEK_API_KEY": "${input:deepseek_key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "github_token",
      "description": "GitHub Personal Access Token",
      "password": true
    },
    {
      "type": "promptString",
      "id": "deepseek_key",
      "description": "DeepSeek API Key",
      "password": true
    }
  ]
}
```

### Claude Desktop

```json
{
  "mcpServers": {
    "github-deepseek": {
      "command": "/path/to/github-mcp-server",
      "args": ["stdio"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxx",
        "DEEPSEEK_API_KEY": "sk-xxxx"
      }
    }
  }
}
```

### Cursor

```json
{
  "mcpServers": {
    "github-deepseek": {
      "command": "/path/to/github-mcp-server",
      "args": ["stdio"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxx",
        "DEEPSEEK_API_KEY": "sk-xxxx"
      }
    }
  }
}
```

---

## 🛠️ AI-Powered Tools

### `ai_summarize_content`

Analyze and summarize any GitHub content using DeepSeek AI.

**Input:**
- `content` (required): Text content from GitHub (issue body, PR description, code, etc.)
- `goal` (optional): What to do with the content. Default: "summarize"
- `maxWords` (optional): Maximum words in output. Default: 500, Range: 50-2000

**Example goals:** "summarize", "identify key points", "find bugs", "explain this code", "extract action items", "check for security issues"

### `ai_code_review`

Review code for bugs, security, performance, and style issues.

**Input:**
- `code` (required): Source code to review
- `language` (optional): Programming language (e.g., "go", "python", "javascript")
- `context` (optional): Additional context about what the code should do

### `ai_generate_description`

Generate GitHub content like PR descriptions, issue bodies, README sections.

**Input:**
- `prompt` (required): What to generate (e.g., "Write a PR description for fixing a login bug")
- `contentType` (optional): Type of content - `pr_description`, `issue_body`, `readme`, `release_notes`, `commit_message`, or `general`

---

## ⚙️ Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `GITHUB_PERSONAL_ACCESS_TOKEN` | Yes | - | GitHub PAT for API access |
| `DEEPSEEK_API_KEY` | No | - | DeepSeek API key for AI tools |
| `DEEPSEEK_MODEL` | No | `deepseek-v4-flash` | DeepSeek model to use |
| `DEEPSEEK_BASE_URL` | No | `https://api.deepseek.com` | DeepSeek API base URL |
| `GITHUB_HOST` | No | `github.com` | GitHub hostname (for GHE) |
| `GITHUB_READ_ONLY` | No | `false` | Restrict to read-only tools |
| `GITHUB_LOCKDOWN_MODE` | No | `false` | Enable lockdown mode |

---

## 📊 Toolset Configuration

The server supports selective toolset enabling via the `--toolsets` flag:

```bash
# Enable specific toolsets + AI tools
./github-mcp-server stdio --toolsets=default,deepseek_ai

# Enable only AI tools
./github-mcp-server stdio --toolsets=deepseek_ai

# Enable all tools including AI
./github-mcp-server stdio --toolsets=all
```

The `deepseek_ai` toolset is automatically included when `DEEPSEEK_API_KEY` is set and no specific toolsets are configured.

---

## 🔧 Development

### Building

```bash
go build ./cmd/github-mcp-server/
```

### Running Tests

```bash
go test ./...
```

### Project Structure

```
.
├── cmd/github-mcp-server/   # Server entry point
├── internal/ghmcp/          # MCP server setup and initialization
├── pkg/
│   ├── deepseek/            # ✨ DeepSeek API client
│   ├── github/              # GitHub tools, resources, prompts
│   │   ├── deepseek_tools.go # ✨ AI-powered MCP tools
│   │   ├── tools.go          # Tool registration (AllTools)
│   │   └── ...
│   ├── inventory/           # Tool/resource/prompt registry
│   └── ...
└── docs/                    # Documentation
```

### Key Files Modified

| File | Change |
|------|--------|
| `pkg/deepseek/deepseek.go` | **NEW** - DeepSeek API client |
| `pkg/github/deepseek_tools.go` | **NEW** - AI-powered MCP tools |
| `pkg/github/tools.go` | Added DeepSeek tools to `AllTools()` |
| `internal/ghmcp/server.go` | Added DeepSeek client initialization |

---

## 📝 Original Features (from github/github-mcp-server)

This fork retains all features from the official GitHub MCP Server:

- **Repository Management**: Browse code, search files, analyze commits
- **Issue & PR Automation**: Create, update, manage issues and pull requests
- **CI/CD Intelligence**: Monitor Actions, analyze build failures
- **Code Security**: Code scanning, secret scanning, Dependabot alerts
- **Team Collaboration**: Discussions, notifications, projects
- **Remote & Local Server**: Both HTTP and stdio transport modes
- **Scope Filtering**: PAT scope-based tool filtering
- **Toolset Configuration**: Selective tool enabling
- **Read-Only & Lockdown Modes**: Security-focused configurations

---

## 📄 License

This project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.

Original project: [github/github-mcp-server](https://github.com/github/github-mcp-server)

---

*This README was generated by an AI agent (OpenHands) on behalf of the user.*

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ph7klw76](https://github.com/ph7klw76)
- **Source:** [ph7klw76/github-mcp-server2](https://github.com/ph7klw76/github-mcp-server2)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ph7klw76-github-mcp-server2
- Seller: https://agentstack.voostack.com/s/ph7klw76
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
