Skip to content

feat(mcp): MCP Ecosystem Compatibility - Graceful Startup, Static Manifest, and Release Pipeline Improvements#212

Merged
polaz merged 12 commits intomainfrom
feat/#210-feat-mcp-ecosystem-compatibility---graceful-startu
Jan 25, 2026
Merged

feat(mcp): MCP Ecosystem Compatibility - Graceful Startup, Static Manifest, and Release Pipeline Improvements#212
polaz merged 12 commits intomainfrom
feat/#210-feat-mcp-ecosystem-compatibility---graceful-startu

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 25, 2026

Summary

  • Graceful startup without token - Server starts even without GITLAB_TOKEN, tools/list works, tool calls return clear error with setup instructions
  • Static MCP manifest in package.json - Full metadata with transports, feature flags, and tool list for ecosystem discovery
  • Automatic manifest generation - New script updates mcp.tools during release via prepare-release.sh
  • Enhanced /health endpoint - Now includes MCP protocol version, transports, toolCount, and authentication status

Test plan

  • Run yarn lint - passes
  • Run yarn test - 4119 tests passed
  • Run yarn build - successful
  • Verify server starts without GITLAB_TOKEN and responds to tools/list
  • Verify tool calls return clear error when no token configured
  • Verify /health endpoint returns MCP metadata

Closes #210

- 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
Copilot AI review requested due to automatic review settings January 25, 2026 13:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 25, 2026

Test Coverage Report

Overall Coverage: 94.44%

Metric Percentage
Statements 93.89%
Branches 85.53%
Functions 84.43%
Lines 94.44%

View detailed coverage report

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 90.69767% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/oauth/endpoints/metadata.ts 90.00% 1 Missing and 1 partial ⚠️
src/handlers.ts 91.66% 0 Missing and 1 partial ⚠️
src/server.ts 50.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a 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 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

polaz added 2 commits January 25, 2026 15:59
- 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.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 8 comments.

- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

…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)
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.

Avoid stale line number reference - point to function name instead.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.

@polaz polaz enabled auto-merge (squash) January 25, 2026 16:11
@polaz polaz merged commit 2ecb70d into main Jan 25, 2026
16 checks passed
@polaz polaz deleted the feat/#210-feat-mcp-ecosystem-compatibility---graceful-startu branch January 25, 2026 16:13
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)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.48.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: MCP Ecosystem Compatibility - Graceful Startup, Static Manifest, and Release Pipeline Improvements

2 participants