Sponsored by Deepsite.site

Square Model Context Protocol Server (Beta)

Created By
mikeysrecipes7 months ago
Content

Square Model Context Protocol Server (Beta)

This project follows the Model Context Protocol standard, allowing AI assistants to interact with Square's connect API.

Quick Start

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. You can also set environment variables before running the command.

Remote MCP Server

Square now 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.

Configuration Options

Environment VariablePurposeExample
ACCESS_TOKENYour Square API access tokenACCESS_TOKEN=sq0atp-...
SANDBOXUse Square sandbox environmentSANDBOX=true
PRODUCTIONUse Square production environmentPRODUCTION=true
DISALLOW_WRITESRestrict to read-only operationsDISALLOW_WRITES=true
SQUARE_VERSIONSpecify Square API versionSQUARE_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%2Fsse&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.

# 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.

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

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

Local MCP

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

Tool Reference

The Square MCP Server provides a streamlined set of tools for interacting with Square APIs:

ToolDescriptionPrimary Use
get_service_infoDiscover methods available for a serviceExploration and discovery
get_type_infoGet detailed parameter requirementsRequest preparation
make_api_requestExecute API calls to SquarePerforming 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:

ServiceDescription
applepayApple Pay integration
bankaccountsBank account management
bookingcustomattributesCustom attributes for bookings
bookingsAppointment booking management
cardsPayment card management
cashdrawersCash drawer management
catalogCatalog management (items, categories, etc.)
checkoutCheckout and payment processing
customercustomattributesCustom attributes for customers
customergroupsCustomer grouping
customersegmentsCustomer segmentation
customersCustomer management
devicesSquare device management
disputesPayment dispute handling
eventsEvent tracking
giftcardactivitiesGift card activity tracking
giftcardsGift card management
inventoryInventory tracking
invoicesInvoice management
laborWorkforce management
locationcustomattributesCustom attributes for locations
locationsLocation management
loyaltyLoyalty program management
merchantcustomattributesCustom attributes for merchants
merchantsMerchant account management
oauthAuthentication
ordercustomattributesCustom attributes for orders
ordersOrder management
paymentsPayment processing
payoutsPayout management
refundsRefund management
sitesWebsite integration
snippetsSquare Online Code integration
subscriptionsSubscription management
teamStaff management
terminalSquare Terminal management
vendorsSupplier management
webhooksubscriptionsEvent notifications

Usage Pattern

For optimal interaction with the Square API through MCP:

  1. Discover: Use get_service_info to explore available methods

    get_service_info(service: "catalog")
    
  2. Understand: Use get_type_info to learn parameter requirements

    get_type_info(service: "catalog", method: "list")
    
  3. Execute: Use make_api_request to perform the operation

    make_api_request(service: "catalog", method: "list", request: {})
    

Development and Debugging

Using MCP Inspector

The MCP Inspector provides a visual interface for testing:

# Build the project
npm run build

# Start the inspector with the Square MCP Server
npx @modelcontextprotocol/inspector node dist/index.js start

Development Workflow

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start development mode: npm run watch
  4. Run the server: node dist/index.js start
  5. Test your changes using the MCP Inspector

Contributing

This repository is auto-generated from Square's OpenAPI Specification. While contributions are welcome, please note that changes will need to be incorporated into the generator that produces this code. Please open an issue to discuss proposed changes before submitting a pull request.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
CursorThe AI Code Editor
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.