Add repository traffic/insights tools (views, clones, referrers, paths)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 76/100
Direção de pesquisa
Comece lendo as ferramentas existentes no toolset repos e os métodos fixados do go-github ListTrafficViews, ListTrafficClones, ListTrafficReferrers e ListTrafficPaths. Adicione as quatro ferramentas somente leitura com os parâmetros informados e o requisito de escopo de repositório; depois, verifique se views e clones aceitam detalhamentos por dia ou semana, enquanto referrers e paths não aceitam.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the feature or problem you'd like to solve
The server has no way to read a repository's traffic/insights data. There are no tools wrapping the four traffic endpoints:
| Proposed tool | GitHub endpoint | Returns |
|---|---|---|
get_traffic_views |
GET /repos/{owner}/{repo}/traffic/views |
Page views + unique visitors (14-day, daily or weekly) |
get_traffic_clones |
GET /repos/{owner}/{repo}/traffic/clones |
Git clones + unique cloners (14-day, daily or weekly) |
get_traffic_referrers |
GET /repos/{owner}/{repo}/traffic/popular/referrers |
Top 10 referring sites |
get_traffic_paths |
GET /repos/{owner}/{repo}/traffic/popular/paths |
Top 10 most-visited paths |
Today an agent can read stars and forks but has no view into whether a repo is actually being visited or cloned, which is the primary signal for measuring adoption and reach of a project. This is a read-only capability.
Proposed solution
Add the four tools above under the existing repos toolset, each ReadOnlyHint: true.
The implementation is thin because the pinned go-github client already exposes all four methods (RepositoriesService.ListTrafficViews, ListTrafficClones, ListTrafficReferrers, ListTrafficPaths), so no new HTTP plumbing is needed. The views/clones tools take an optional per parameter (day | week) mapping to TrafficBreakdownOptions; referrers/paths take just owner/repo.
One note on access: GitHub gates these endpoints behind push access to the repo (for GitHub Apps, the repository Administration: Read permission), so the tools should be annotated to require the repo scope rather than treated as public-read, even though the endpoints exist on public repos.
I'm happy to open a PR for this if the capability is something you'd accept.
Example prompts or workflows (for tools/toolsets only)
- "How many unique visitors and clones did
owner/repoget in the last two weeks?" - "Where is traffic to my repo coming from? Show me the top referrers."
- "Which pages/paths in
owner/repoare people actually viewing?" - "Compare views vs. clones week over week for
owner/repoand tell me if adoption is trending up." - "Build me a weekly adoption report for my repo: stars, forks, views, unique visitors, and clones." (traffic is the missing piece today; stars/forks are already covered)
Additional context
Traffic data has a 14-day rolling retention window on GitHub's side, so these tools are especially useful to agents that snapshot the data on a schedule for longer-term trend tracking.
- Linguagem predominante
- Go
- Estrelas
- 33.1k
- Forks
- 5k
- Merge médio
- 2d 1h
- PRs com merge (30d)
- 25
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/github-mcp-server
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
github/github-mcp-server#3235 ·
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
github/github-mcp-server#3042 · 2 comentários ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/github-mcp-server#3032 · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
github/github-mcp-server#2803 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
github/github-mcp-server#2740 ·
Todas as issues de github/github-mcp-server
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
bug group: validation priority: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
codecheckers/chekhov#51 ·
-
Creating worktree from an existing remote branch with a slash in it, has unexpected behaviour Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100