Commit Graph

245 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] be1fd87e6b Successfully migrated first 2 tools (PullRequestRead, CreatePullRequest) and fixed helper functions
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
License Check / license-check (push) Has been cancelled
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
2025-11-20 10:26:55 +00:00
copilot-swe-agent[bot] 4706206967 WIP: Partial migration of pullrequests toolset - imports and first 2 tools complete
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
2025-11-20 10:19:05 +00:00
Copilot 9bf905bba4 Migrate labels toolset to modelcontextprotocol/go-sdk (#1433)
* Initial plan

* Migrate labels toolset from mark3labs/mcp-go to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* re-add labels toolset

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
2025-11-19 17:33:32 +01:00
Copilot eaf411c1cd Migrate git toolset to modelcontextprotocol/go-sdk (#1432)
* Initial plan

* Migrate git toolset to modelcontextprotocol/go-sdk

- Remove //go:build ignore tag from git.go
- Update imports to use modelcontextprotocol/go-sdk
- Convert GetRepositoryTree tool schema to jsonschema format
- Update handler signature to use new generics pattern
- Update parameter extraction to use args map
- Replace mcp.NewToolResult* with utils package helpers
- Create dedicated git_test.go with updated test patterns
- Update toolsnaps for get_repository_tree

Related to #1428

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* re-add git toolset

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
2025-11-19 17:29:29 +01:00
Copilot 66e6ad5415 Migrate secret_scanning toolset to modelcontextprotocol/go-sdk (#1436)
* Initial plan

* Migrate secret_scanning toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* Enable secret_protection toolset in DefaultToolsetGroup

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* Don't assert without a testing.T

* just return the tool & handler

* use lowercase strings for the jsonschema types

* Add Close method to IOLogger to close underlying reader and writer

* Update cmd/github-mcp-server/generate_docs.go

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: Adam Holt <me@adamholt.co.uk>
Co-authored-by: Adam Holt <omgitsads@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
2025-11-19 16:43:03 +01:00
Copilot c06ace34cc Migrate security_advisories toolset to modelcontextprotocol/go-sdk (#1434)
* Initial plan

* Migrate security_advisories toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* Add toolsnaps tests and snapshots for security_advisories

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* Dont bubble up an error for getClient

We should do this eventually, but to keep the existing behavior, we
just return the error to the client.

* re-add security_advisories toolset

* Revert this change from the base PR

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: Adam Holt <me@adamholt.co.uk>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
2025-11-19 16:21:50 +01:00
Copilot a4055195ea Migrate code-scanning toolset to modelcontextprotocol/go-sdk (#1430)
* Initial plan

* Migrate code-scanning toolset to modelcontextprotocol/go-sdk

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* fix lint

* re-add code_security toolset

* nolint:unused

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
2025-11-19 11:44:43 +01:00
Copilot 6c07546591 Migrate gists toolset to modelcontextprotocol/go-sdk (#1431)
* Initial plan

* Migrate gists toolset to modelcontextprotocol/go-sdk

- Remove //go:build ignore tags from gists.go and gists_test.go
- Update imports to use modelcontextprotocol/go-sdk instead of mark3labs/mcp-go
- Migrate all 4 tools (ListGists, GetGist, CreateGist, UpdateGist):
  - Updated tool definitions to use jsonschema.Schema for InputSchema
  - Changed handler signatures to new SDK format with generics
  - Updated parameter extraction to use args map instead of request object
  - Replaced result helpers with utils package equivalents
- Updated all tests to match new handler signatures
- Added toolsnap tests for all 4 tools
- Added parseISOTimestamp utility function to minimal_types.go
- Created toolsnaps for all 4 tools

Related to #1428

Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>

* fix invalid schema, re-add gists toolset to server

* make schema types lowercase

* Don't assert without a testing.T

* just return the tool & handler

* Add Close method to IOLogger to close underlying reader and writer

* Update cmd/github-mcp-server/generate_docs.go

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

* remove unnecessary translation

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
Co-authored-by: Adam Holt <me@adamholt.co.uk>
Co-authored-by: Adam Holt <omgitsads@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-19 11:44:25 +01:00
Adam Holt 407a974b46 Add Close method to IOLogger to close underlying reader and writer 2025-11-18 14:52:57 +01:00
Adam Holt 102181d311 use lowercase strings for the jsonschema types 2025-11-18 14:40:39 +01:00
Adam Holt 1286e0620c just return the tool & handler 2025-11-18 14:38:12 +01:00
Adam Holt b1ac345de4 Don't assert without a testing.T 2025-11-18 14:36:39 +01:00
Adam Holt 1e7a3f05f1 Merge branch 'main' into omgitsads/go-sdk 2025-11-18 11:04:12 +01:00
Adam Holt c946ada4ee Move files back, use build tags 2025-11-17 20:10:56 +01:00
Adam Holt 655bcca719 move files rather than commenting out 2025-11-17 18:42:29 +01:00
Adam Holt 6ce7550b61 Take any ToolHandlerFor 2025-11-17 18:04:31 +01:00
Adam Holt 2b323c218b Dont use the request var 2025-11-17 17:33:36 +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
Adam Holt b2f07e526b Get tests fully working 2025-11-17 10:57:25 +01: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
Adam Holt afc455ddda fix schema issues 2025-11-13 17:20:54 +01:00
Adam Holt 42ada5f005 comment out broken tools for now, we'll tackle them one by one 2025-11-13 17:07:59 +01:00
Adam Holt 28bc3f4566 Update context tools and tests to use ToolHandlerFor with typed arguments and return values. 2025-11-13 17:07:08 +01:00
Adam Holt 385dd8d69d Move to go-sdk IOTransport 2025-11-13 17:06:00 +01:00
Adam Holt 5a92f9ca0b Add intermediate structs for toolsets 2025-11-13 17:05:08 +01:00
Adam Holt 8084335eb0 Remove commented out tool 2025-11-13 10:47:36 +01:00
Adam Holt d69b6167c7 Move some utilities to go SDK 2025-11-13 10:46:51 +01: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 bc4555f0f5 Allow http (#1369)
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
License Check / license-check (push) Has been cancelled
2025-11-06 14:48:11 +01:00
JoannaaKL 5cef28f28e Filter code fences (#1367)
* Filter code fences

* Add test and actually use new function

* Update pkg/sanitize/sanitize_test.go

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

* Reorder

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-06 13:25:16 +01: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