Content-Length: 274507 | pFad | http://github.com/github/github-mcp-server/pull/218/files/06a028e32d8b84b7a530d853a6933894d25dc563

FE Allow passing through server options by omgitsads · Pull Request #218 · github/github-mcp-server · GitHub
Skip to content

Allow passing through server options #218

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025
Merged
Changes from 1 commit
Commits
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
10 changes: 7 additions & 3 deletions pkg/github/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ import (
type GetClientFn func(context.Context) (*github.Client, error)

// NewServer creates a new GitHub MCP server with the specified GH client and logger.
func NewServer(getClient GetClientFn, version string, readOnly bool, t translations.TranslationHelperFunc) *server.MCPServer {
func NewServer(getClient GetClientFn, version string, readOnly bool, t translations.TranslationHelperFunc, opts ...server.ServerOption) *server.MCPServer {
// Add default options
opts = append(opts, server.WithResourceCapabilities(true, true))
opts = append(opts, server.WithLogging())

// Create a new MCP server
s := server.NewMCPServer(
"github-mcp-server",
version,
server.WithResourceCapabilities(true, true),
server.WithLogging())
opts...,
)

// Add GitHub Resources
s.AddResourceTemplate(GetRepositoryResourceContent(getClient, t))
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/github/github-mcp-server/pull/218/files/06a028e32d8b84b7a530d853a6933894d25dc563

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy