Skip to content

Commit eab4876

Browse files
committed
Merge branch 'omgitsads/go-sdk' of https://github.com/github/github-mcp-server into omgitsads/go-sdk
2 parents cd77c13 + a405519 commit eab4876

File tree

13 files changed

+669
-434
lines changed

13 files changed

+669
-434
lines changed

internal/ghmcp/server.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ type MCPServerConfig struct {
5757
Logger *slog.Logger
5858
}
5959

60-
const stdioServerLogPrefix = "stdioserver"
61-
6260
func NewMCPServer(cfg MCPServerConfig) (*mcp.Server, error) {
6361
apiHost, err := parseAPIHost(cfg.Host)
6462
if err != nil {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"annotations": {
3+
"title": "Create Gist"
4+
},
5+
"description": "Create a new gist",
6+
"inputSchema": {
7+
"type": "object",
8+
"required": [
9+
"filename",
10+
"content"
11+
],
12+
"properties": {
13+
"content": {
14+
"type": "string",
15+
"description": "Content for simple single-file gist creation"
16+
},
17+
"description": {
18+
"type": "string",
19+
"description": "Description of the gist"
20+
},
21+
"filename": {
22+
"type": "string",
23+
"description": "Filename for simple single-file gist creation"
24+
},
25+
"public": {
26+
"type": "boolean",
27+
"description": "Whether the gist is public",
28+
"default": false
29+
}
30+
}
31+
},
32+
"name": "create_gist"
33+
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"annotations": {
3-
"title": "Get code scanning alert",
4-
"readOnlyHint": true
3+
"readOnlyHint": true,
4+
"title": "Get code scanning alert"
55
},
66
"description": "Get details of a specific code scanning alert in a GitHub repository.",
77
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"alertNumber"
13+
],
814
"properties": {
915
"alertNumber": {
10-
"description": "The number of the alert.",
11-
"type": "number"
16+
"type": "number",
17+
"description": "The number of the alert."
1218
},
1319
"owner": {
14-
"description": "The owner of the repository.",
15-
"type": "string"
20+
"type": "string",
21+
"description": "The owner of the repository."
1622
},
1723
"repo": {
18-
"description": "The name of the repository.",
19-
"type": "string"
24+
"type": "string",
25+
"description": "The name of the repository."
2026
}
21-
},
22-
"required": [
23-
"owner",
24-
"repo",
25-
"alertNumber"
26-
],
27-
"type": "object"
27+
}
2828
},
2929
"name": "get_code_scanning_alert"
3030
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Get Gist Content"
5+
},
6+
"description": "Get gist content of a particular gist, by gist ID",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"gist_id"
11+
],
12+
"properties": {
13+
"gist_id": {
14+
"type": "string",
15+
"description": "The ID of the gist"
16+
}
17+
}
18+
},
19+
"name": "get_gist"
20+
}
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
{
22
"annotations": {
3-
"title": "List code scanning alerts",
4-
"readOnlyHint": true
3+
"readOnlyHint": true,
4+
"title": "List code scanning alerts"
55
},
66
"description": "List code scanning alerts in a GitHub repository.",
77
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo"
12+
],
813
"properties": {
914
"owner": {
10-
"description": "The owner of the repository.",
11-
"type": "string"
15+
"type": "string",
16+
"description": "The owner of the repository."
1217
},
1318
"ref": {
14-
"description": "The Git reference for the results you want to list.",
15-
"type": "string"
19+
"type": "string",
20+
"description": "The Git reference for the results you want to list."
1621
},
1722
"repo": {
18-
"description": "The name of the repository.",
19-
"type": "string"
23+
"type": "string",
24+
"description": "The name of the repository."
2025
},
2126
"severity": {
27+
"type": "string",
2228
"description": "Filter code scanning alerts by severity",
2329
"enum": [
2430
"critical",
@@ -28,30 +34,24 @@
2834
"warning",
2935
"note",
3036
"error"
31-
],
32-
"type": "string"
37+
]
3338
},
3439
"state": {
35-
"default": "open",
40+
"type": "string",
3641
"description": "Filter code scanning alerts by state. Defaults to open",
42+
"default": "open",
3743
"enum": [
3844
"open",
3945
"closed",
4046
"dismissed",
4147
"fixed"
42-
],
43-
"type": "string"
48+
]
4449
},
4550
"tool_name": {
46-
"description": "The name of the tool used for code scanning.",
47-
"type": "string"
51+
"type": "string",
52+
"description": "The name of the tool used for code scanning."
4853
}
49-
},
50-
"required": [
51-
"owner",
52-
"repo"
53-
],
54-
"type": "object"
54+
}
5555
},
5656
"name": "list_code_scanning_alerts"
5757
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "List Gists"
5+
},
6+
"description": "List gists for a user",
7+
"inputSchema": {
8+
"type": "object",
9+
"properties": {
10+
"page": {
11+
"type": "number",
12+
"description": "Page number for pagination (min 1)",
13+
"minimum": 1
14+
},
15+
"perPage": {
16+
"type": "number",
17+
"description": "Results per page for pagination (min 1, max 100)",
18+
"minimum": 1,
19+
"maximum": 100
20+
},
21+
"since": {
22+
"type": "string",
23+
"description": "Only gists updated after this time (ISO 8601 timestamp)"
24+
},
25+
"username": {
26+
"type": "string",
27+
"description": "GitHub username (omit for authenticated user's gists)"
28+
}
29+
}
30+
},
31+
"name": "list_gists"
32+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"annotations": {
3+
"title": "Update Gist"
4+
},
5+
"description": "Update an existing gist",
6+
"inputSchema": {
7+
"type": "object",
8+
"required": [
9+
"gist_id",
10+
"filename",
11+
"content"
12+
],
13+
"properties": {
14+
"content": {
15+
"type": "string",
16+
"description": "Content for the file"
17+
},
18+
"description": {
19+
"type": "string",
20+
"description": "Updated description of the gist"
21+
},
22+
"filename": {
23+
"type": "string",
24+
"description": "Filename to update or create"
25+
},
26+
"gist_id": {
27+
"type": "string",
28+
"description": "ID of the gist to update"
29+
}
30+
}
31+
},
32+
"name": "update_gist"
33+
}

0 commit comments

Comments
 (0)