Skip to main content
Glama
README.md
# Gitea MCP Server

A Model Context Protocol (MCP) server for interacting with Gitea.
This package is designed to be used as a standalone server or imported by a gateway.

## 🛠 Capabilities

*   **Issues:** List, search, create, update, comment.
*   **Repositories:** List repos, branches, labels.
*   **Files:** Read file content.
*   **Pull Requests:** Create PRs.
*   **Analysis:** Analyze issues with AI prompts.
*   **Shell:** Execute safe git commands in WSL (`run_safe_shell`).

## 🔒 Security

*   **Allowed Paths:** Restricted via `MCP_ALLOWED_PATHS` environment variable.
*   **Git Safety:** Only whitelisted git subcommands are allowed. Global flags are blocked.

## 📦 Installation

```bash
npm install @boringstudio_org/gitea-mcp
```

## 🚀 Usage

### Via NPX (Recommended)
```bash
# Configure environment variables
export GITEA_TOKEN=your_token
# Optional: Defaults to https://git.your-instance.com/api/v1
export GITEA_API_URL=https://git.your-instance.com/api/v1

# Cloudflare Access (Optional)
# If your Gitea instance is behind Cloudflare Zero Trust
export CF_ID=your_cf_client_id
export CF_SECRET=your_cf_client_secret

# Run
npx @boringstudio_org/gitea-mcp
```

### Standalone (From Source)
```bash
# Install dependencies
npm install

# Configure .env
echo "GITEA_TOKEN=..." > .env
echo "GITEA_API_URL=..." >> .env
# Optional: Cloudflare Access
echo "CF_ID=..." >> .env
echo "CF_SECRET=..." >> .env

# Run
node index.js
```

### As a Library
```javascript
import { runGiteaServer } from "@boringstudio_org/gitea-mcp";
// Ensure environment variables are set
runGiteaServer().catch(console.error);
```

## 📝 License

MIT

TDQS

B3.1/5.0

Scored across 11 tools

Disambiguation5/5

Each tool targets a distinct resource and action, with no overlap. For example, 'list_repos', 'list_issues', and 'list_labels' clearly differentiate repositories, issues, and labels. 'search_issues' and 'list_issues' serve different purposes (search vs. listing).

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern (e.g., 'list_repos', 'create_issue', 'update_issue'). The one exception is 'run_safe_shell', which uses an adjective between verb and noun, breaking the pattern slightly.

Tool Count5/5

With 11 tools, the set is well-scoped for a Gitea MCP server. It covers essential operations like repository listing, issue management (CRUD, search, labels, comments), branch listing, and pull request creation without being excessive.

Completeness3/5

The tool set covers issue workflows well (create, read, update, comment, search, labels) but misses repository creation/deletion and pull request operations beyond creation (e.g., listing, merging). Branch management is limited to listing, and the 'run_safe_shell' tool is an outlier.

Maintenance

ActivityInactive
ResponsivenessNo issues