π OAuth2 Authentication Support - v1.0.0
We're excited to announce version 1.0.0 of the JustCall MCP Server, featuring enhanced security with OAuth2 authentication support.
π Security Enhancements
This release introduces comprehensive OAuth2 authentication to secure all MCP and SSE endpoints, providing enterprise-grade security for your JustCall integrations.
New Features
-
OAuth2 Authorization Server Metadata
- Implemented OAuth2 authorization server metadata endpoint at
/.well-known/oauth-authorization-server - Provides complete OAuth2 configuration for client discovery
- Supports authorization code grant flow with PKCE (Proof Key for Code Exchange)
- Implemented OAuth2 authorization server metadata endpoint at
-
Enhanced Authentication
- S256 code challenge method support for secure code exchange
- Bearer token authentication for all protected endpoints
- Token validation middleware for secure endpoint access
-
Protected Endpoints
The following endpoints now require valid Bearer token authentication:/mcp- Main MCP endpoint/sse- Server-Sent Events endpoint/sse/message- SSE message endpoint
-
Public Endpoints
The following endpoints remain publicly accessible:/health- Health check endpoint/.well-known/oauth-authorization-server- OAuth2 metadata endpoint
π Authentication Methods
The server now supports two authentication methods:
-
OAuth2 JWT Token
Authorization: Bearer <JWT_TOKEN_BY_OAUTH> -
API Key/Secret (Legacy Support)
Authorization: Bearer <JUSTCALL_API_KEY>:<JUSTCALL_API_SECRET>
π§ Technical Details
-
OAuth2 Configuration
- Grant Type: Authorization code flow
- Code Challenge Method: S256 (SHA-256)
- Token Endpoint Auth: Client secret post
- Scopes: OpenID
-
Implementation
- Added OAuth2 constants and configuration
- Enhanced request handling with token validation
- Improved security middleware for endpoint protection
- Updated utility functions for token extraction
π Documentation Updates
- Updated README with comprehensive OAuth2 authentication guide
- Added authentication header format examples
- Documented protected and public endpoints
- Included OAuth2 configuration details
π Migration Guide
If you're upgrading from a previous version:
-
For Remote MCP Connections
- Update your configuration to use Bearer token authentication
- Use your JustCall API credentials:
Authorization: Bearer <API_KEY>:<API_SECRET> - Or implement OAuth2 flow for enhanced security
-
For Claude Desktop
- Update your
claude_desktop_config.jsonto include the--oauth2Bearerflag - Example configuration:
{ "mcpServers": { "JustCall-mcp": { "command": "npx", "args": [ "-y", "supergateway", "--streamableHttp", "https://mcp.justcall.host/mcp", "--oauth2Bearer", "<JUSTCALL_API_KEY>:<JUSTCALL_API_SECRET>" ] } } }
- Update your
π¦ Files Changed
CHANGELOG.md- Added v1.0.0 release notesREADME.md- Updated with OAuth2 authentication documentationpackage.json- Version bump to 1.0.0server.json- Updated server configurationsrc/constants/oauth.ts- New OAuth2 configuration constantssrc/index.ts- Enhanced with OAuth2 authentication middlewaresrc/tools/utils.ts- Updated utility functions for token handling
π Contributors
Special thanks to:
- Manik Rastogi - Co-author
- Akash Yadav - Co-author
- Mayank Banga - Co-author
π Related Links
Full Changelog: View all changes