Square Model Context Protocol Server

The Square Model Context Protocol (MCP) server implements the Model Context Protocol standard, providing a bridge between AI assistants and the Square REST API platform.

Link to section

Overview

Note

The Square MCP server is currently in Beta. To provide feedback or report bugs, open GitHub issues.

To view the MCP server source or contribute to the project, see GitHub - square/square-mcp-server.

You can configure your AI agent to use the Square MCP server hosted by Block as a remote server or you can set up and run the server locally for your AI agent's use. For information about running the Square MCP server locally, see Local Square MCP server quickstart.

Link to section

Square MCP server

The Square remote MCP server is hosted at:

https://mcp.squareup.com/sse
Link to section

MCP server tools

The Square MCP server connects your AI tools directly to the full Square API platform, giving you programmatic access to everything the APIs offer—customers, orders, items, and more. Use it to power natural language queries, generate code, and accelerate development with AI assistance.

Square recommends using the remote MCP server, which supports OAuth login with more control and granular permissions. This lets you securely sign in with your Square account and authorize only the scopes your application needs, with no manual token management required.

For testing, you can run a local instance configured to access a seller's Sandbox environment. Remote instances only access production resources.

Important

Square recommends that you become familiar with the server and test your prompts against a Square account Sandbox environment before using it in production.

Link to section

Integration with AI assistants

The Square MCP server works with many different AI assistants including:

Link to section

Integrate with Claude.ai

Add the Square MCP server to Claude.

Link to section

For Claude Enterprise & Teams (owners and primary owners)

  1. Navigate to Settings > Integrations (for Teams) or Settings > Data management (for Enterprise).
  2. In the Integrations section, choose Add more.
  3. Add the Square MCP server URL: https://mcp.squareup.com/sse.
  4. To finish configuring your integration, choose Add.
Link to section

For Claude Max

  1. Navigate to Settings > Profile.
  2. In the Integrations section, choose Add more.
  3. Add the Square MCP server URL: https://mcp.squareup.com/sse.
  4. To finish configuring your integration, choose Add.
Link to section

Enable the Square integration

  1. Open a chat with Claude.
  2. In the chat interface, access the Search and tools menu.
  3. Choose Connect to authenticate with your Square account.
  4. After connecting, use the same menu to enable specific Square tools.
Link to section

Integrate with Claude Desktop

Link to section

Remote MCP

Add an entry to claude_desktop_config.json as shown in the following example:

{ "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.

Link to section

Local MCP

Add an entry to claude_desktop_config.json as shown in the following example:

{ "mcpServers": { "mcp_square_api": { "command": "npx", "args": ["square-mcp-server", "start"], "env": { "ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN", "SANDBOX": "true" } } } }
Link to section

Integrate with Goose

Install Goose and then configure the Square MCP server as an extension for the Goose Desktop and Goose CLI. The Goose Desktop and CLI share the same configuration file so you only need to configure the MCP server once.

Link to section

Remote MCP server

To install the Square remote MCP server in Goose, click the Open Goose link on any computer with Goose installed, choose Open Goose, and then choose OK to confirm the extension installation. You can also copy and paste the URL into your browser's address bar.

Link to section

Local MCP server

To install the Square remote MCP server in Goose, run the following command:

npx square-mcp-server install # Auto-install local MCP for Goose npx square-mcp-server get-goose-url # Output a manual config URL

To learn more about using the Square MCP server with Goose, see Square MCP Extension.

Link to section

Integrate with Cursor

To connect Cursor with the Square MCP server, following the instructions for a remote or local MCP server.

Link to section

Remote MCP server

Choose Type: "Command" and in the Command field, enter the following (recommended for OAuth authentication):

npx mcp-remote https://mcp.squareup.com/sse

This allows you to log in with your Square account directly instead of managing access tokens.

Link to section

Local MCP server

Choose Type: "Command" and in the Command field, enter the following:

npx square-mcp-server start
Link to section

Integrate with Windsurf

Connect the Square MCP server to Windsurf by editing the mcp_config.json file:

Link to section

Remote MCP server

{ "mcpServers": { "square_api": { "command": "npx", "args": ["mcp-remote", "https://mcp.squareup.com/sse"] } } }

Using the remote MCP server enables OAuth authentication, allowing you to connect with your Square account credentials without managing access tokens.

Link to section

Local MCP server

{ "mcpServers": { "square_api": { "command": "npx", "args": ["square-mcp-server", "start"], "env": { "ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN", "SANDBOX": "true" } } } }
Link to section

Local Square MCP server quickstart

To run a local instance, you need to have Node.js installed. You can then set up and run the Square MCP server with a single command:

npx square-mcp-server start

To configure environment variables inline:

ACCESS_TOKEN=YOUR_SQUARE_ACCESS_TOKEN SANDBOX=true npx square-mcp-server start

To configure environment variables for local development:

npx /path/to/project/square-mcp-server

Note

You need your Square access token. For more information, see Access Tokens and Other Square Credentials.

Link to section

Local configuration

Set the following environment variables as needed:

VariablePurposeExample
ACCESS_TOKENYour Square API access tokenACCESS_TOKEN=sq0atp-...
SANDBOXUse the Square sandbox environmentSANDBOX=true
PRODUCTIONUse the Square production environmentPRODUCTION=true
DISALLOW_WRITESRestrict to read-only operationsDISALLOW_WRITES=true
SQUARE_VERSIONSpecify the Square API versionSQUARE_VERSION=2025-04-16