The SSE protocol will be deprecated soon. Please use streamable-http as the connectionType moving forward.

Prerequisites

To get the most out of this guide, you’ll need to:

1. Create a Close CRM MCP Server

Use the following endpoint to create a new remote Close CRM MCP server instance:

Request

curl --request POST \
  --url https://api.klavis.ai/mcp-server/instance/create \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "serverName": "Close",
  "userId": "<YOUR_USER_ID>",
  "platformName": "<YOUR_PLATFORM_NAME>"
}'

Response

{
  "serverUrl": "https://close-mcp-server.klavis.ai/sse?instance_id=<instance-id>",
  "instanceId": "<instance-id>"
}
serverUrl specifies the endpoint of the Close CRM MCP server, which you can connect with the MCP client of your application.
instanceId is used for authentication and identification of your server instance. After you complete the next steps, this token allows the MCP server to access user’s private Close CRM information.

2. Implement OAuth Authorization

Redirect users to the Klavis AI OAuth authorization endpoint with your instance ID:

const authUrl = `https://api.klavis.ai/oauth/close/authorize?instance_id=${instanceId}`;
window.location.href = authUrl;

You can also specify scope and redirect_url in the authUrl. Check the API reference for more details.

Explore MCP Server Tools