You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -865,6 +865,12 @@ The following sets of tools are available (all are on by default):
865
865
-`repo`: Repository name (string, required)
866
866
-`sha`: Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA. (string, optional)
867
867
868
+
-**list_repository_contributors** - List repository contributors
869
+
-`owner`: Repository owner (string, required)
870
+
-`repo`: Repository name (string, required)
871
+
-`page`: Page number for pagination (min 1) (number, optional)
872
+
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
873
+
868
874
-**list_releases** - List releases
869
875
-`owner`: Repository owner (string, required)
870
876
-`page`: Page number for pagination (min 1) (number, optional)
"description": "Get list of contributors for a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).",
7
+
"inputSchema": {
8
+
"properties": {
9
+
"owner": {
10
+
"description": "Repository owner",
11
+
"type": "string"
12
+
},
13
+
"page": {
14
+
"description": "Page number for pagination (min 1)",
15
+
"minimum": 1,
16
+
"type": "number"
17
+
},
18
+
"perPage": {
19
+
"description": "Results per page for pagination (min 1, max 100)",
Copy file name to clipboardExpand all lines: pkg/github/repositories.go
+70Lines changed: 70 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -183,6 +183,76 @@ func ListCommits(getClient GetClientFn, t translations.TranslationHelperFunc) (t
183
183
}
184
184
}
185
185
186
+
// ListRepositoryContributors creates a tool to get contributors of a repository.
187
+
funcListRepositoryContributors(getClientGetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
188
+
returnmcp.NewTool("list_repository_contributors",
189
+
mcp.WithDescription(t("TOOL_LIST_REPOSITORY_CONTRIBUTORS_DESCRIPTION", "Get list of contributors for a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).")),
echo"Testing list_repository_contributors for $OWNER/$REPO"
16
+
17
+
echo"{\"jsonrpc\":\"2.0\",\"id\":1,\"params\":{\"name\":\"list_repository_contributors\",\"arguments\":{\"owner\":\"$OWNER\",\"repo\":\"$REPO\"}},\"method\":\"tools/call\"}"| go run cmd/github-mcp-server/main.go stdio | jq .
0 commit comments