Control Your Square Account Using AI: A Quick Guide to the Square Model Context Protocol
Want to use AI assistants to manage your Square account? The Square Model Context Protocol (MCP) server lets you do just that. It acts as a bridge, empowering AI to interact directly with Square's powerful APIs. This guide simplifies setup and usage, boosting your efficiency with AI-powered Square management.
What is the Square Model Context Protocol?
The Square Model Context Protocol provides a standardized way for AI applications and assistants to interact with the Square API. This project uses the Model Context Protocol standard, allowing AI assistants to interact with Square's connect API. Instead of manually navigating complex APIs, you can use natural language commands (or your favorite AI tool!) to get things done.
- Imagine asking your AI to "list all my catalog items" or "create a new customer". It's powerful, convenient, and saves you time!
Jumpstart: Setting Up the Square MCP Server
The easiest way to get started is using npx
. Here's how:
-
Basic Startup:
-
Configure with Your Access Token (Required):
Replace
YOUR_SQUARE_ACCESS_TOKEN
with your actual Square access token. You can find instructions at Square Access Tokens. -
For Local Development:
AI Assistant Integration: Using Square MCP with Popular Tools
Let's explore how to link the Square MCP server with two prominent AI assistants.
Seamless Goose Integration
Goose offers a streamlined approach to setting up the Square MCP server. Two options are available:
- Automatic Installation: This automatically configures your Goose settings for you.
- Manual Installation: This gives you the URL needed for manual setup within Goose.
Claude Desktop Integration
To integrate with Claude, manually add the following configuration to your claude_desktop_config.json
file:
Remember to replace YOUR_SQUARE_ACCESS_TOKEN
with your actual access token!
Understanding the Square Model Context Protocol Usage
Master the flow to efficiently utilize Square APIs via MCP:
- Discover (
get_service_info
): Find out what's possible. Useget_service_info(service: "catalog")
to see available methods within the "catalog" service. - Understand (
get_type_info
): Learn what parameters a specific method requires. For example,get_type_info(service: "catalog", method: "list")
tells you about the "list" method in the catalog service. - Execute (
make_api_request
): Make things happen! Usemake_api_request(service: "catalog", method: "list", request: {})
to execute the "list" method within the catalog service.
Development and Debugging Tips
The MCP Inspector provides a visual interface to develop and test.
- Build the project:
npm run build
- Start MCP Inspector with the Square MCP Server:
npx @modelcontextprotocol/inspector node dist/index.js start
To streamline your development process:
- Clone:
git clone
the repository. - Install: Run
npm install
to get all dependencies. - Watch: Start development mode with
npm run watch
. - Run: Launch the server using
node dist/index.js start
. - Test: Use the MCP Inspector to validate your changes.
Contributing to the Square MCP Server Project
Before contributing, please note:
- This repository is auto-generated from Square's OpenAPI Specification.
- Changes need to be incorporated into the generator.
- Open an issue to discuss changes before submitting a pull request.
Harnessing the Complete Square API Ecosystem
The Square MCP Server offers access to Square's complete API ecosystem. Refer to the Square API Documentation for in-depth information about each service. Integrate the Square Model Context Protocol to discover endless possibilities today!