Commit Graph

491 Commits

Author SHA1 Message Date
Rob Bos 2218adfefd Update README.md
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
2025-05-07 19:49:48 -07:00
Rob Bos 157160842b Update README.md
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
2025-05-07 19:49:48 -07:00
Rob Bos cea5c721d0 Include config example for gh-host flag 2025-05-07 19:49:48 -07:00
Eng Zer Jun 29bf8bfebc Optimize Docker build with bind mounts (#208)
* Optimize Docker build with bind mounts

This commit further optimize the Docker builds on top of PR #92 with:

1. Add .dockerignore file to exclude non-source code files [1].

2. Use Alpine image variant for build stage to reduce download size.
   golang:1.23.7-alpine is 200 MB smaller than golang:1.23.7 [2][3].

3. Replace COPY instruction with RUN --mount=type=bind. Bind mounts do
   not add unnecessary layers to the cache [4][5].

[1]: https://docs.docker.com/build-cloud/optimization/#dockerignore-files
[2]: https://hub.docker.com/layers/library/golang/1.23.7-alpine/images/sha256-333d4ba78773b3a3ae9cf2cff8962df56effc5c9481faa355f211abf2baf175c
[3]: https://hub.docker.com/layers/library/golang/1.23.7/images/sha256-2087a99c3235972660b3d35c1564d9d1a3f639dcace9c790acbabc7e938d1570
[4]: https://docs.docker.com/build/building/best-practices/#add-or-copy
[5]: https://docs.docker.com/build/cache/optimize/#use-bind-mounts

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* Remove `go mod download` step

`go build` will automatically download module dependencies. In many
cases, that is a much smaller set of modules than what is downloaded by
`go mod download`.

Size of GOMODCACHE with `go mod download:

	$ go clean -i -r -cache -modcache
	$ go mod download
	$ du -sh ~/go/pkg/mod
	186M	/home/jun/go/pkg/mod

Size of GOMODCACHE with `go build`:

	$ go clean -i -r -cache -modcache
	$ CGO_ENABLED=0 go build -ldflags="-s -w" cmd/github-mcp-server/main.go
	go: downloading github.com/spf13/viper v1.20.1
	go: downloading github.com/mark3labs/mcp-go v0.18.0
	go: downloading github.com/google/go-github/v69 v69.2.0
	go: downloading github.com/sirupsen/logrus v1.9.3
	go: downloading github.com/spf13/cobra v1.9.1
	go: downloading golang.org/x/sys v0.31.0
	go: downloading github.com/spf13/afero v1.14.0
	go: downloading github.com/fsnotify/fsnotify v1.8.0
	go: downloading github.com/spf13/cast v1.7.1
	go: downloading github.com/go-viper/mapstructure/v2 v2.2.1
	go: downloading github.com/subosito/gotenv v1.6.0
	go: downloading gopkg.in/yaml.v3 v3.0.1
	go: downloading github.com/spf13/pflag v1.0.6
	go: downloading github.com/pelletier/go-toml/v2 v2.2.3
	go: downloading github.com/sagikazarmark/locafero v0.9.0
	go: downloading golang.org/x/text v0.23.0
	go: downloading github.com/google/uuid v1.6.0
	go: downloading github.com/yosida95/uritemplate/v3 v3.0.2
	go: downloading github.com/sourcegraph/conc v0.3.0
	go: downloading github.com/google/go-querystring v1.1.0
	$ du -sh ~/go/pkg/mod
	80M	/home/jun/go/pkg/mod

Reference: https://stackoverflow.com/a/68172023/7902371
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-05-07 17:09:28 +02:00
William Martin 0ca07aa3d5 Support breakpoint debugging e2e tests 2025-05-07 16:13:22 +02:00
William Martin afc7a93b3d Extract ghmcp internal package
This commit cleanly separates config parsing, stdio server execution and
mcp server construction. Aside from significant clarity improvements, it
allows for direct construction of the mcp server in e2e tests to allow
for breakpoint debugging.
2025-05-07 16:13:22 +02:00
dependabot[bot] e56c096e39 build(deps): bump github.com/migueleliasweb/go-github-mock
Bumps [github.com/migueleliasweb/go-github-mock](https://github.com/migueleliasweb/go-github-mock) from 1.1.0 to 1.3.0.
- [Release notes](https://github.com/migueleliasweb/go-github-mock/releases)
- [Commits](https://github.com/migueleliasweb/go-github-mock/compare/v1.1.0...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/migueleliasweb/go-github-mock
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-06 13:17:28 +02:00
William Martin 2ee6c4e2aa Update licenses for mcp-go bump to 0.25.0 2025-05-06 13:08:17 +02:00
dependabot[bot] 73c3b10b04 build(deps): bump github.com/mark3labs/mcp-go from 0.22.0 to 0.25.0
Bumps [github.com/mark3labs/mcp-go](https://github.com/mark3labs/mcp-go) from 0.22.0 to 0.25.0.
- [Release notes](https://github.com/mark3labs/mcp-go/releases)
- [Commits](https://github.com/mark3labs/mcp-go/compare/v0.22.0...v0.25.0)

---
updated-dependencies:
- dependency-name: github.com/mark3labs/mcp-go
  dependency-version: 0.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-06 13:08:17 +02:00
William Martin 92d95e4dbe Add e2e test for tags 2025-04-30 20:15:39 +02:00
William Martin 09e156383d Test path params for tag tools 2025-04-30 20:15:39 +02:00
Eran Cohen 866a791635 feat: Add support for git tag operations
Add git tag functionality including:
- List repository tags
- Get tag details
- Support for tag-based content access

This enables basic read-only tag management through the MCP server API.
2025-04-30 20:15:39 +02:00
Camila Rondinini a7d741cc44 fix: specify sha is required (#320) 2025-04-29 12:47:25 +02:00
William Martin 4e26dce238 Support e2e test parallelisation 2025-04-25 14:44:49 +02:00
William Martin f9427ab04e Ensure toolsets are configurable via env var 2025-04-25 14:44:49 +02:00
William Martin 4a39c03899 Always initialize in e2e tests 2025-04-25 14:44:49 +02:00
William Martin 0c947318b6 Use functional options in e2e as prep for next test 2025-04-25 14:44:49 +02:00
William Martin 33620e1b4b Build image only once in e2e tests 2025-04-25 14:44:49 +02:00
Ian Smith f7eff5993e Update README.md 2025-04-24 21:50:11 +02:00
Ian Smith 58387a2df6 Pre-reqs for docker use include auth to ghcr.io 2025-04-24 21:50:11 +02:00
dependabot[bot] 3134b0996a Bump golang from 1.23.7 to 1.24.2
Bumps golang from 1.23.7 to 1.24.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-23 17:27:40 +02:00
Salvador Fuentes Jr f8436ab5d7 Add other example config snip 2025-04-23 17:10:08 +02:00
Salvador Fuentes Jr be22f6e2e0 Update README.md to remove mcp key
The vscode configuration example in the README.md does not work with my version of vscode. Since it's also not required, this change removes it so that it works in all versions of vscode.


Version:

```
Version: 1.99.1 (Universal)
Commit: 7c6fdfb0b8f2f675eb0b47f3d95eeca78962565b
Date: 2025-04-04T15:58:59.624Z (4 days ago)
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.3.0
```
2025-04-23 17:10:08 +02:00
divyanshvn 7d4aa71cb8 small doc change : fixing formatting in list of tool functions , inside README.md
search_code was misalligned. fixed it in README.
2025-04-23 16:46:33 +02:00
warjiang 8fb4deba2e fix: update params for search_users 2025-04-23 16:34:14 +02:00
Sam Morrow a58937c0b3 feat: provide tool annotations 2025-04-23 13:14:01 +02:00
William Martin 56b23c33cb Add simple e2e test 2025-04-22 18:20:42 +02:00
William Martin 71b00750ba Remove conformance tests 2025-04-22 18:01:17 +02:00
William Martin cb8dfd1fc3 Gitignore .vscode except launch.json 2025-04-22 17:39:38 +02:00
William Martin 3de13faf8a Update licenses with mcp-go 0.22.0 bump 2025-04-22 17:30:33 +02:00
dependabot[bot] e6ed69b511 chore(deps): bump github.com/mark3labs/mcp-go from 0.20.1 to 0.22.0
Bumps [github.com/mark3labs/mcp-go](https://github.com/mark3labs/mcp-go) from 0.20.1 to 0.22.0.
- [Release notes](https://github.com/mark3labs/mcp-go/releases)
- [Commits](https://github.com/mark3labs/mcp-go/compare/v0.20.1...v0.22.0)

---
updated-dependencies:
- dependency-name: github.com/mark3labs/mcp-go
  dependency-version: 0.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 17:30:33 +02:00
dependabot[bot] 3ca55bd3d8 chore(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 28.0.4+incompatible to 28.1.1+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v28.0.4...v28.1.1)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-version: 28.1.1+incompatible
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-22 15:39:48 +02:00
Toby Padilla 9fa582d8d6 fix: use anyOf instead of nullable type array
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
Unit Tests / build (macos-latest) (push) Has been cancelled
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
Lint / lint (push) Has been cancelled
Windsurf is erroring on the `create_pull_request` tool because we're
using an array of types to make fields nullable. This PR uses `anyOf`
instead and should fix the issue.
v0.2.1
2025-04-21 21:19:24 +02:00
Simon Taranto 495c0cb428 chore: Update README.md to explain Agent mode will start the server (#305)
* Update README.md to explain Agent mode will start the server

* Update README.md

Co-authored-by: Sam Morrow <info@sam-morrow.com>

---------

Co-authored-by: Sam Morrow <info@sam-morrow.com>
2025-04-17 22:09:38 +02:00
Sam Morrow 2cece8f979 fix: incorrect env var in README.md
Lint / lint (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Unit Tests / build (macos-latest) (push) Has been cancelled
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / build (windows-latest) (push) Has been cancelled
License Check / license-check (push) Has been cancelled
2025-04-17 16:05:09 +02:00
Toby Padilla 8991436497 docs: update toolset copy
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / 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
Unit Tests / build (macos-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
Lint / lint (push) Has been cancelled
v0.2.0
2025-04-17 12:52:00 +02:00
Sam Morrow 11b18286d1 Update README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-17 12:52:00 +02:00
Sam Morrow aa57315272 chore: update readme for tool paritioning 2025-04-17 12:52:00 +02:00
Toby Padilla 22e493620c fix: update json schema for create_pull_request_review to make OpenAI compatible (#300)
Co-authored-by: Sam Morrow <info@sam-morrow.com>
2025-04-17 12:50:19 +02:00
William Martin 54bd5ec239 Update CODEOWNERS to github-mcp-server team 2025-04-17 12:44:44 +02:00
Tony Truong 7c197f5850 feat: Adding SecretScanning Toolset (#280)
* Adding GetSecretScanningAlert and ListSecretScanningAlerts

* adding wip for tests

* fix tests

* add readme section

* Update README.md

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

* Update .gitignore

Co-authored-by: Sam Morrow <info@sam-morrow.com>

* fix product name

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sam Morrow <info@sam-morrow.com>
2025-04-17 10:19:59 +02:00
Dylan Rinker 614f226724 Add Tool Name property for List Code Scanning Alerts tool (#272) 2025-04-15 19:36:16 +02:00
Tony Truong 4457d0ac30 Add missing enum constraints (#278)
* Add missing enum constraints

* Remove redundant listing of additional enums in descriptions

---------

Co-authored-by: Sam Morrow <info@sam-morrow.com>
2025-04-15 17:01:33 +02:00
Sam Morrow b72a591ce5 chore: use tabs not spaces 2025-04-15 14:33:39 +02:00
Sam Morrow 7eff904605 chore: improve --version command 2025-04-15 14:33:39 +02:00
Joe Ton ea19581ef0 refactor: improve version output using SetVersionTemplate 2025-04-15 14:33:39 +02:00
Sam Morrow ff3036d596 feat: partition tools by product/feature 2025-04-15 01:11:53 +02:00
Ricardo Fearing 62eed343e0 Clarify local build (#264) 2025-04-14 12:18:26 -06:00
Simon Danielsson bbba3bb7b0 feat: pretty-print JSONL text responses in mcpcurl (#239)
* Pretty-print jsonl text responses

* Remove else in favour of continue

---------

Co-authored-by: danielssonsimon <danielsson.simon@bcg.com>
2025-04-12 15:08:14 +02:00
Sam Morrow 9dacf70b6e chore: extend user agent 2025-04-12 12:24:20 +02:00