github/github-mcp-server · info
unsupported resource URI: %s
Error message
unsupported resource URI: %s
What it means
A completion request with ref type ref/resource was routed to the completions handler, but the URI does not start with repo:// - the only resource URI scheme this server implements completion for. Any other scheme is explicitly unsupported.
Source
Thrown at pkg/github/server.go:202
Title: title,
Version: version,
Icons: octicons.Icons("mark-github"),
}, opts)
return s
}
func CompletionsHandler(getClient GetClientFn) func(ctx context.Context, req *mcp.CompleteRequest) (*mcp.CompleteResult, error) {
return func(ctx context.Context, req *mcp.CompleteRequest) (*mcp.CompleteResult, error) {
if req == nil || req.Params == nil || req.Params.Ref == nil {
return nil, fmt.Errorf("missing required parameter: ref")
}
switch req.Params.Ref.Type {
case "ref/resource":
if strings.HasPrefix(req.Params.Ref.URI, "repo://") {
return RepositoryResourceCompletionHandler(getClient)(ctx, req)
}
return nil, fmt.Errorf("unsupported resource URI: %s", req.Params.Ref.URI)
case "ref/prompt":
return nil, nil
default:
return nil, fmt.Errorf("unsupported ref type: %s", req.Params.Ref.Type)
}
}
}
func MarshalledTextResult(v any) *mcp.CallToolResult {
data, err := json.Marshal(v)
if err != nil {
return utils.NewToolResultErrorFromErr("failed to marshal text result to json", err)
}
return utils.NewToolResultText(string(data))
}
View on GitHub (pinned to 0ea1f775a7)
Solutions
- Only request completion for repo:// URIs
- Cross-check the URI against the server's resources/list output before completing
- Treat this error as non-fatal client-side: skip completion for unsupported schemes
Defensive patterns
Strategy: validation
Validate before calling
if !strings.HasPrefix(ref.URI, "repo://") {
return nil // skip completion for schemes the server does not support
} Prevention
- Only request completion for repo:// URIs
- Fetch resources/list and match URIs exactly before completing
- Treat unsupported-scheme errors as skip conditions, not failures
When it happens
Trigger: Client requests completion for a non-repo scheme (issue://, git://, custom schemes); URI typo; generic clients that blindly attempt completion on every advertised resource.
Common situations: Generic MCP clients enumerating resources and auto-completing all URIs; scheme changes between server versions.
Related errors
- owner or repo not specified
- each issue_fields item must be an object
- issue_fields must be an array
- field_name is required for each issue_fields item
- value cannot be null for field %q
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/27789959b865b7ae.
Report an issue: GitHub.