Integrations
Intercom
Manage contacts, conversations, and companies
The Intercom integration provides access to Intercom's API through the Integrate MCP server.
Installation
The Intercom integration is included with the SDK:
import { intercomIntegration } from "integrate-sdk/server";Setup
1. Create an Intercom App
- Go to Intercom Developer Hub
- Create a new app
- Configure OAuth settings
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Intercom integration to your server configuration. The integration automatically reads INTERCOM_CLIENT_ID and INTERCOM_CLIENT_SECRET from your environment variables:
import { createMCPServer, intercomIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
intercomIntegration({
// Intercom uses app-level permissions
}),
],
});You can override the environment variables by passing explicit values:
intercomIntegration({
clientId: process.env.CUSTOM_INTERCOM_ID,
clientSecret: process.env.CUSTOM_INTERCOM_SECRET,
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("intercom");
const contacts = await client.intercom.listContacts({});If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, intercomIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [intercomIntegration()],
});Configuration Options
Prop
Type
Available Tools
Contacts
intercom_list_contacts- List contactsintercom_get_contact- Get a specific contactintercom_create_contact- Create a new contactintercom_search_contacts- Search contacts
Conversations
intercom_list_conversations- List conversationsintercom_get_conversation- Get a specific conversationintercom_reply_conversation- Reply to a conversation
Companies
intercom_list_companies- List companiesintercom_get_company- Get a specific company
Examples
Create a Contact
const result = await client.intercom.createContact({
email: "user@example.com",
name: "John Doe",
customAttributes: {
plan: "premium",
signup_date: "2024-01-15",
},
});
console.log("Contact created:", result);Reply to Conversation
const result = await client.intercom.replyConversation({
conversationId: "12345",
type: "comment",
body: "Thanks for reaching out! I'll look into this for you.",
});
console.log("Reply sent:", result);Search Contacts
const result = await client.intercom.searchContacts({
query: {
field: "email",
operator: "=",
value: "user@example.com",
},
});
console.log("Search results:", result);OAuth Scopes
Intercom uses app-level permissions instead of traditional OAuth scopes. Configure permissions in your Intercom app settings:
- Read and write contacts
- Read and write conversations
- Read and write companies
- Access user data
Error Handling
try {
const result = await client.intercom.createContact({
email: "user@example.com",
name: "John Doe",
});
} catch (error) {
if (error.message.includes("already exists")) {
console.error("Contact already exists");
} else if (error.message.includes("authentication")) {
console.error("Authentication failed");
} else {
console.error("Unexpected error:", error);
}
}Next Steps
- Explore the HubSpot Integration
- Explore the Zendesk Integration
- See Advanced Usage for more examples