Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert tomodelcontextprotocol/go-sdk#1428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
omgitsads wants to merge66 commits intomain
base:main
Choose a base branch
Loading
fromomgitsads/go-sdk
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
66 commits
Select commitHold shift + click to select a range
d69b616
Move some utilities to go SDK
omgitsadsNov 13, 2025
8084335
Remove commented out tool
omgitsadsNov 13, 2025
5a92f9c
Add intermediate structs for toolsets
omgitsadsNov 13, 2025
385dd8d
Move to go-sdk IOTransport
omgitsadsNov 13, 2025
28bc3f4
Update context tools and tests to use ToolHandlerFor with typed argum…
omgitsadsNov 13, 2025
42ada5f
comment out broken tools for now, we'll tackle them one by one
omgitsadsNov 13, 2025
afc455d
fix schema issues
omgitsadsNov 13, 2025
b2f07e5
Get tests fully working
omgitsadsNov 17, 2025
11a154c
Add sdk migration agent
omgitsadsNov 17, 2025
5483a5b
Lets try actually making the changes in the subagent
omgitsadsNov 17, 2025
cabc7b6
Be explicit about the files to use
omgitsadsNov 17, 2025
99f2d8d
Update about toolsnaps
omgitsadsNov 17, 2025
6fa137b
Add info to allow this to be parallelized
omgitsadsNov 17, 2025
2b323c2
Dont use the request var
omgitsadsNov 17, 2025
6ce7550
Take any ToolHandlerFor
omgitsadsNov 17, 2025
5b4c6df
More info about moved files
omgitsadsNov 17, 2025
655bcca
move files rather than commenting out
omgitsadsNov 17, 2025
c946ada
Move files back, use build tags
omgitsadsNov 17, 2025
3620126
Update licenses
omgitsadsNov 18, 2025
1d257b1
Update agent to use build tags
omgitsadsNov 18, 2025
1e7a3f0
Merge branch 'main' into omgitsads/go-sdk
omgitsadsNov 18, 2025
9f25ebe
Remove dupe import from merge conflict
omgitsadsNov 18, 2025
faa90d2
fix linter issues
omgitsadsNov 18, 2025
b1ac345
Don't assert without a testing.T
omgitsadsNov 18, 2025
1286e06
just return the tool & handler
omgitsadsNov 18, 2025
102181d
use lowercase strings for the jsonschema types
omgitsadsNov 18, 2025
3f03753
Update cmd/github-mcp-server/generate_docs.go
omgitsadsNov 18, 2025
407a974
Add Close method to IOLogger to close underlying reader and writer
omgitsadsNov 18, 2025
5ab610c
Merge branch 'omgitsads/go-sdk' of https://github.com/github/github-m…
omgitsadsNov 18, 2025
cd77c13
Dont bubble up an error for getClient
omgitsadsNov 18, 2025
6c07546
Migrate gists toolset to modelcontextprotocol/go-sdk (#1431)
CopilotNov 19, 2025
a405519
Migrate code-scanning toolset to modelcontextprotocol/go-sdk (#1430)
CopilotNov 19, 2025
eab4876
Merge branch 'omgitsads/go-sdk' of https://github.com/github/github-m…
omgitsadsNov 19, 2025
c06ace3
Migrate security_advisories toolset to modelcontextprotocol/go-sdk (#…
CopilotNov 19, 2025
66e6ad5
Migrate secret_scanning toolset to modelcontextprotocol/go-sdk (#1436)
CopilotNov 19, 2025
ef60ef7
Merge branch 'omgitsads/go-sdk' of https://github.com/github/github-m…
omgitsadsNov 19, 2025
eaf411c
Migrate git toolset to modelcontextprotocol/go-sdk (#1432)
CopilotNov 19, 2025
9bf905b
Migrate labels toolset to modelcontextprotocol/go-sdk (#1433)
CopilotNov 19, 2025
726c683
Migrate issues toolset to modelcontextprotocol/go-sdk (#1440)
CopilotNov 20, 2025
1b769a5
Migrate dependabot toolset to modelcontextprotocol/go-sdk (#1429)
CopilotNov 20, 2025
0a19bf4
Migrate Repository Resources to the Go SDK (#1457)
omgitsadsNov 20, 2025
948fe76
Fix handling of multi path resources (#1458)
omgitsadsNov 20, 2025
42b5533
Migrate dynamic toolset to modelcontextprotocol/go-sdk (#1450)
CopilotNov 20, 2025
4042338
Migrate discussions toolset to modelcontextprotocol/go-sdk (#1448)
CopilotNov 24, 2025
ee72841
Migrate notifications toolset to modelcontextprotocol/go-sdk (#1449)
CopilotNov 24, 2025
17aaf6b
Migrate `pull_requests` toolset to Go SDK (#1466)
LuluBeatsonNov 24, 2025
7fbf80d
Migrate actions toolset to modelcontextprotocol/go-sdk (#1446)
CopilotNov 24, 2025
9e40d53
Migrate 4 Search Tools to Go SDK (#1468)
LuluBeatsonNov 24, 2025
77ac1a7
Migrate projects toolset to modelcontextprotocol/go-sdk (#1475)
CopilotNov 24, 2025
ba40198
Enable empty experiments toolset in Go SDK (#1477)
omgitsadsNov 24, 2025
001e0a1
Migrate repos toolset to modelcontextprotocol/go-sdk (#1445)
CopilotNov 24, 2025
77771a2
Update documentation
omgitsadsNov 24, 2025
782cadc
re-enable get_label
omgitsadsNov 24, 2025
71223b2
Update copilot instructions to reference modelcontextprotocol/go-sdk
CopilotNov 24, 2025
e76ae99
Fix linter issues
omgitsadsNov 24, 2025
7c1340b
Merge branch 'omgitsads/go-sdk' of https://github.com/github/github-m…
omgitsadsNov 24, 2025
5bc4bb6
Merge branch 'main' into omgitsads/go-sdk
omgitsadsNov 24, 2025
a05df2e
Revert change in merge for agent
omgitsadsNov 24, 2025
61d606b
Migrate e2e tests to modelcontextprotocol/go-sdk
SamMorrowDrumsNov 24, 2025
e3aeae3
Fix e2e test bugs in TestDirectoryDeletion and TestPullRequestReviewC…
SamMorrowDrumsNov 24, 2025
5b7b3cd
Add side parameter to FILE-level review comment in e2e test
SamMorrowDrumsNov 24, 2025
bf8e9b4
Add TODO comments for e2e test improvements
SamMorrowDrumsNov 24, 2025
a18fd3a
Remove unused mark3labs/mcp-go dependency
SamMorrowDrumsNov 24, 2025
609e6f6
remove go:build ignore in search_utils_test.go
LuluBeatsonNov 24, 2025
7e19170
Allow overriding the options passed to NewServer
omgitsadsNov 25, 2025
8f5488e
Merge branch 'main' into omgitsads/go-sdk
omgitsadsNov 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion.github/copilot-instructions.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ This is the **GitHub MCP Server**, a Model Context Protocol (MCP) server that co
- **Type:** MCP server application with CLI interface
- **Primary Package:** github-mcp-server (stdio MCP server - **this is the main focus**)
- **Secondary Package:** mcpcurl (testing utility - don't break it, but not the priority)
- **Framework:** Usesmark3labs/mcp-go for MCP protocol, google/go-github for GitHub API
- **Framework:** Usesmodelcontextprotocol/go-sdk for MCP protocol, google/go-github for GitHub API
- **Size:** ~60MB repository, 70 Go files
- **Library Usage:** This repository is also used as a library by the remote server. Functions that could be called by other repositories should be exported (capitalized), even if not required internally. Preserve existing export patterns.

Expand Down
10 changes: 5 additions & 5 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -717,8 +717,8 @@ The following sets of tools are available:

- **issue_read** - Get issue details
- `issue_number`: The number of the issue (number, required)
- `method`: The read operation to perform on a single issue.
Options are:
- `method`: The read operation to perform on a single issue.
Options are:
1. get - Get details of a specific issue.
2. get_comments - Get issue comments.
3. get_sub_issues - Get sub-issues of the issue.
Expand All@@ -736,8 +736,8 @@ Options are:
- `issue_number`: Issue number to update (number, optional)
- `labels`: Labels to apply to this issue (string[], optional)
- `method`: Write operation to perform on a single issue.
Options are:
- 'create' - creates a new issue.
Options are:
- 'create' - creates a new issue.
- 'update' - updates an existing issue.
(string, required)
- `milestone`: Milestone number (number, optional)
Expand DownExpand Up@@ -817,7 +817,7 @@ Options are:
<summary>Notifications</summary>

- **dismiss_notification** - Dismiss notification
- `state`: The new state of the notification (read/done) (string,optional)
- `state`: The new state of the notification (read/done) (string,required)
- `threadID`: The ID of the notification thread (string, required)

- **get_notification_details** - Get notification details
Expand Down
46 changes: 24 additions & 22 deletionscmd/github-mcp-server/generate_docs.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,8 @@ import (
"github.com/github/github-mcp-server/pkg/toolsets"
"github.com/github/github-mcp-server/pkg/translations"
gogithub "github.com/google/go-github/v79/github"
"github.com/mark3labs/mcp-go/mcp"
"github.com/google/jsonschema-go/jsonschema"
"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/shurcooL/githubv4"
"github.com/spf13/cobra"
)
Expand DownExpand Up@@ -226,7 +227,16 @@ func generateToolDoc(tool mcp.Tool) string {
lines = append(lines, fmt.Sprintf("- **%s** - %s", tool.Name, tool.Annotations.Title))

// Parameters
schema := tool.InputSchema
if tool.InputSchema == nil {
lines = append(lines, " - No parameters required")
return strings.Join(lines, "\n")
}
schema, ok := tool.InputSchema.(*jsonschema.Schema)
if !ok || schema == nil {
lines = append(lines, " - No parameters required")
return strings.Join(lines, "\n")
}

if len(schema.Properties) > 0 {
// Get parameter names and sort them for deterministic order
var paramNames []string
Expand All@@ -243,30 +253,22 @@ func generateToolDoc(tool mcp.Tool) string {
requiredStr = "required"
}

// Get the type and description
typeStr := "unknown"
description := ""

if propMap, ok := prop.(map[string]interface{}); ok {
if typeVal, ok := propMap["type"].(string); ok {
if typeVal == "array" {
if items, ok := propMap["items"].(map[string]interface{}); ok {
if itemType, ok := items["type"].(string); ok {
typeStr = itemType + "[]"
}
} else {
typeStr = "array"
}
} else {
typeStr = typeVal
}
}
var typeStr, description string

if desc, ok := propMap["description"].(string); ok {
description = desc
// Get the type and description
switch prop.Type {
case "array":
if prop.Items != nil {
typeStr = prop.Items.Type + "[]"
} else {
typeStr = "array"
}
default:
typeStr = prop.Type
}

description = prop.Description

paramLine := fmt.Sprintf(" - `%s`: %s (%s, %s)", propName, description, typeStr, requiredStr)
lines = append(lines, paramLine)
}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp