214 Commits

Author SHA1 Message Date
JoannaaKL 28b868dad4 Add in memory cache for lockdown mode (#1416)
* Apply lockdown mode to issues and pull requests

* Add cache

* Unlock in defer

* Add muesli/cache2go

* [WIP] Replace custom cache in lockdown.go with cache2go struct (#1425)

* Initial plan

* Replace custom cache with cache2go library

- Added github.com/muesli/cache2go dependency
- Replaced custom map-based cache with cache2go.CacheTable
- Removed manual timer management (scheduleExpiry, ensureEntry methods)
- Removed timer field from repoAccessCacheEntry struct
- Updated GetRepoAccessInfo to use cache2go's Value() and Add() methods
- Updated SetTTL to flush and re-add entries with new TTL
- Used unique cache names per instance to avoid test interference
- All existing tests pass with the new implementation

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Final verification complete

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Use muesli for cache

* Make RepoAccessCache a singleton (#1426)

* Initial plan

* Implement RepoAccessCache as a singleton pattern

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Complete singleton implementation and verification

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Remove cacheIDCounter as requested

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>

* Update mutexes

* .

* Reuse cache

* .

* .

* Fix logic after vibe coding

* Update docs

* .

* Refactoring to make the code pretty

* Hide lockdown logic behind shouldFilter function

* .

* Tests

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2025-11-21 10:34:51 +01:00
Ksenia Bobrova ec6afa776d Instruct LLM to use pull request template when creating PRs (#1442) 2025-11-19 11:47:31 +01:00
Ksenia Bobrova f3b9a63311 Report error when API silently fails to add review comment (#1441) 2025-11-19 10:11:17 +01:00
SangheeSon 2f64ac0c21 Add discussion metadata fields to get_discussion tool (#1305)
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
* Add state metadata fields to get_discussion tool

Fixes #1303

The get_discussion tool was missing important state metadata that's
already available in get_issue. Added four fields to provide complete
discussion status information:

- state: Current discussion state (OPEN/CLOSED)
- isAnswered: Whether the discussion has an accepted answer
- answeredAt: Timestamp when answer was provided
- answerChosenAt: Timestamp when answer was selected

Changed GetDiscussion to return a map instead of github.Discussion
struct since the go-github library doesn't include all these fields
in its type definition. This approach is consistent with other
functions in this codebase (ListDiscussions, GetDiscussionComments).

All tests pass and linter checks pass.

* Fix Discussion field mappings based on GitHub GraphQL API

Changes:
- Replace 'State' (doesn't exist) with 'Closed' (Boolean)
- Remove 'AnsweredAt' (doesn't exist)
- Keep 'IsAnswered' (verified to exist in GitHub GraphQL API)
- Use 'AnswerChosenAt' for answer timestamp

Updated both implementation and tests to match actual GitHub GraphQL schema.
All tests passing.

---------

Co-authored-by: tommaso-moro <tommaso-moro@github.com>
2025-11-17 10:20:39 +00:00
Tony Truong 88a594e76b improve response/feedback loop with better error messages (#1414) 2025-11-17 10:19:42 +01:00
Jonathan Otalora e95d8ee6fe addresses float64 to in64 feedback from copilot 2025-11-16 23:42:14 +01:00
Jonathan Otalora 1d6499d875 removes unused code 2025-11-16 23:42:14 +01:00
Jonathan Otalora bd7ca66505 updates mcp-server with latest google-go-github APIs 2025-11-16 23:42:14 +01:00
Jonathan c73f06fa29 bumps google/go-github to v79 2025-11-15 22:07:38 +01:00
Tom Elliott e9033462e1 projects: serialization & pagination updates (#1390)
* pagination, serialization updates

* projects: add server instructions (#1393)

* add server instructions

* Update instructions.go

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-14 11:25:35 +00:00
JoannaaKL 2e5418093f Add lockdown mode to filter issue (#1371)
* Add lockdown mode to filter issue

* Update flag name

* Update pkg/lockdown/lockdown.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Merge two graphql queries into one

* Don't use Issue.Repository

* Add function signature

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-10 17:01:21 +01:00
Natalie Dunbar e26cf427ef Add Repository Tree Navigation Tool (#1164)
* add repo nav tool

* comment responses

* move into git.go

* fix documentation

* Update pkg/github/git.go

Co-authored-by: Adam Holt <omgitsads@github.com>

* Fix undefined variable error in GetRepositoryTree

* Update git.go to use github.com/google/go-github/v77 for consistency with main branch

---------

Co-authored-by: Adam Holt <omgitsads@github.com>
2025-11-10 10:29:13 -05:00
Jonathan b68bec003d Update mcp server with latest google/go-github API (#1358)
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
* licences update from required CI build

* fixes licences

* implements new helpers to support google/go-github v77 API

* upgrades toolset to leverage google/go-github v77 with the exception of Update and Delete items

* refactor string conversion helpers

* reverts migration google/go-github GetProjectItem due to bug with the underlying library implementation

* additional refactoring for server helpers based on recent updates to google/go-github

* test updates based on underlying lib requirements

* resolves licences conflicts with script/licenses

* cleanup

* reduce change diff

* updates helper docs to reflect to methods

* upgrades delete projects item to google/go-github

* returns error from parsing string to int64

* improved OptionalBigIntArrayParam doc

* improves implementation for RequiredBigInt

* improves documentation for temporary fieldSelectionOptions struct
2025-11-07 17:31:17 +00:00
Jonathan cf0e05e300 Update to google/go-github@v77 (#1357)
* update to google/go-github@v77

* licences update from required CI build

* fixes licences

* fixes possible nil reference

* refresh licences due to recent conflicts

---------

Co-authored-by: Roberto Nacu <kerobbi@github.com>
2025-11-07 08:06:27 -08:00
JoannaaKL 6a39a39e6d Add html filtering (#1356)
* Add html content sanitizer

* Add basic html sanitization

* .

* Correct licenses and scripts to ignore vendor directory

* Use singleton

* Simplify
2025-11-05 12:49:49 +01:00
JoannaaKL 304f29a2fd Add basic content sanitizer (#1344) 2025-10-31 12:51:22 +01:00
Vidit Ostwal dc5381078a Added get gist tool (#1105)
* Added get gist tool

* adjust prompt

* update readme (autogen)

---------

Co-authored-by: tommaso-moro <tommaso-moro@github.com>
2025-10-30 10:47:01 +00:00
JoannaaKL 0b65b1be52 Update description (#1319)
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
2025-10-27 16:21:50 +01:00
JoannaaKL 2592447223 Dont pass milestone if not provided (#1318) 2025-10-27 15:39:44 +01:00
Jonathan 6f5040734a Updates github-mcp-server to go-github/v76 (#1289)
* updates github-mcp-server to go-github/v76

* updates license files

* refactors ListProjects to make use of
google/go-github ProjectsService

* refactors GetProject to make use of google/go-github ProjectsService

* declaring commit without a pointer

* cleanup additional commit pointer

---------

Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
2025-10-27 13:53:53 +01:00
Tom Elliott 70cb7375e5 projects: update fields and prompt (#1292)
* update fields and prompt

* update snapshots

* update docs

* pr feedback

* update snapshots

* update docs
2025-10-24 10:47:13 +02:00
Tom Elliott af2e93b846 projects: add item field support (#1282)
* add fields

* generate docs

* pr feedback

---------

Co-authored-by: Tom Elliott <tmelliottjr@lcjr0246td.lan>
2025-10-23 15:32:00 +02:00
Ksenia Bobrova 3ba8d4a122 Issues consolidation (#1211)
* Issues consolidation

* Issues consolidation

* Clarify get_review_comments description

* Add get_comments method

* Formatting fixes

* Clarify tool description

* Clarify tool descriptions
2025-10-23 13:27:07 +02:00
Tony Truong c01959536b Split up tooling utility (#1273)
Docker / build (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
* split up functionality for reusability

* Update pkg/github/tools.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 15:57:39 +02:00
Tony Truong 66fabb7a8d Adding default toolset as configuration (#1229)
* add toolset default to make configuration easier

* fix readme

* adding transformer to cleanly handle special toolsets

* cleaning code

* fixing cli message

* remove duplicated test

* Update internal/ghmcp/server.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update internal/ghmcp/server_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* adding error message for invalid toolsets

* fix merge conflict

* add better formatting

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-15 18:20:14 +02:00
Tony Truong 99acea6ca1 Fix subdomain isolation URL parsing (#1218)
* adding better response

* adding check for subdomain isolation and return raw resp for better better llm response

* adding subdomain for uploads too

* remove unnecessary comments

* better error message

* fix linter
2025-10-15 13:21:37 +02:00
Ksenia Bobrova e5522fca31 Consolidate pull request review tools (#1192)
* Consolidate pull request review tools

* Prompt tweaks + deleting snap

* Server instructions change

* Add enums

* Remove excessive mentions of event parameter

* Doc update
2025-10-10 16:56:01 +02:00
Tony Truong f9343e62fd rename tooling (#1198)
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
* rename tooling

* fix double tool
2025-10-09 18:28:09 +02:00
JoannaaKL 5c61abeb31 Add update project item tool (#1194)
* Add update project item tool

* Update docs

* Add tests and tool snaps

* Remove unnecessary comments

* Formatting and fixes

* Extract error messages to const

* Fix json tag

* Rename field

* Update params

* Update test

* Update tool example
2025-10-09 17:44:55 +02:00
Tony Truong bbfc44c552 adding labels tools (#1193)
* adding labels tools

* fixing ci

* update toolsnap

* fixing lint

* changing comment

* fix title
2025-10-09 11:24:18 +02:00
Roberto Nacu 16b43c9d44 Add sort and order parameters to search_repositories tool (#1191)
* add sort and order params

* test adding server instructions for sorting

* improve server instructions

* reorder
2025-10-09 10:11:12 +01:00
Roberto Nacu dee59272ae Fix binary files retrieval (#1183)
* tighten content filtering logic

* add pdf retrieval test case

* add application/xml check
2025-10-07 16:08:01 +01:00
Tommaso Moro 94b3d7278e Revert "Add flexibility around server instructions for search-related tools (…" (#1187)
This reverts commit 8a69a5c35f.
2025-10-07 10:14:05 +01:00
Ksenia Bobrova d0d4b0e5cb Consolidating pull requests get tools (#1172)
* Consolidating tools draft

* Consolidate pullrequest tools

* Prompt tweaks

* Fixes
2025-10-07 11:05:22 +02:00
Tommaso Moro 8a69a5c35f Add flexibility around server instructions for search-related tools (#1181)
* make instructions for flexible around search tools

* swap sections
2025-10-06 16:34:07 +01:00
Tony Truong bf0d62e4a6 Adding default toolset grouping (#1159)
* adding default toolset group, splitting up stargazers from repos

* adding structs for toolset group metadata

* update readme

* refactor the readme

* fix lint

---------

Co-authored-by: Ksenia Bobrova <almaleksia@github.com>
2025-10-06 17:07:25 +02:00
JoannaaKL 6d01897ccd Remove update_project_item tool (#1167)
* Remove update_project_item tool

* Lint
2025-10-01 12:13:26 +02:00
JoannaaKL 6793b9d376 Add tools to add, update and delete project items (#1152)
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
* Add add_project_item tool

* Add tools to update and delete project items

* Update pkg/github/projects.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/projects.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add tests

* Lint the code

* Fix req params

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-30 10:08:15 +02:00
JoannaaKL 088560113c Add tool for project fields and items (#1145)
* Add get project fields tool

* Data types

* Docs

* Update projectNumber's type

* Add list_project_items tool

* Add get_project_item tool

* Return minimal project

* Remove unused per_page
2025-09-29 15:43:00 +02:00
JoannaaKL abf7c478ac Add tools for Projects V2 (#1114)
* Add get_project tool

* Remove pagination for now

* Fix url formatting

* Minor tweaks

* Add list project fields tool

* Wording
2025-09-26 11:36:35 +02:00
Ola Hungerford 0a1d6dbd36 Add server instructions based on toolsets (#1091)
* Add instruction generation for enabled toolsets and corresponding tests

* Refactor instruction generation to always include base and context management instructions

* Refactor base instruction for clarity and adjust context management instruction formatting

* Simplify changes for now

* Remove unused toolset instructions and simplify test cases for clarity

* Add test cases for issues, notifications, and discussions toolsets in instruction generation

* Update base instruction and test expectations for clarity on tool selection and context management

* Add support for disabling instructions via environment variable

* Clarify PR review workflow instruction for consistency

* Apply suggestions from code review

Co-authored-by: Ksenia Bobrova <almaleksia@github.com>

* Refactor instruction generation and testing for clarity and consistency

---------

Co-authored-by: Ksenia Bobrova <almaleksia@github.com>
2025-09-25 13:27:29 +02:00
JoannaaKL 23630b3744 Add ListProjects tool (#1113)
* Bump go-viper/mapstructure

* Update github.com/go-viper/mapstructure/v2 version in licenses

* Add tool to list projects

* Fix ordering
2025-09-22 16:48:51 +02:00
Copilot 010cf9b33a Add starred repository support to GitHub MCP server (#1078)
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
* Initial plan

* Initial exploration and planning for starred repository support

Co-authored-by: tonytrg <40869903+tonytrg@users.noreply.github.com>

* Implement starred repository functionality with comprehensive tests

- Add ListStarredRepositories tool for listing starred repos
- Add StarRepository tool for starring repositories
- Add UnstarRepository tool for unstarring repositories
- Update MinimalRepository struct with StarredAt field
- Add comprehensive test coverage for all new functionality
- Register new tools in the repos toolset

Co-authored-by: tonytrg <40869903+tonytrg@users.noreply.github.com>

* Update README documentation with starred repository tools

- Add list_starred_repositories tool documentation
- Add star_repository tool documentation
- Add unstar_repository tool documentation
- Include comprehensive parameter descriptions for all new tools

Co-authored-by: tonytrg <40869903+tonytrg@users.noreply.github.com>

* Add starred repository support to GitHub MCP server

Co-authored-by: tonytrg <40869903+tonytrg@users.noreply.github.com>

* remove starredat from minimal view

* update descriptions

* remove bin

* dont commit the binary

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tonytrg <40869903+tonytrg@users.noreply.github.com>
Co-authored-by: tonytrg <tonytrg@github.com>
2025-09-12 16:11:15 +02:00
Roberto Nacu b6486a3817 Add specifying state change reason to update_issue tool (#1073)
* add state_reason param

* add close as duplicate functionality

* refactor and improve tests

* fix state reason validation logic and update tests

* move state and state reason handling to gql

* fix marshal failures

* address latest feedback
2025-09-12 16:04:00 +02:00
Matt Holloway 0c5cfc3853 Add return ID to CRUD tools (#1074)
* add return ID to crud tools

* Update pkg/github/gists.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/gists.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix gist id to string conv

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-11 09:53:00 +01:00
Tony Truong 9db2e17204 Updating tool get_pull_request_comments -> get_pull_request_review_comments (#1062)
* update get_pull_request_comments to get_pull_request_review_comments to signify difference

* fix remaining old references

* cleanup dangling tool snap
2025-09-09 13:26:22 +02:00
Matt Holloway 09deac45d4 initial org repo create support (#1023)
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
2025-09-02 11:30:13 +01:00
Matt Holloway 358a415081 Add minimal response to CRUD tools, repositories and search toolsets (#988)
* add comprehensive minimal response where appropriate

* remove unneeded comments

* remove incorrect diff param

* update docs

* rm comment

* Update pkg/github/repositories.go

Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>

* update toolsnaps and docs

* change minimal_output to use new OptionalBoolParamWithDefault

* Update pkg/github/repositories.go

Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>

* refactor minimal conversion funcs to minimal_types.go

* consolidate response structs and remove unneeded message field

* consolidate response further

* remove CloneURL field

* Update pkg/github/repositories.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/server.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix undefined

* change incorrect comment

* remove old err var declaration

* Update pkg/github/repositories.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix syntax issue

* update toolsnaps

---------

Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-01 18:13:36 +01:00
Tommaso Moro 0418808647 Change role from "system" to "user" in prompt messages for AssignCodingAgentPrompt and IssueToFixWorkflowPrompt. Role "system" is not allowed by Claude Code in MCP provided prompt (allowed only role "user" and "assistant") (#941)
License Check / license-check (push) Has been cancelled
Docker / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
Co-authored-by: 0xGosu <0xGosu@gmail.com>
2025-08-21 23:20:26 +01:00
Jurre d03072f1a9 Repository security advisories (#925)
* Add support for listing repo level security advisories

* Add support for listing repo security advisories at the org level
2025-08-21 15:20:20 +02:00