Skip to content

Commit f61a1a9

Browse files
authored
Intercom MCP server (#567)
* include starter-tools dir; rename command to make mcp-server-docs * document Intercom Starter MCP server * update design-system; explain subdomain secret
1 parent fb72422 commit f61a1a9

File tree

218 files changed

+10193
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+10193
-6
lines changed

app/en/mcp-servers/customer-support/intercom-api/page.mdx

Lines changed: 3634 additions & 0 deletions
Large diffs are not rendered by default.

next-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference types="next/navigation-types/compat/navigation" />
34
import "./.next/dev/types/routes.d.ts";
45

56
// NOTE: This file should not be edited

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"homepage": "https://arcade.dev/",
3434
"dependencies": {
35-
"@arcadeai/design-system": "^3.16.0",
35+
"@arcadeai/design-system": "^3.18.0",
3636
"@next/third-parties": "16.0.1",
3737
"@ory/client": "1.22.7",
3838
"@theguild/remark-mermaid": "0.3.0",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "IntercomApi.AddNoteToContact";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({
10+
tool_name: TOOL_NAME,
11+
user_id: USER_ID,
12+
});
13+
14+
if (authResponse.status !== "completed") {
15+
console.log(`Click this link to authorize: ${authResponse.url}`);
16+
}
17+
18+
// Wait for the authorization to complete
19+
await client.auth.waitForCompletion(authResponse);
20+
21+
const toolInput = {
22+
"mode": "execute",
23+
"contact_id": 12345,
24+
"request_body": "{\"note\":\"This is a sample note.\"}"
25+
};
26+
27+
const response = await client.tools.execute({
28+
tool_name: TOOL_NAME,
29+
input: toolInput,
30+
user_id: USER_ID,
31+
});
32+
33+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "IntercomApi.AddNoteToContact"
8+
9+
auth_response = client.tools.authorize(
10+
tool_name=TOOL_NAME,
11+
user_id=USER_ID,
12+
)
13+
14+
if auth_response.status != "completed":
15+
print(f"Click this link to authorize: {auth_response.url}")
16+
17+
# Wait for the authorization to complete
18+
client.auth.wait_for_completion(auth_response)
19+
20+
tool_input = {
21+
'mode': 'execute', 'contact_id': 12345, 'request_body': '{"note":"This is a sample note."}'
22+
}
23+
24+
response = client.tools.execute(
25+
tool_name=TOOL_NAME,
26+
input=tool_input,
27+
user_id=USER_ID,
28+
)
29+
print(json.dumps(response.output.value, indent=2))
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "IntercomApi.ArchiveContact";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({
10+
tool_name: TOOL_NAME,
11+
user_id: USER_ID,
12+
});
13+
14+
if (authResponse.status !== "completed") {
15+
console.log(`Click this link to authorize: ${authResponse.url}`);
16+
}
17+
18+
// Wait for the authorization to complete
19+
await client.auth.waitForCompletion(authResponse);
20+
21+
const toolInput = {
22+
"contact_id": "12345"
23+
};
24+
25+
const response = await client.tools.execute({
26+
tool_name: TOOL_NAME,
27+
input: toolInput,
28+
user_id: USER_ID,
29+
});
30+
31+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "IntercomApi.ArchiveContact"
8+
9+
auth_response = client.tools.authorize(
10+
tool_name=TOOL_NAME,
11+
user_id=USER_ID,
12+
)
13+
14+
if auth_response.status != "completed":
15+
print(f"Click this link to authorize: {auth_response.url}")
16+
17+
# Wait for the authorization to complete
18+
client.auth.wait_for_completion(auth_response)
19+
20+
tool_input = {
21+
'contact_id': '12345'
22+
}
23+
24+
response = client.tools.execute(
25+
tool_name=TOOL_NAME,
26+
input=tool_input,
27+
user_id=USER_ID,
28+
)
29+
print(json.dumps(response.output.value, indent=2))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}";
6+
const TOOL_NAME = "IntercomApi.AttachCompanyToContact";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({
10+
tool_name: TOOL_NAME,
11+
user_id: USER_ID,
12+
});
13+
14+
if (authResponse.status !== "completed") {
15+
console.log(`Click this link to authorize: ${authResponse.url}`);
16+
}
17+
18+
// Wait for the authorization to complete
19+
await client.auth.waitForCompletion(authResponse);
20+
21+
const toolInput = {
22+
"mode": "execute",
23+
"contact_unique_identifier": "contact_12345",
24+
"request_body": "{\"company_id\":\"company_67890\"}"
25+
};
26+
27+
const response = await client.tools.execute({
28+
tool_name: TOOL_NAME,
29+
input: toolInput,
30+
user_id: USER_ID,
31+
});
32+
33+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}"
7+
TOOL_NAME = "IntercomApi.AttachCompanyToContact"
8+
9+
auth_response = client.tools.authorize(
10+
tool_name=TOOL_NAME,
11+
user_id=USER_ID,
12+
)
13+
14+
if auth_response.status != "completed":
15+
print(f"Click this link to authorize: {auth_response.url}")
16+
17+
# Wait for the authorization to complete
18+
client.auth.wait_for_completion(auth_response)
19+
20+
tool_input = {
21+
'mode': 'execute',
22+
'contact_unique_identifier': 'contact_12345',
23+
'request_body': '{"company_id":"company_67890"}'
24+
}
25+
26+
response = client.tools.execute(
27+
tool_name=TOOL_NAME,
28+
input=tool_input,
29+
user_id=USER_ID,
30+
)
31+
print(json.dumps(response.output.value, indent=2))

0 commit comments

Comments
 (0)