Skip to main content
Glama
kmosoti

github-projects

by kmosoti

github-projects

一个用于 Claude Code 和 Codex 的插件:Pydantic v2 模型、PEP 544 协议,以及一个用于管理 GitHub Projects v2 看板(例如 github.com/users/<owner>/projects/<n>)的 MCP 服务器 —— 并对草案 HTTP QUERY 方法提供一流支持。

Architecture

server.py      MCP server (mcp SDK v2, stdio) — 19 tools, structured output
   │  depends on
protocols.py   ProjectsBackend / GraphQLTransport (runtime-checkable Protocols)
   │  implemented by
service.py     GitHubProjectsService — GraphQL over the transport,
               project-id + field caching, string→typed field-value coercion
graphql.py     GraphQL documents (works for both user and org owners)
http.py        QueryClient — HTTP QUERY (draft-ietf-httpbis-safe-method-w-body)
               with per-origin capability memory and POST fallback
models.py      Frozen Pydantic v2 models, __typename-discriminated unions
  • MCP 层仅依赖 ProjectsBackend 协议,因此后端可替换,测试在结构上以假实现替代。

  • QueryClient 会乐观地发送 QUERY,记录 Accept-Query 通告,在传输错误时重试一次(QUERY 是安全且幂等的),并在 405/501 时按来源永久回退到 POST —— 因此它目前即可用于 GitHub,并在 GitHub 推出 QUERY 支持时自动升级。

Setup

主要运行时是 CPython 3.14.7 自由线程版(3.14.7t)。它还需要 gh CLI 使用 project 作用域 进行身份验证:

gh auth refresh -s project      # grants read + write for Projects v2

令牌从 GITHUB_TOKEN / GH_TOKEN 获取,否则使用 gh auth token

uv sync
uv run pytest             # 32 tests
uv run gh-projects-mcp    # run the server on stdio

在 Claude Code 和 Codex 中使用

从仓库根目录:

# Claude Code (registered user-wide)
claude mcp add --scope user github-projects -- uv --directory "$PWD" run gh-projects-mcp

# Codex
codex mcp add github-projects -- uv --directory "$PWD" run gh-projects-mcp

插件清单位于 .claude-plugin/plugin.json(通过 ${CLAUDE_PLUGIN_ROOT} 声明 MCP 服务器)和 .codex-plugin/plugin.json;面向两个主机的使用技能位于 skills/github-projects/SKILL.md

Tools

工具

用途

list_projects

列出用户/组织的看板(可选搜索)

get_project

按所有者 + 编号获取看板

list_fields

字段,包括单选选项和迭代

list_items

带内容 + 字段值的项,可选通过已保存视图的筛选查询进行评估

create_project / update_project

创建看板;编辑标题/README/可见性/关闭状态

add_item

通过 URL 添加 issue/PR

add_draft_issue

添加草稿 issue

update_field_value

设置字段;值是由字段类型强转的字符串 —— 单选和迭代按名称匹配(Status"Done"

clear_field_value

清除字段

archive_item / delete_item

归档或移除项

plan_project / apply_project

幂等的期望状态对账:字段和选项别名、经语义验证的叶/容器视图、有序的列、显式停用、项元数据、epic/子 issue 层级、原生 issue 依赖关系,以及遗留依赖描述清理

sprint_board

一个迭代的状态列视图(或所有项 + 未计划分组)

epic_breakdown

按 epic 汇总完成度,来自原生子 issue 层级

list_views

已保存视图,包含名称、布局、筛选器和有序可见字段

post_status_update / list_status_updates

项目的长期上下文轨迹

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Persistent context for Claude. Your AI always knows your projects and next actions across sessions.

  • Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kmosoti/github-projects'

If you have feedback or need assistance with the MCP directory API, please join our Discord server