Conversation
- Enable server startup without GITLAB_TOKEN - tools/list works, tool calls require token - Add static MCP manifest to package.json with tools metadata, transports, feature flags - Create scripts/update-mcp-manifest.js to auto-generate tools list during release - Enhance /health endpoint with MCP protocol info (version, transports, toolCount, authMode) - Update prepare-release.sh to regenerate manifest on release - Add isStaticTokenConfigured() and isAuthenticationConfigured() helpers Closes #210
Test Coverage ReportOverall Coverage: 94.44%
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR implements MCP ecosystem compatibility improvements to allow the GitLab MCP server to work gracefully with automated validation systems and MCP marketplaces. The server now starts successfully without authentication credentials and provides clear error messages when tools are called without proper configuration.
Changes:
- Graceful startup without GITLAB_TOKEN - server starts and responds to tools/list requests even without authentication, with tool calls returning clear setup instructions
- Static MCP manifest in package.json with comprehensive metadata including 44 tools across 13 categories, feature flags, and authentication requirements
- Enhanced /health endpoint now includes MCP-specific metadata (protocol version, transports, tool count, authentication status)
- Automatic manifest generation script integrated into release pipeline to keep tool listings synchronized
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/server.ts | Modified startup logic to detect authentication mode and proceed gracefully without throwing errors when GITLAB_TOKEN is missing |
| src/oauth/config.ts | Added isStaticTokenConfigured() and isAuthenticationConfigured() helper functions, updated getAuthModeDescription() to handle unauthenticated mode |
| src/oauth/index.ts | Exported new authentication detection functions for use throughout the codebase |
| src/oauth/endpoints/metadata.ts | Enhanced health endpoint to return MCP metadata including protocol version, transports, tool count, and authentication status with async handler |
| src/handlers.ts | Added authentication check before tool execution to return clear error messages when GITLAB_TOKEN is not configured, skips connection initialization when unauthenticated |
| scripts/update-mcp-manifest.js | New script to automatically update package.json mcp.tools section from registry tool definitions with categorization logic |
| scripts/prepare-release.sh | Integrated MCP manifest generation into release pipeline to update tool listings automatically |
| package.json | Added comprehensive mcp section with server metadata, authentication details, feature flags, and full tool listing with 44 tools |
| .gitignore | Whitelisted new update-mcp-manifest.js script |
| tests/unit/oauth/endpoints/metadata.test.ts | Updated health endpoint tests to verify MCP metadata presence and structure |
| tests/unit/oauth/config.test.ts | Added test case for unauthenticated mode description |
| tests/unit/handlers.test.ts | Added OAuth module mocks for authentication checks in handler tests |
- Test oauth authMode when isOAuthEnabled returns true - Test token authMode when static token configured - Test none authMode when no authentication configured - Test error response when isAuthenticationConfigured returns false
Global rateLimiterMiddleware is applied before registerOAuthEndpoints, protecting all routes including /health.
- Define MCP_PROTOCOL_VERSION constant in metadata.ts - Use constant in OAuth metadata and health endpoint - Import constant in tests to avoid duplication - Clarify authentication.required: false for server startup - Normalize tier: "unknown" to "free" in manifest generator
…alue - Replace magic number 44 with dynamic read from package.json mcp.tools - Keeps in sync with manifest updates via scripts/update-mcp-manifest.js - Falls back to 0 if package.json unavailable (bundled environments)
Avoid stale line number reference - point to function name instead.
sw-release-bot bot
pushed a commit
that referenced
this pull request
Jan 25, 2026
## [6.48.0](v6.47.1...v6.48.0) (2026-01-25) ### Features * **logging:** add LOG_FORMAT env var and improve session ID truncation ([#215](#215)) ([df655f2](df655f2)), closes [#213](#213) * **mcp:** MCP Ecosystem Compatibility - Graceful Startup, Static Manifest, and Release Pipeline Improvements ([#212](#212)) ([2ecb70d](2ecb70d)), closes [#210](#210)
|
🎉 This PR is included in version 6.48.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
yarn lint- passesyarn test- 4119 tests passedyarn build- successfulCloses #210