Square Model Context Protocol Server (Beta)
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This project follows the Model Context Protocol standard, allowing AI assistants to interact with Square's connect API.
> **Most people should use the hosted server.** Square runs a remote MCP server at https://mcp.squareup.com/mcp with OAuth sign-in; see the Square MCP documentation for setup with your AI assistant. This repository is the local, self-hosted server: a starting point if you want to run your own copy. Code changes go through the generator described under Contributing.
Quick Start
Get up and running with the local server using npx. This runs the server on your own machine with your own access token; for the hosted server, see the note above.
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. You can also set environment variables before running the command.
Remote MCP Server
Square offers a hosted remote MCP server at:
The remote server is recommended: it uses OAuth, so you sign in with your Square account instead of creating and managing access tokens. Setup guides for Claude, ChatGPT, Goose and other assistants are in the Square MCP documentation. The older https://mcp.squareup.com/sse endpoint is still served for existing SSE configurations.
Configuration Options
| 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 |
Integration with AI Assistants
Goose Integration
To configure the Square MCP Server with Goose:
Remote MCP
To install the Square remote MCP in Goose, click this URL on a computer where Goose is installed:
goose://extension?cmd=npx&arg=mcp-remote&arg=https%3A%2F%2Fmcp.squareup.com%2Fmcp&id=square_mcp_production_remote&name=Square%20MCP%20Remote&description=Square%20Production%20MCP%20Remote
Or copy and paste the URL into your browser's address bar.
The commands below configure the local server (npx square-mcp-server start), not the hosted one:
The install command automatically updates your Goose configuration.
Claude Desktop Integration
For Claude Desktop integration, see the Model Context Protocol Quickstart Guide. Add this configuration to your claude_desktop_config.json:
Remote MCP
This approach allows you to authenticate directly with your Square account credentials without needing to manage access tokens.
Local MCP
Tool Reference
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 |
Service Catalog
Square MCP Server provides access to Square's complete API ecosystem. Check out the Square API Documentation for detailed information about each service: