Commit Graph

110 Commits

Author SHA1 Message Date
GitHub Actions
73869dd6dc Automatic update of packages 2025-04-08 10:07:50 +00:00
Ashwin Bhat
53a5410d32 Merge pull request #1249 from modelcontextprotocol/ashwin/github
Update github CreatePullRequestReview schema to allow line or position
2025-04-07 10:13:20 -07:00
Toby Padilla
87b4170868 docs: update GitHub server with deprecation notice 2025-04-04 13:27:01 -06:00
Ashwin Bhat
1c175614f6 Update pull request review schema to allow line or position
Allow either line or position in PR review comments, but not both,
to align with GitHub API functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-03 21:20:35 -07:00
Ola Hungerford
f6d5be91b0 Merge branch 'main' into fix/fetch-package 2025-03-28 21:04:54 -07:00
Ola Hungerford
dae98830b2 Merge branch 'main' into bugfix/github-issue-label-null-description 2025-03-27 19:34:47 -07:00
Steven Gonsalvez
056daf37ac Merge branch 'main' into fix/fetch-package 2025-03-19 14:25:27 +00:00
John-Mason P. Shackelford
32f49f4487 feat(github): Add missing pull request operations to MCP server
Add support for all pull request operations documented in README.md that were
previously missing from the MCP server implementation. This includes:

- get_pull_request: Get details of a specific pull request
- list_pull_requests: List and filter repository pull requests
- create_pull_request_review: Create a review on a pull request
- merge_pull_request: Merge a pull request
- get_pull_request_files: Get the list of files changed in a pull request
- get_pull_request_status: Get the combined status of all status checks
- update_pull_request_branch: Update a PR branch with latest base branch changes
- get_pull_request_comments: Get the review comments on a pull request
- get_pull_request_reviews: Get the reviews on a pull request
2025-03-03 17:03:20 -05:00
Matrix Dai
6209bed479 Fix: Handle null description in GitHub label schema 2025-02-28 11:23:01 +08:00
Steven Gonsalvez
93d7c1af3d Merge branch 'main' into fix/fetch-package 2025-02-13 10:00:45 +00:00
steven gonsalvez
88c8f5a347 Add error handling and logging for GitHub issue creation
- Improve error handling in GitHub issue creation process
- Add detailed error messages for repository not found scenarios
- Implement global fetch polyfill for node-fetch
- Add debug and error logging for issue creation attempts
2025-02-06 23:26:03 +00:00
Tim Rogers
d5f719c1a2 Validate in CI that the GitHub server versions in package.json and version.ts match 2025-02-04 12:24:08 +00:00
Tim Rogers
df63442c3c Include meaningful User-Agent header in requests to the GitHub UI
This adds a custom `User-Agent` header to requests from the
GitHub server to the GitHub API, identifying the application,
the version and key information about the environment.

This aligns with the [recommendations][1] in the GitHub Docs.

As part of this change, I have also moved the current version of
the server into a constant, and fix the initialization of `Server`
to use that version, taking from `package.json`.

[1]: https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28#user-agent
2025-02-02 15:04:59 +00:00
Justin Spahr-Summers
fe014d2136 Fix old toolResult usage in GitHub server 2025-01-22 11:13:29 +00:00
David Soria Parra
a540ff8090 Merge branch 'main' into patch-1 2025-01-15 20:23:38 +00:00
David Soria Parra
49489d4864 Merge pull request #464 from erdnax123/erdnax123-patch-2
fix warnings: - FromAsCasing: 'as' and 'FROM' keywords' casing do not…
2025-01-15 09:34:07 +00:00
Justin Spahr-Summers
de256a48b1 fix: Add missing CreatePullRequestSchema and createPullRequest function 2025-01-14 11:19:13 +00:00
Justin Spahr-Summers
a12c6ff23d Merge main: Move to modular structure and add PR functionality 2025-01-14 11:11:41 +00:00
Peter M. Elias
eea524abcf fix: make checkForExistingPullRequest check exact head/base match 2025-01-13 11:53:22 -08:00
Peter M. Elias
339a7b6708 fix: restore original environment variable name for GitHub token 2025-01-13 11:53:22 -08:00
Peter M. Elias
cfd613693c fix: handle URL parameter types correctly in listIssues function 2025-01-13 11:53:22 -08:00
Peter M. Elias
8016e366cd fix: use buildUrl utility in search module 2025-01-13 11:53:22 -08:00
Peter M. Elias
dac0b7cc34 fix: use buildUrl utility in issues module 2025-01-13 11:53:22 -08:00
Peter M. Elias
10f0aec693 fix: use buildUrl utility in commits module 2025-01-13 11:53:22 -08:00
Peter M. Elias
3e1b3caaec fix: resolve typescript errors and add buildUrl utility
- Fix headers type assertion issue
- Add buildUrl utility function for URL parameter handling
2025-01-13 11:53:22 -08:00
Peter M. Elias
272e26935b feat: add GitHub error handling to MCP server
- Import GitHubError types
- Add error formatting utility
- Update error handling in request handler
2025-01-13 11:53:22 -08:00
Peter M. Elias
10bd24dd02 feat: enhance pull request operations with validation and error handling
- Add branch existence validation
- Add duplicate PR check
- Add comprehensive error handling
- Improve type safety with zod transforms
- Add input sanitization
2025-01-13 11:53:22 -08:00
Peter M. Elias
ff2f2c5347 feat: enhance GitHub request utilities with error handling 2025-01-13 11:53:22 -08:00
Peter M. Elias
fb421b4837 feat: add GitHub API error handling utilities 2025-01-13 11:53:22 -08:00
Peter M. Elias
e921c2725c fix: restore proper runServer function closure 2025-01-13 11:53:22 -08:00
Peter M. Elias
b8b7c1b784 refactor: update pull request handler to use new parameter style 2025-01-13 11:53:22 -08:00
Peter M. Elias
42872be9a2 refactor: remove documentation and comments 2025-01-13 11:53:22 -08:00
Peter M. Elias
835be7f855 refactor: improve pull request schemas and validation
- Add proper state enum validation
- Add title and body length validation
- Consolidate request schemas
- Add consistent parameter handling
- Improve type safety
- Add proper JSDoc documentation
2025-01-13 11:53:22 -08:00
Peter M Elias
7c72d987f9 cleanup 2025-01-13 11:53:22 -08:00
Peter M. Elias
a79ec67d9c Add missing GitHubListCommitsSchema and GitHubSearchResponseSchema to common types 2025-01-13 11:53:22 -08:00
Peter M. Elias
0b3359fbf9 Add missing issue-related schemas to common types 2025-01-13 11:53:22 -08:00
Peter M. Elias
4ec840cb4a Add GitHubIssueAssigneeSchema to common types 2025-01-13 11:53:22 -08:00
Peter M. Elias
6b9e983407 Add GitHubPullRequestSchema and related schemas to pulls module 2025-01-13 11:53:22 -08:00
Peter M. Elias
9f43900170 Add GitHubCreateUpdateFileResponseSchema to files module 2025-01-13 11:53:22 -08:00
Peter M. Elias
b4e5754c65 Remove schemas.ts as schemas are now in operation modules 2025-01-13 11:53:22 -08:00
Peter M. Elias
83909ddf95 Refactor index.ts to use modular operation files 2025-01-13 11:53:22 -08:00
Peter M. Elias
f8915fe9aa Add commits operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
7a89bd5f08 Add search operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
6fdfeebdbe Add pull request operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
d751289f9c Add branches operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
2218a0f442 Add issues operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
ee874d7b5b Add file operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
150e9cc560 Add repository operations module 2025-01-13 11:53:22 -08:00
Peter M. Elias
ca2c6f9324 Add common utilities for GitHub API requests 2025-01-13 11:53:22 -08:00
Peter M. Elias
534b90cfe0 Add common type definitions 2025-01-13 11:53:22 -08:00