Square Integration
Manage Square merchants, locations, customers, catalog, orders, payments, refunds, and invoices
The Square integration provides access to manage Square merchants, locations, customers, catalog, orders, payments, refunds, and invoices through the Integrate MCP server.
Installation
The Square integration is included with the SDK:
import { squareIntegration } from "integrate-sdk/server";Setup
1. Create a Square OAuth App
- Create an OAuth application for Square
- Configure your redirect URI
- Note your Client ID and Client Secret
2. Configure the Integration on Your Server
Add the Square integration to your server configuration. The integration automatically reads SQUARE_CLIENT_ID and SQUARE_CLIENT_SECRET from your environment variables:
import { createMCPServer, squareIntegration } from "integrate-sdk/server";
export const { client: serverClient } = createMCPServer({
apiKey: process.env.INTEGRATE_API_KEY,
integrations: [
squareIntegration({
scopes: ["MERCHANT_PROFILE_READ", "PAYMENTS_READ", "PAYMENTS_WRITE", "CUSTOMERS_READ", "CUSTOMERS_WRITE", "ORDERS_READ", "ORDERS_WRITE", "ITEMS_READ", "ITEMS_WRITE", "INVOICES_READ", "INVOICES_WRITE"], // Optional
}),
],
});You can override the environment variables by passing explicit values:
squareIntegration({
clientId: process.env.CUSTOM_SQUARE_ID,
clientSecret: process.env.CUSTOM_SQUARE_SECRET,
scopes: ["MERCHANT_PROFILE_READ", "PAYMENTS_READ", "PAYMENTS_WRITE", "CUSTOMERS_READ", "CUSTOMERS_WRITE", "ORDERS_READ", "ORDERS_WRITE", "ITEMS_READ", "ITEMS_WRITE", "INVOICES_READ", "INVOICES_WRITE"], // Optional
});3. Client-Side Usage
The default client automatically includes all integrations. You can use it directly:
import { client } from "integrate-sdk";
await client.authorize("square");
const result = await client.square.getMerchant({});
console.log(result);If you're using a custom client, add the integration to the integrations array:
import { createMCPClient, squareIntegration } from "integrate-sdk";
const customClient = createMCPClient({
integrations: [squareIntegration()],
});Configuration Options
Prop
Type
Default Scopes
These defaults are applied unless you override scopes in the integration config:
MERCHANT_PROFILE_READPAYMENTS_READPAYMENTS_WRITECUSTOMERS_READCUSTOMERS_WRITEORDERS_READORDERS_WRITEITEMS_READITEMS_WRITEINVOICES_READINVOICES_WRITE
Tools
square_get_merchant
Get merchant
No parameters.
square_list_locations
List locations
No parameters.
square_list_customers
List customers
Prop
Type
square_get_customer
Get customer
Prop
Type
square_create_customer
Create customer
Prop
Type
square_update_customer
Update customer
Prop
Type
square_delete_customer
Delete customer
Prop
Type
square_search_catalog
Search catalog
Prop
Type
square_retrieve_catalog_object
Retrieve catalog object
Prop
Type
square_upsert_catalog_object
Upsert catalog object
Prop
Type
square_search_orders
Search orders
Prop
Type
square_create_order
Create order
Prop
Type
square_pay_order
Pay order
Prop
Type
square_list_payments
List payments
Prop
Type
square_get_payment
Get payment
Prop
Type
square_create_payment
Create payment
Prop
Type
square_list_refunds
List refunds
Prop
Type
square_refund_payment
Refund payment
Prop
Type
square_list_invoices
List invoices
Prop
Type
square_get_invoice
Get invoice
Prop
Type
square_create_invoice
Create invoice
Prop
Type
Notes
- Category: Finance
- Authentication mode: OAuth