Square Model Context Protocol Server

by square
Apache 2.0
157
44

Integrations

  • Enables integration with Apple Pay through Square's API, allowing for payment processing via Apple's payment platform.

  • Provides access to Square's complete API ecosystem, enabling interactions with services such as catalog management, customer management, payment processing, order management, inventory tracking, appointment booking, gift cards, loyalty programs, and many other Square business services.

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.

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:

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

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

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Enables AI assistants to interact with Square's Connect API through the Model Context Protocol standard, allowing for operations like managing customers, processing payments, and handling inventory.

  1. Quick Start
    1. Configuration Options
      1. Integration with AI Assistants
        1. Goose Integration
        2. Claude Desktop Integration
      2. Tool Reference
        1. Service Catalog
          1. Usage Pattern
            1. Development and Debugging
              1. Using MCP Inspector
              2. Development Workflow
            2. Contributing

              Related MCP Servers

              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.
                Last updated -
                1
                TypeScript
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that connects AI assistants like Claude to Moneybird accounting software, enabling management of contacts, financial data, products, and business operations through natural language.
                Last updated -
                1
                JavaScript
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server enabling AI assistants to interact with Kong Konnect's API Gateway, providing tools to query analytics data, inspect configurations, and manage control planes through natural language.
                Last updated -
                10
                22
                TypeScript
                Apache 2.0
                • Apple
              • A
                security
                A
                license
                A
                quality
                A server implementing Model Context Protocol that enables AI assistants to interact with Slack API through a standardized interface, providing tools for messaging, channel management, user information retrieval, and more.
                Last updated -
                9
                18
                JavaScript
                Apache 2.0

              View all related MCP servers

              ID: sbtj6cl8kw