The Square Model Context Protocol Server is a tool that allows AI assistants to interact with Square's connect API by following the Model Context Protocol standard. It provides a streamlined interface for working with Square's payment processing, inventory management, and other business services.
Get up and running with the Square MCP server using npx:
# Basic startup
npx square-mcp-server start
# With environment configuration
ACCESS_TOKEN=YOUR_SQUARE_ACCESS_TOKEN SANDBOX=true npx square-mcp-server start
# Local runs
npx /path/to/project/square-mcp-server
Replace YOUR_SQUARE_ACCESS_TOKEN
with your actual Square access token. You can obtain your access token by following the guide at Square Access Tokens.
Square offers a hosted remote MCP server at:
https://mcp.squareup.com/sse
The remote MCP is recommended as it uses OAuth authentication, allowing you to log in with your Square account directly without having to create or manage access tokens manually.
Environment Variable | Purpose | Example |
---|---|---|
ACCESS_TOKEN |
Your Square API access token | ACCESS_TOKEN=sq0atp-... |
SANDBOX |
Use Square sandbox environment | SANDBOX=true |
PRODUCTION |
Use Square production environment | PRODUCTION=true |
DISALLOW_WRITES |
Restrict to read-only operations | DISALLOW_WRITES=true |
SQUARE_VERSION |
Specify Square API version | SQUARE_VERSION=2025-04-16 |
To configure the Square MCP Server with Goose:
To install the Square remote MCP in Goose, click this URL on a computer where Goose is installed or copy and paste the URL into your browser's address bar:
# Automatic installation
npx square-mcp-server install
# Get URL for manual installation
npx square-mcp-server get-goose-url
The install
command automatically updates your Goose configuration.
For Claude Desktop integration:
{
"mcpServers": {
"mcp_square_api": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.squareup.com/sse"]
}
}
}
This approach allows you to authenticate directly with your Square account credentials without needing to manage access tokens.
{
"mcpServers": {
"mcp_square_api": {
"command": "npx",
"args": ["square-mcp-server", "start"],
"env": {
"ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN",
"SANDBOX": "true"
}
}
}
}
The Square MCP Server provides a streamlined set of tools for interacting with Square APIs:
Tool | Description | Primary Use |
---|---|---|
get_service_info |
Discover methods available for a service | Exploration and discovery |
get_type_info |
Get detailed parameter requirements | Request preparation |
make_api_request |
Execute API calls to Square | Performing operations |
Square MCP Server provides access to Square's complete API ecosystem. Some key services include:
For optimal interaction with the Square API through MCP:
Discover: Use get_service_info
to explore available methods
get_service_info(service: "catalog")
Understand: Use get_type_info
to learn parameter requirements
get_type_info(service: "catalog", method: "list")
Execute: Use make_api_request
to perform the operation
make_api_request(service: "catalog", method: "list", request: {})
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp_square_api" '{"command":"npx","args":["square-mcp-server","start"],"env":{"ACCESS_TOKEN":"YOUR_SQUARE_ACCESS_TOKEN","SANDBOX":"true"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp_square_api": {
"command": "npx",
"args": [
"square-mcp-server",
"start"
],
"env": {
"ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN",
"SANDBOX": "true"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp_square_api": {
"command": "npx",
"args": [
"square-mcp-server",
"start"
],
"env": {
"ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN",
"SANDBOX": "true"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect