-
Notifications
You must be signed in to change notification settings - Fork 5
mcp-server impl #1
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the basic infrastructure for the StreamNative MCP Server, adding authentication flows, token caching, client credentials processing, and CI/CD pipeline configurations.
- Introduces new authentication and token processing logic in pkg/auth
- Adds client credentials flow implementation and token caching
- Configures build, lint, and release workflows as well as an updated README
Reviewed Changes
Copilot reviewed 890 out of 894 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/auth/data_url.go | Implements data URL parsing with regex validation |
| pkg/auth/config_tokenprovider.go | Adds a config-backed caching provider for tokens |
| pkg/auth/client_credentials_provider.go | Implements key file provider for client credentials |
| pkg/auth/client_credentials_flow.go | Implements client credentials flow and token refreshing |
| pkg/auth/cache/cache.go | Implements token caching with refresh and invalidation |
| pkg/auth/authorization_tokenretriever.go | Provides functionality for exchanging auth tokens |
| pkg/auth/auth.go | Defines interfaces and helper functions for auth grant and token |
| cmd/streamnative-mcp-server/main.go | Entry point for the MCP server |
| README.md | Documentation and usage instructions |
| Other configuration/workflow files | CI/CD configuration via goreleaser, linting, and testing files |
Files not reviewed (4)
- Makefile: Language not supported
- go.mod: Language not supported
- go.work: Language not supported
- go.work.sum: Language not supported
| if len(match) != 7 { | ||
| return nil, errDataURLInvalid |
Copilot
AI
Apr 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 7 used to validate the regex capture groups may be fragile if the regex is updated in the future. Consider defining a constant for the expected capture count or adding a clear comment to document what this value represents.
| if len(match) != 7 { | |
| return nil, errDataURLInvalid | |
| if len(match) != expectedCaptureGroups { |
… versa in respective tool descriptions.
No description provided.