Token导航 LogoToken导航TokenDH.com
Lite GitHub MCP Server logo
开发工具stdio官方级别未说明来源级核验

Lite GitHub MCP Server

MCP Server

一个轻量级、高效的GitHub MCP服务器,提供CLI优先的方法,用于GitHub工具调用和管理。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
GitHub工具开发工具PythonCursor命令行工具Cursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

gsornsen

提供方

gsornsen

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uvx lite-github-mcp

详细介绍

Lite GitHub MCP 服务器

![CI](https://github.com/gsornsen/lite-github-mcp-server/actions/workflows/ci.yml) ![CodeQL](https://github.com/gsornsen/lite-github-mcp-server/actions/workflows/codeql.yml) ![codecov](https://codecov.io/gh/gsornsen/lite-github-mcp-server) ![License: MIT](LICENSE) ![Python](pyproject.toml)

一个针对GitHub的极简、上下文高效的MCP服务器,采用命令行界面(CLI)优先的方法。

要求

  • Python 3.10及以上版本
  • 已安装 git 和 gh CLI(用于后续里程碑)

快速入门

# Install uv (https://github.com/astral-sh/uv)
# Then setup dev env
just setup

# Run tests
just test

# Run server
just run

# Format and lint
just fmt && just lint

使用 uvx 运行(无需本地检出)

# One-off run of the MCP server from PyPI using uvx
uvx lite-github-mcp

# CLI client (tools introspection and tool calls)
uvx lite-github-mcp-cli tools
uvx lite-github-mcp-cli call gh.ping

Open WebUI 集成(MCP)

  • 使用MCP编排器(mcpo):将mcpo指向命令 uvx lite-github-mcp
# Example mcpo config snippet
servers:
  github:
    command: ["uvx", "lite-github-mcp"]
  • 不使用mcpo:如果您的Open WebUI支持直接配置MCP命令,请将其设置为 uvx lite-github-mcp
# Example: environment-driven configuration (adjust to your Open WebUI setup)
export MCP_SERVER_GITHUB_COMMAND="uvx lite-github-mcp"

包装和构建

  • 使用UV的构建后端(uv_build) 用于 PEP 517 构建,通过 uv build
  • 开发依赖项通过 [dependency-groups] 并通过(某种方式)安装 uv sync --group dev
  • 在GitHub Actions中,发布创建时会自动进行发布。

Docker(注:Docker是一个用于开发、部署和运行应用程序的开源平台,它允许开发者将应用程序及其依赖打包到一个可移植的容器中,从而确保应用程序在不同环境中都能一致地运行。)

just docker_build
just compose_up
# ... use it ...
just compose_down

注释

  • 目标支持 Python 3.10+; uvloop 在Linux上仍然是可选的。
  • gh.pinggh.whoami 可供使用; whoami 返回一个最小的认证状态。
  • 有关FastMCP的概念和最新的API详细信息,请参阅MDX文档:https://github.com/jlowin/fastmcp/tree/main/docs

可观测性(可选)

  • 工具调用的结构化JSON日志记录(可选启用):
# Enable lightweight timing logs (one line per tool call)
LGMCP_LOG_JSON=1 just run
# or
LGMCP_LOG_JSON=1 uv run python -m lite_github_mcp.server

发射场: toolarg_keysduration_ms,可选 error

  • 缓存与ETag:
# Disk-backed cache using `diskcache` under XDG cache dir
# ETag-based conditional requests are enabled for GitHub REST via gh api
# Cache TTLs: lists=30s, meta=5m, blobs=1h
# Automatic rate-limit backoff with Retry-After respected (bounded retries)
  • 上下文预算检查:

- CI 对工具注册表实施预算限制(包括字节和代币估算) - 本地实时测试(模式感知):

# Run only the marked context test and print a brief report
just test_context
# Or with pytest directly
uv run pytest -q -m context_budget -s

你会看到一个简短的报告,类似:

Context budget (tool registry):
  minimal bytes: 1084 / 8192 (13.2%)
  full bytes:    5628 / 32768 (17.2%)
  tokens:        1407 / 4000 (35.2%)

CLI 示例(分页和范围)

# List tools
# Mono-tool by default; set multi-tool mode via env:
# LGMCP_MULTI_TOOLS=1 just cli_tools
just cli_tools

# Trees (limit, cursor)
just cli_call gh.file.tree '{"repo_path": ".", "ref": "HEAD", "limit": 3}'
# Use the returned next_cursor to fetch next page
just cli_call gh.file.tree '{"repo_path": ".", "ref": "HEAD", "limit": 3, "cursor": ""}'

# Search (limit, cursor)
just cli_call gh.search.files '{"repo_path": ".", "pattern": "FastMCP", "limit": 2}'
# Restrict search to paths
just cli_call gh.search.files '{"repo_path": ".", "pattern": "TODO", "paths": ["src/", "docs/"]}'

# Blob ranges (offset, max_bytes)
just cli_call gh.file.blob '{"repo_path": ".", "blob_sha": "", "max_bytes": 128, "offset": 0}'

# PRs (ids-first, meta, timeline)
just cli_call gh.pr.list '{"repo": "gsornsen/lite-github-mcp-server", "state": "open", "limit": 10}'
just cli_call gh.pr.get '{"repo": "gsornsen/lite-github-mcp-server", "number": 3}'
just cli_call gh.pr.timeline '{"repo": "gsornsen/lite-github-mcp-server", "number": 3, "limit": 5}'

目录标签

目录标签

GitHub工具开发工具PythonCursor命令行工具本地部署CLI工具服务器管理

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP