Skip to content

Commit 4599dc0

Browse files
authored
Xero Starter MCP Server docs (#475)
1 parent 65b466f commit 4599dc0

File tree

312 files changed

+20043
-3025
lines changed

Some content is hidden

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

312 files changed

+20043
-3025
lines changed

app/en/mcp-servers/productivity/xero-api/page.mdx

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

pnpm-lock.yaml

Lines changed: 5647 additions & 3025 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 = "XeroApi.AddContactHistoryRecord";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"contact_unique_identifier": "4f8a2b9e-1c3d-4a6b-9f2e-abc123def456",
20+
"tenant_identifier": "tenant_7890xyz",
21+
"idempotency_key": "addhistory-2025-10-06-001"
22+
};
23+
24+
const response = await client.tools.execute({
25+
tool_name: TOOL_NAME,
26+
input: toolInput,
27+
user_id: USER_ID,
28+
});
29+
30+
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 = "XeroApi.AddContactHistoryRecord"
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_unique_identifier': '4f8a2b9e-1c3d-4a6b-9f2e-abc123def456',
22+
'tenant_identifier': 'tenant_7890xyz',
23+
'idempotency_key': 'addhistory-2025-10-06-001'
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))
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 = "XeroApi.AddExpenseClaimHistory";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"expense_claim_id": "ec-7890",
20+
"xero_tenant_id": "tenant-12345",
21+
"idempotency_key": "retry-20251006-01"
22+
};
23+
24+
const response = await client.tools.execute({
25+
tool_name: TOOL_NAME,
26+
input: toolInput,
27+
user_id: USER_ID,
28+
});
29+
30+
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 = "XeroApi.AddExpenseClaimHistory"
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+
'expense_claim_id': 'ec-7890',
22+
'xero_tenant_id': 'tenant-12345',
23+
'idempotency_key': 'retry-20251006-01'
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))
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 = "XeroApi.AddQuoteHistory";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"quote_identifier": "Q-2025-0001",
20+
"xero_tenant_id": "tenant_12ab34cd-56ef-78gh",
21+
"idempotency_key": "addhist-20251006-001"
22+
};
23+
24+
const response = await client.tools.execute({
25+
tool_name: TOOL_NAME,
26+
input: toolInput,
27+
user_id: USER_ID,
28+
});
29+
30+
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 = "XeroApi.AddQuoteHistory"
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+
'quote_identifier': 'Q-2025-0001',
22+
'xero_tenant_id': 'tenant_12ab34cd-56ef-78gh',
23+
'idempotency_key': 'addhist-20251006-001'
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))
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 = "XeroApi.CreateBankTransactionHistory";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"bank_transaction_id": "btrx_9f8e7d6c",
20+
"tenant_id": "tenant_12345",
21+
"idempotency_key": "create-history-2025-10-06-01"
22+
};
23+
24+
const response = await client.tools.execute({
25+
tool_name: TOOL_NAME,
26+
input: toolInput,
27+
user_id: USER_ID,
28+
});
29+
30+
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 = "XeroApi.CreateBankTransactionHistory"
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+
'bank_transaction_id': 'btrx_9f8e7d6c',
22+
'tenant_id': 'tenant_12345',
23+
'idempotency_key': 'create-history-2025-10-06-01'
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)