home / mcp / square mcp server
A Model Context Protocol (MCP) server for square
Configuration
View docs{
"mcpServers": {
"square-square-mcp-server": {
"url": "https://mcp.squareup.com/sse",
"headers": {
"SANDBOX": "true",
"PRODUCTION": "true",
"ACCESS_TOKEN": "sq0atp-...",
"SQUARE_VERSION": "2025-04-16",
"DISALLOW_WRITES": "true"
}
}
}
}You run the Square MCP Server to give AI assistants access to Square’s API through the Model Context Protocol. It lets you discover, prepare, and execute Square API calls in a secure and managed way, so your assistants can perform actions like catalog queries, customer management, and payments through a consistent interface.
You connect with an MCP client to the Square MCP Server to explore available methods, understand parameter requirements, and execute API requests. Start the local server for development or use the hosted remote MCP server for a streamlined setup that handles authentication for you.
Prerequisites: you need Node.js and npm installed on your machine. You may also use npx for quick, one-off commands.
# Basic startup using local MCP server
npx square-mcp-server start
# With environment configuration (replace with your token and options)
ACCESS_TOKEN=YOUR_SQUARE_ACCESS_TOKEN SANDBOX=true npx square-mcp-server start
# For a local project path
npx /path/to/project/square-mcp-serverYou can run the server in two ways: as a remote MCP server or as a local (stdio) MCP server. The remote MCP is hosted at a Square URL and handles OAuth authentication for you. The local MCP runs on your machine via npx and uses an access token you provide.
{
"mcpServers": {
"square_api_mcp": {
"type": "http",
"name": "square_api_mcp",
"url": "https://mcp.squareup.com/sse",
"args": []
},
"square_mcp": {
"type": "stdio",
"name": "square_mcp",
"command": "npx",
"args": ["square-mcp-server", "start"],
"env": {
"ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN",
"SANDBOX": "true"
}
}
}
}Keep your Square access token secure. Do not commit tokens to version control. When using the local MCP, store tokens in environment variables and consider using a secret manager for production deployments.
If you choose the hosted remote MCP, you can log in with your Square account directly and avoid managing access tokens manually. Use the hosted endpoint and follow standard OAuth flows supported by the remote MCP.
When developing locally, you can build and test using the MCP Inspector to verify endpoint discovery, parameter requirements, and request execution. Start the server in development mode as described in the setup steps and use the inspector to validate your changes.
If you encounter token or authentication issues, verify that the ACCESS_TOKEN value is correct and that SANDBOX or PRODUCTION flags align with your environment. For read-only testing, set DISALLOW_WRITES to true. Ensure the Square API version matches your integration requirements by setting SQUARE_VERSION.
The Square MCP Server exposes tools to discover, describe, and execute API calls. You can discover available methods, learn parameter requirements, and perform API requests to Square services.
1. Discover: Use the available discovery tool to list methods for a service like catalog.
2. Understand: Use the type information tool to learn required parameters for a method.
3. Execute: Use the API request tool to perform an operation, supplying the necessary parameters.
# Build the project
npm run build
# Start the MCP Inspector paired with the Square MCP Server
npx @modelcontextprotocol/inspector node dist/index.js startContributions are welcome. Changes should be reflected in the MCP code generator and tested with the inspector. Open issues to discuss proposed changes before submitting PRs.
Discover methods available for a service to understand what you can call and how to structure requests.
Fetch detailed parameter requirements for a specific method to prepare correct requests.
Execute API calls against Square services to perform operations.