npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gitea-server-mcp

v1.0.0

Published

Custom MCP server for Gitea operations

Readme

gitea-server-mcp

Gitea MCP 服务器 — 让 AI 编程助手直接操作 Gitea 仓库、Issues、Pull Requests 等。

安装

npm install -g gitea-server-mcp

前置条件

在 Gitea 上生成一个 Access Token:

  1. 打开 Gitea → 右上角头像 → 设置应用
  2. 管理 Access Token 区域,输入 Token 名称(如 mcp
  3. 勾选需要的权限(建议:read:repository, write:repository, read:issue, write:issue, read:user
  4. 生成并复制 token

配置

Claude Code

claude mcp add --transport stdio --scope user gitea \
  --env GITEA_URL=https://你的gitea域名 \
  --env GITEA_TOKEN=你的token \
  -- npx -y gitea-server-mcp

Cursor / 其他 MCP 客户端

.cursor/mcp.json 或对应配置文件中添加:

{
  "mcpServers": {
    "gitea": {
      "command": "npx",
      "args": ["-y", "gitea-server-mcp"],
      "env": {
        "GITEA_URL": "https://你的gitea域名",
        "GITEA_TOKEN": "你的token"
      }
    }
  }
}

本地开发

git clone <your-repo>
cd gitea-server-mcp
npm install
node index.js

可用工具

| 工具 | 说明 | |---|---| | 仓库 | | | gitea_list_repos | 搜索/列出可访问的仓库 | | gitea_get_repo | 获取仓库详情 | | gitea_create_repo | 创建新仓库 | | gitea_search_repos | 搜索仓库 | | gitea_list_my_repos | 列出当前用户的仓库 | | Issue | | | gitea_list_issues | 列出仓库 Issues | | gitea_get_issue | 获取单个 Issue 详情 | | gitea_create_issue | 创建 Issue | | gitea_update_issue | 更新 Issue | | Pull Request | | | gitea_list_pull_requests | 列出仓库 PRs | | gitea_get_pull_request | 获取单个 PR 详情 | | gitea_create_pull_request | 创建 PR | | 文件 | | | gitea_get_file | 获取仓库文件内容 | | gitea_create_file | 创建或更新仓库文件 | | 其他 | | | gitea_list_branches | 列出分支 | | gitea_list_commits | 查看提交历史 | | gitea_list_releases | 列出 Releases | | gitea_get_user | 获取当前用户信息 |

环境变量

| 变量 | 必填 | 说明 | |---|---|---| | GITEA_URL | 是 | Gitea 实例地址,如 https://gitea.example.com | | GITEA_TOKEN | 是 | Gitea Access Token |

安全性

  • Token 仅通过环境变量传入,不会写入日志或配置文件
  • 所有请求通过 Gitea REST API 进行,Token 作为 HTTP Header 传递
  • 代码完全开源,可自行审计
  • 依赖仅 @modelcontextprotocol/sdk 一个核心库

技术栈

  • Node.js 18+
  • @modelcontextprotocol/sdk
  • Gitea REST API v1

License

ISC


gitea-server-mcp (English)

Gitea MCP Server — let AI coding assistants interact with Gitea repos, issues, pull requests, and more.

Installation

npm install -g gitea-server-mcp

Prerequisites

Generate an Access Token on your Gitea instance:

  1. Gitea → Avatar → Settings → Applications
  2. Under "Manage Access Tokens", enter a name (e.g. mcp)
  3. Select required scopes (recommend: read:repository, write:repository, read:issue, write:issue, read:user)
  4. Generate and copy the token

Configuration

Claude Code

claude mcp add --transport stdio --scope user gitea \
  --env GITEA_URL=https://your-gitea-domain \
  --env GITEA_TOKEN=your-token \
  -- npx -y gitea-server-mcp

Cursor / Other MCP Clients

Add to .cursor/mcp.json or equivalent:

{
  "mcpServers": {
    "gitea": {
      "command": "npx",
      "args": ["-y", "gitea-server-mcp"],
      "env": {
        "GITEA_URL": "https://your-gitea-domain",
        "GITEA_TOKEN": "your-token"
      }
    }
  }
}

Tools

| Tool | Description | |---|---| | Repos | | | gitea_list_repos | Search/list accessible repos | | gitea_get_repo | Get repo details | | gitea_create_repo | Create a new repo | | gitea_search_repos | Search repos | | gitea_list_my_repos | List current user's repos | | Issues | | | gitea_list_issues | List repo issues | | gitea_get_issue | Get a single issue | | gitea_create_issue | Create an issue | | gitea_update_issue | Update an issue | | Pull Requests | | | gitea_list_pull_requests | List repo PRs | | gitea_get_pull_request | Get a single PR | | gitea_create_pull_request | Create a PR | | Files | | | gitea_get_file | Get file content | | gitea_create_file | Create or update a file | | Others | | | gitea_list_branches | List branches | | gitea_list_commits | View commit history | | gitea_list_releases | List releases | | gitea_get_user | Get current user info |

Environment Variables

| Variable | Required | Description | |---|---|---| | GITEA_URL | Yes | Gitea instance URL, e.g. https://gitea.example.com | | GITEA_TOKEN | Yes | Gitea Access Token |

Security

  • Token is passed via environment variables only, never logged or saved to config files
  • All requests use Gitea REST API with token as HTTP header
  • Fully open source — audit the code yourself
  • Only one core dependency: @modelcontextprotocol/sdk

Tech Stack

  • Node.js 18+
  • @modelcontextprotocol/sdk
  • Gitea REST API v1

License

ISC