I'm trying to register a custom MCP (Model Context Protocol) server with Agentforce Registry as an External Service, but getting this error:
We couldn't connect to the MCP server. Check the Server URL and try again.
API Catalog Error fetching server definition APPX: Exception occurred while retrieving service descriptor, ExternalServiceException:errorFetchMcpServerDefinition
However, my server logs show all requests are succeeding:
- GET /mcp/http → 200 OK (returns server discovery metadata)
- POST /oauth2/token → 201 Created (returns access token)
- POST /mcp/http (initialize) → 201 Created (MCP initialize handshake)
- POST /mcp/http (notifications/initialized) → 201 Created
The server correctly implements:
- OAuth 2.0 Client Credentials flow
- MCP HTTP transport with JSON-RPC 2.0
- Server discovery endpoint returning protocol version 2025-06-18
Questions:
1. Are there additional requirements for MCP server registration beyond successful API calls?
2. Does ExternalServiceException:errorFetchMcpServerDefinition indicate a specific validation failure?
3. Are there logs or debugging tools in Salesforce to see why registration fails after successful connection?
4. Is there a specific response format or schema the API Catalog expects that might not be documented?
Any guidance would be appreciated!
You'll want to be part of the current Agentforce pre-release program; be sure to contact @Moe Basi and be in touch with him.