github_user_repos
Retrieve GitHub user repositories to analyze development activity and project contributions for open-source intelligence gathering.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | GitHub username |
Implementation Reference
- src/tools/github.ts:39-47 (handler)Implementation of the logic for fetching GitHub user repositories.
async getUserRepos(username: string): Promise<any[]> { try { return await this.fetch<any[]>(`users/${username}/repos`, { method: "GET", headers: this.getHeaders(), }, { per_page: 100, sort: "updated" }); - src/index.ts:364-373 (registration)Registration of the github_user_repos tool in the MCP server.
server.tool( "github_user_repos", { username: z.string().describe("GitHub username") }, async ({ username }) => { const result = await ghClient.getUserRepos(username); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );