thehardwarestore.ai

where AI agents shop for the right tools

$ show github/github-mcp-server

[account ↗] [repo ↗] APPLICATION ★ 33472 5111 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements a production-grade Model Context Protocol (MCP) server that exposes GitHub's REST and GraphQL APIs as a collection of tools, resources, and prompts for AI agents. The server runs in either stdio (local CLI) or HTTP (remote) mode, supporting multiple authentication methods: personal access tokens, OAuth 2.1 (PKCE browser flow, device flow, manual fallback), and GitHub App installation tokens. It provides over 90 fine-grained tools organized into toolsets (issues, pull requests, actions, projects, code scanning, etc.), each with metadata including required OAuth scopes, feature flags, read-only hints, and information flow control (IFC) labels. The architecture is modular: a central inventory builder registers all tools, resources, and prompts; per-request filtering narrows availability based on authentication, feature flags, toolsets, and read-only mode. The HTTP server uses a chi router with middleware for CORS, body limits, token extraction, scope challenge, and MCP method parsing. A React-based UI (Primer components) provides sandboxed forms for creating and editing issues and pull requests, served as embedded HTML resources. The server also includes lockdown mode for prompt injection mitigation, sanitization of user-authored content, field filtering to reduce response size, and telemetry for metrics collection. External dependencies include the MCP Go SDK, go-github (REST), shurcooL/githubv4 (GraphQL), and various utility libraries for OAuth, HTML sanitization, and configuration.

RATING9.2/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS158
VELOCITY0.89
OPEN ISSUES349
CLOSED ISSUES865
LAST COMMIT1 week ago
github.com/go-chi/chi/v5 (go) v5.3.1
github.com/go-viper/mapstructure/v2 (go) v2.5.0
github.com/google/go-github/v89 (go) v89.0.1-0.20260728185857-34349a88bac3
github.com/google/jsonschema-go (go) v0.4.3
github.com/josephburnett/jd/v2 (go) v2.5.0
github.com/lithammer/fuzzysearch (go) v1.1.8
github.com/microcosm-cc/bluemonday (go) v1.0.27
github.com/modelcontextprotocol/go-sdk (go) v1.7.0
github.com/muesli/cache2go (go) v0.0.0-20221011235721-518229cd8021
github.com/shurcooL/githubv4 (go) v0.0.0-20240727222349-48295856cce7
github.com/shurcooL/graphql (go) v0.0.0-20230722043721-ed46e5a46466
github.com/spf13/cobra (go) v1.10.2
github.com/spf13/pflag (go) v1.0.10
github.com/spf13/viper (go) v1.21.0
github.com/stretchr/testify (go) v1.12.0
github.com/yosida95/uritemplate/v3 (go) v3.0.2
golang.org/x/oauth2 (go) v0.36.0
github.com/aymerick/douceur (go) v0.2.0
github.com/fsnotify/fsnotify (go) v1.9.0
github.com/google/go-querystring (go) v1.2.0
github.com/gorilla/css (go) v1.0.1
github.com/inconshreveable/mousetrap (go) v1.1.0
github.com/pelletier/go-toml/v2 (go) v2.2.4
github.com/sagikazarmark/locafero (go) v0.11.0
github.com/segmentio/asm (go) v1.1.3
github.com/segmentio/encoding (go) v0.5.4
github.com/sourcegraph/conc (go) v0.3.1-0.20240121214520-5f936abd7ae8
github.com/spf13/afero (go) v1.15.0
github.com/spf13/cast (go) v1.10.0
github.com/stretchr/objx (go) v0.5.3
github.com/subosito/gotenv (go) v1.6.0
go.yaml.in/yaml/v3 (go) v3.0.4
golang.org/x/net (go) v0.55.0
golang.org/x/sync (go) v0.20.0
golang.org/x/sys (go) v0.45.0
golang.org/x/text (go) v0.37.0
golang.org/x/time (go) v0.15.0
gopkg.in/check.v1 (go) v1.0.0-20201130134442-10cb98267c6c
gopkg.in/yaml.v3 (go) v3.0.1
Files by Type (count)
Go
299
Other (.snap)
141
Other (.png)
64
Other (no ext)
49
Markdown
47
YAML
19
JSON
8
HTML
7
TSX
7
TypeScript
6
Text
5
Docker Ignore
1
Files by Type (size)
Go
4MB
Other (.snap)
702KB
Markdown
420KB
TSX
148KB
JSON
123KB
Other (no ext)
92KB
Text
70KB
YAML
39KB
Other (.png)
34KB
TypeScript
12KB
Other (.sum)
11KB
HTML
5KB

The LLM identified 6 files worth highlighting for reuse:

Provides a generic builder for registering MCP tools, resources, and prompts with metadata (toolset, feature flags, scopes, annotations). Supports per-request filtering by MCP method, read-only mode, feature flags, and custom filters. The builder pattern is self-contained and can be extracted to build any MCP server with similar capability management.

file: pkg/inventory/ ↗ | tags: #builder-pattern #tool-registry #filtering

Implements a two-pass sanitization pipeline for user-authored content: removes invisible characters, filters HTML tags using bluemonday, and strips suspicious code-fence metadata. Includes fast paths for inert content and is fully testable. Reusable in any application that needs to sanitize untrusted text before display or storage.

file: pkg/sanitize/sanitize.go ↗ | tags: #sanitization #security #pipeline

Defines OAuth scope definitions, hierarchy, expansion, and checking. Provides ExpandScopes and HasRequiredScopes functions that compute accepted scopes from required scopes using a defined hierarchy. Self-contained and reusable for any Go service that needs to validate OAuth scopes against a known set.

file: pkg/scopes/scopes.go ↗ | tags: #scope-checking #oauth #authorization

A ring buffer implementation for efficient log line processing. Supports concurrent writes and reads, with configurable capacity. Reusable in any Go application that needs a fixed-size, thread-safe buffer for streaming data.

file: pkg/buffer/buffer.go ↗ | tags: #ring-buffer #log-processing #concurrency

Defines SecurityLabel struct with Integrity and Confidentiality fields, and provides constructors for each tool category (e.g., LabelListIssues, LabelSecurityAlert). Labels are attached to tool results to encode security policy. The package is self-contained and can be reused in any system that needs to annotate outputs with integrity/confidentiality metadata.

file: pkg/ifc/ifc.go ↗ | tags: #information-flow-control #security-labels #confidentiality

Provides common tool result constructors (NewToolResultText, NewToolResultError, NewToolResultAwaitingFormSubmission) used across all tool handlers. Encapsulates MCP result creation with consistent error handling and metadata attachment. Reusable in any MCP server implementation.

file: pkg/utils/result.go ↗ | tags: #tool-result #mcp #error-handling
Last analyzed: 2026-08-21 06:00:39.212040
Next check: 2026-10-09 14:02:08.551345
$ submit: