Commit Graph

246 Commits

Author SHA1 Message Date
Adam Holt e76ae992e1 Fix linter issues 2025-11-24 15:52:12 +01:00
Adam Holt 782cadcfa3 re-enable get_label 2025-11-24 15:36:52 +01:00
Copilot 001e0a1758 Migrate repos toolset to modelcontextprotocol/go-sdk (#1445)
* Initial plan

* WIP: Migrate repos toolset - 7/18 tools complete

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

* Complete repositories.go migration - all 18 tools migrated

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

* WIP: Update repositories_test.go - partial migration

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

* Complete repos toolset migration to go-sdk

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

* re-add 18 tools: 15/17 repos, 3/3 stargazers

* add toolsnaps for ListReleases, GetLatestRelease

---------

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>
2025-11-24 15:28:09 +01:00
Adam Holt ba40198c57 Enable empty experiments toolset in Go SDK (#1477) 2025-11-24 15:26:09 +01:00
Copilot 77ac1a7eb0 Migrate projects toolset to modelcontextprotocol/go-sdk (#1475)
* Initial plan

* Migrate projects toolset to modelcontextprotocol/go-sdk

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

* Update documentation after projects migration

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

* Enable projects toolset after migration

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

* nit: keep toolsets in original order, remove dupe

* revert docs changes

---------

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-24 15:18:15 +01:00
Lulu 9e40d53acc Migrate 4 Search Tools to Go SDK (#1468)
* migrate search.go

* add toolsnap for search_orgs

* re-add 4 search tools

* Dedupe test args

---------

Co-authored-by: Adam Holt <me@adamholt.co.uk>
2025-11-24 13:43:03 +01:00
Copilot 7fbf80d055 Migrate actions toolset to modelcontextprotocol/go-sdk (#1446)
* Initial plan

* Migrate actions toolset to modelcontextprotocol/go-sdk

- Removed //go:build ignore tags from actions.go and actions_test.go
- Updated imports to use modelcontextprotocol/go-sdk instead of mark3labs/mcp-go
- Updated all tool constructor signatures to return new types
- Converted all tool definitions from DSL format to jsonschema.Schema format
- Updated tool handler signatures to use generics
- Updated parameter extraction to use args map instead of request
- Replaced mcp.NewToolResultText/Error with utils package functions
- Updated all tests to work with new handler signature
- Updated toolsnaps for all actions tools

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

* re-add actions toolset

* create toolsnaps

* create toolsnaps

---------

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>
2025-11-24 12:58:47 +01:00
Lulu 17aaf6b93e Migrate pull_requests toolset to Go SDK (#1466)
* migrate with agent

* re-add pull_requests toolset, fix whitespace

* revert changes not part of migration

* revert changes not part of migration
2025-11-24 11:57:31 +01:00
Copilot ee72841cb5 Migrate notifications toolset to modelcontextprotocol/go-sdk (#1449)
* Initial plan

* Migrate notifications toolset to modelcontextprotocol/go-sdk

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

* fix the tests that Copilot removed!

* re-add notifications toolset

* Remove unused variables

---------

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>
2025-11-24 11:52:58 +01:00
Copilot 40423387d7 Migrate discussions toolset to modelcontextprotocol/go-sdk (#1448)
* Initial plan

* Migrate discussions toolset to modelcontextprotocol/go-sdk

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

* Update documentation after discussions toolset migration

* revert generated docs

* re-add discussions toolset

* rm dupe DefaultGraphQLPageSize

---------

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-24 11:40:55 +01:00
Copilot 42b55339b8 Migrate dynamic toolset to modelcontextprotocol/go-sdk (#1450)
* Initial plan

* Migrate dynamic toolset to modelcontextprotocol/go-sdk

This commit migrates the dynamic toolset (enable_toolset, list_available_toolsets,
get_toolset_tools) from mark3labs/mcp-go to modelcontextprotocol/go-sdk.

Changes:
- Removed //go:build ignore tag
- Updated imports to use modelcontextprotocol/go-sdk
- Migrated all tool functions to use new SDK patterns
- Updated ToolsetEnum helper to return []any instead of mcp.PropertyOption
- Converted DSL-based schema definitions to jsonschema.Schema structures
- Updated handler signatures to use map[string]any args
- Replaced old result helpers with utils package equivalents
- Fixed EnableToolset to use RegisterFunc instead of AddTools
- Created comprehensive test suite for all three tools
- Generated toolsnaps for the new tools

Related to #1428

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

* Enable dynamic tools

* Remove new test and toolsnaps, we can follow up with this

* Just return the tool and handler directly instead of assigning to variables first.

This stops copilot complaining in review that the variables are 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: Adam Holt <me@adamholt.co.uk>
2025-11-20 17:47:11 +01:00
Adam Holt 948fe767ae Fix handling of multi path resources (#1458)
* Migrate repo resources to Go SDK

* Enable resources for repos

* Properly handle encoding and closing of the buffer

* Remove outdated comment

* Switch to StdEncoding, as it was originally

* fix casing for linter

* Update licenses

* Handle multiple path components
2025-11-20 16:18:28 +01:00
Adam Holt 0a19bf4888 Migrate Repository Resources to the Go SDK (#1457)
* Migrate repo resources to Go SDK

* Enable resources for repos

* Properly handle encoding and closing of the buffer

* Remove outdated comment

* Switch to StdEncoding, as it was originally

* fix casing for linter

* Update licenses
2025-11-20 15:20:42 +01:00
Copilot 1b769a5848 Migrate dependabot toolset to modelcontextprotocol/go-sdk (#1429)
* Initial plan

* Migrate dependabot toolset to modelcontextprotocol/go-sdk

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

* re-add dependabot 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>
Co-authored-by: Adam Holt <me@adamholt.co.uk>
2025-11-20 11:18:33 +01:00
Copilot 726c683ed9 Migrate issues toolset to modelcontextprotocol/go-sdk (#1440)
* Initial plan

* Migrate imports and first 3 tools (IssueRead, ListIssueTypes, helper functions)

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

* Migrate AddIssueComment, SubIssueWrite and helper functions

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

* Migrate SearchIssues and search_utils helper

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

* Migrate IssueWrite tool with CreateIssue and UpdateIssue helpers

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

* Migrate remaining tools: ListIssues, AssignCopilotToIssue, AssignCodingAgentPrompt

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

* Fix all linter errors in issues.go and search_utils.go

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

* Fix test file and update toolsnaps - migration complete!

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

* uncomment issues toolset

* Migrate Issue workflow prompt

* Remove commented out tool definition

* Remove duplicate func

---------

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>
2025-11-20 11:14:28 +01: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 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 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 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 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