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

  1. Only request completion for repo:// URIs
  2. Cross-check the URI against the server's resources/list output before completing
  3. 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

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


AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15). Data as JSON: /api/errors/27789959b865b7ae. Report an issue: GitHub.