Skip to content

Integrate MCP for OAuth2 and enhance client registration features - #161

Merged
AnkanSaha merged 3 commits into
mainfrom
maintainer/ankan
Aug 24, 2026
Merged

AnkanSaha merged 3 commits into
mainfrom
maintainer/ankan

Conversation

@AnkanSaha

Copy link
Copy Markdown
Member

This pull request introduces a full-featured Model Context Protocol (MCP) server to the codebase, enabling EdgeBalancer to act as an MCP-compatible backend. It adds OAuth2-style authorization, token issuance, client registration, and a /mcp endpoint that supports a variety of AI clients. The landing page is updated to document these capabilities and provide connection instructions for multiple clients.

MCP Server Integration and OAuth2 Authorization:

  • Added a new MCP server implementation using the @modelcontextprotocol/server and @modelcontextprotocol/node libraries, exposing a /mcp endpoint for AI clients to manage load balancers and gateways. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

  • Implemented OAuth2-style authorization flows:

    • Discovery and metadata endpoints (/.well-known/oauth-protected-resource, /.well-known/oauth-authorization-server) for client compatibility.
    • Authorization endpoints (/authorize GET/POST) with login, consent UI, and redirect logic.
    • Token endpoint (/mcp/auth/token) for exchanging authorization codes for access tokens.
    • Client registration endpoint (/register) for dynamic client onboarding.
    • Bearer token verification for authenticating API requests.

Landing Page Documentation:

  • Added a new section to the landing page (client/src/app/page.tsx) that documents the MCP server, its endpoint, supported tools, and provides copy-paste configuration snippets for connecting from popular AI clients (Claude Code, Cursor, Codex, etc.).

These changes make EdgeBalancer accessible from a wide range of AI and code tools via the standardized MCP protocol, with robust authentication and clear user-facing documentation.

…ation

- Updated server version to 4.11.35 in package.json and package-lock.json.
- Added @modelcontextprotocol/node and @modelcontextprotocol/server dependencies.
- Implemented MCP authorization flow with endpoints for authorization, token handling, and discovery.
- Created new mcp module with handlers for authorization, token generation, and user context verification.
- Registered MCP tools for managing load balancers and gateways.
- Added HTML responses for authorization requests and error handling.
- Implemented session management and token verification for secure access.
@AnkanSaha AnkanSaha self-assigned this Aug 24, 2026
@AnkanSaha
AnkanSaha merged commit ceb2737 into main Aug 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant