Feature Request: Add get_user tool to fetch a user profile by username
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu trong pkg/github/context_tools.go bằng cách so sánh get_me với lệnh gọi client.Users.Get hiện có. Thêm đầu vào username bắt buộc, đồng thời giữ nguyên phản hồi MinimalUser + UserDetails và siêu dữ liệu của công cụ users được mô tả trong issue. Được xem là hoàn tất khi công cụ gọi GET /users/{username} thông qua client đã xác thực và cung cấp hồ sơ được yêu cầu trên các môi trường GitHub.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
There is no tool to look up a specific GitHub user's profile by username. get_me only returns the authenticated user. search_users uses the Search API which returns a minimal user object (login, id, avatar) without profile details like name, email, bio, company, etc.
Use case
I'm building a skill that adds Co-authored-by trailers to git commits. To properly attribute a collaborator, I need their display name and numeric ID from their GitHub profile to construct the trailer:
Co-authored-by: Jane Smith <12345+janesmith@users.noreply.github.com>
Currently this requires falling back to gh api users/{username}, but I want the skill to work in Claude Desktop too where the gh CLI may not be available — only MCP tools. A get_user tool would close this gap.
Workarounds and their limits
gh api users/{username}— works but requires theghCLI, which isn't available in Claude Desktop- WebFetch to
api.github.com/users/{username}— works for public GitHub.com users without auth, but doesn't cover enterprise managed users (EMU) or GHES, which require authentication
A proper get_user tool using the server's authenticated client would work across all environments including enterprise.
Proposed solution
A get_user tool that accepts a required username parameter and calls GET /users/{username}. Returns MinimalUser with Details — the same response shape as get_me.
The Go client already supports this: client.Users.Get(ctx, username) is the same call get_me uses, just with a non-empty username string.
Implementation notes
Nearly identical to get_me in pkg/github/context_tools.go:
- Add a
usernameinput parameter (required string) - Pass it to
client.Users.Get(ctx, username)instead of"" - Return the same
MinimalUser+UserDetailsresponse - Toolset:
users - Scope:
read:user - ReadOnly:
true
Edited to add - this issue was co-authored by Claude and reviewed by me.
- Ngôn ngữ chính
- Go
- Star
- 33.1k
- Fork
- 5k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 27
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của github/github-mcp-server
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
github/github-mcp-server#3235 ·
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
github/github-mcp-server#3042 · 2 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
github/github-mcp-server#2803 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
github/github-mcp-server#2740 ·
Tất cả issue của github/github-mcp-server
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/registry#1654 ·
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenNSW/nsw-srilanka#497 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
milvus-io/birdwatcher#545 ·
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
kubernetes-sigs/prow#953 · 1 bình luận ·