Square Model Context Protocol Server
OfficialSquare 模型上下文协议服务器(测试版)
该项目遵循模型上下文协议标准,允许AI助手与Square的连接API进行交互。
快速入门
使用 npx 启动并运行 Square MCP 服务器:
# 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将YOUR_SQUARE_ACCESS_TOKEN替换为你实际的 Square 访问令牌。你可以按照Square 访问令牌中的指南获取访问令牌。你也可以在运行命令之前设置环境变量。
Related MCP server: AI-Assisted CRM MCP Server
远程 MCP 服务器
Square 现在提供托管的远程 MCP 服务器:
https://mcp.squareup.com/sse建议使用远程 MCP,因为它使用 OAuth 身份验证,允许您直接使用 Square 帐户登录,而无需手动创建或管理访问令牌。
配置选项
环境变量 | 目的 | 例子 |
| 您的 Square API 访问令牌 |
|
| 使用 Square 沙盒环境 |
|
| 使用 Square 生产环境 |
|
| 限制为只读操作 |
|
| 指定 Square API 版本 |
|
与人工智能助手集成
鹅集成
要使用Goose配置 Square MCP 服务器:
远程 MCP
要在 Goose 中安装 Square 远程 MCP,请在安装了 Goose 的计算机上单击此 URL:
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
或者将 URL 复制并粘贴到浏览器的地址栏中。
# Automatic installation
npx square-mcp-server install
# Get URL for manual installation
npx square-mcp-server get-goose-urlinstall命令会自动更新您的 Goose 配置。
Claude 桌面集成
对于 Claude Desktop 集成,请参阅模型上下文协议快速入门指南。将此配置添加到您的claude_desktop_config.json中:
远程 MCP
{
"mcpServers": {
"mcp_square_api": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.squareup.com/sse"]
}
}
}这种方法允许您直接使用 Square 帐户凭据进行身份验证,而无需管理访问令牌。
本地 MCP
{
"mcpServers": {
"mcp_square_api": {
"command": "npx",
"args": ["square-mcp-server", "start"],
"env": {
"ACCESS_TOKEN": "YOUR_SQUARE_ACCESS_TOKEN",
"SANDBOX": "true"
}
}
}
}工具参考
Square MCP 服务器提供了一套简化的工具用于与 Square API 交互:
工具 | 描述 | 主要用途 |
| 发现可用于服务的方法 | 探索与发现 |
| 获取详细参数要求 | 请求准备 |
| 执行 Square 的 API 调用 | 执行操作 |
服务目录
Square MCP 服务器提供对 Square 完整API 生态系统的访问。查看Square API 文档,了解各项服务的详细信息:
服务 | 描述 |
| Apple Pay 集成 |
| 银行账户管理 |
| 预订的自定义属性 |
| 预约管理 |
| 支付卡管理 |
| 现金抽屉管理 |
| 目录管理(项目、类别等) |
| 结账和付款处理 |
| 客户的自定义属性 |
| 客户分组 |
| 客户细分 |
| 客户管理 |
| Square设备管理 |
| 付款纠纷处理 |
| 事件追踪 |
| 礼品卡活动追踪 |
| 礼品卡管理 |
| 库存跟踪 |
| 发票管理 |
| 劳动力管理 |
| 位置的自定义属性 |
| 位置管理 |
| 忠诚度计划管理 |
| 商家自定义属性 |
| 商户账户管理 |
| 验证 |
| 订单的自定义属性 |
| 订单管理 |
| 付款处理 |
| 付款管理 |
| 退款管理 |
| 网站集成 |
| Square 在线代码集成 |
| 订阅管理 |
| 员工管理 |
| Square 终端管理 |
| 供应商管理 |
| 事件通知 |
使用模式
为了通过 MCP 与 Square API 实现最佳交互:
发现:使用
get_service_info探索可用的方法get_service_info(service: "catalog")理解:使用
get_type_info了解参数要求get_type_info(service: "catalog", method: "list")执行:使用
make_api_request执行操作make_api_request(service: "catalog", method: "list", request: {})
开发与调试
使用 MCP 检查器
MCP Inspector提供了一个可视化的测试界面:
# Build the project
npm run build
# Start the inspector with the Square MCP Server
npx @modelcontextprotocol/inspector node dist/index.js start开发工作流程
克隆存储库
安装依赖项:
npm install启动开发模式:
npm run watch运行服务器:
node dist/index.js start使用 MCP 检查器测试您的更改
贡献
此代码库根据 Square 的 OpenAPI 规范自动生成。欢迎贡献代码,但请注意,修改需要合并到生成此代码的生成器中。请在提交拉取请求之前,先创建一个问题来讨论建议的修改。
Available Tools
3 toolsget_service_infoA
Get information about a Square API service. Call me before trying to get type info
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | The Square API service category (e.g., 'catalog', 'payments') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must disclose behavior. It only says 'get information', without mentioning whether it's read-only, idempotent, or any side effects. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two efficient sentences: first states purpose, second provides usage guidance. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple info tool with one parameter, but lacks description of the output format or any additional behavioral context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% description coverage for the only parameter, so baseline is 3. Tool description does not add extra meaning beyond the schema parameter description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Describes a specific action: getting info about a Square API service. Explicitly differentiates from sibling tool get_type_info by telling the agent to call this before that.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear directive to call this before get_type_info, indicating proper ordering. However, no guidance on when not to use or alternatives like make_api_request.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_type_infoA
Get type information for a Square API method. You must call this before calling the make_api_request tool.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | The Square API service category (e.g., 'catalog', 'payments') | |
| method | Yes | The API method to call (e.g., 'list', 'create') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavior. It states it 'gets type information' but does not disclose whether it is read-only, any side effects, or what the response structure looks like, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose and a clear usage instruction. Every sentence adds value with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple prerequisite tool, the description is acceptable but lacks detail on return values and behavioral context. Given no output schema, the agent might need more info to effectively use the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with both parameters described. The description adds no additional information beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it gets type information for a Square API method, and the prerequisite relationship with make_api_request distinguishes it from sibling tools, though it does not specify what 'type information' entails.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs the agent to call this tool before make_api_request, providing clear usage context. However, it does not mention when not to use it or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
make_api_requestB
Unified tool for all Square API operations. Be sure to get types before calling. Available services: applepay, bankaccounts, bookingcustomattributes, bookings, cards, cashdrawers, catalog, checkout, customercustomattributes, customergroups, customersegments, customers, devices, disputes, events, giftcardactivities, giftcards, inventory, invoices, labor, locationcustomattributes, locations, loyalty, merchantcustomattributes, merchants, oauth, ordercustomattributes, orders, payments, payouts, refunds, sites, snippets, subscriptions, team, terminal, vendors, webhooksubscriptions.
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | The Square API service category (e.g., 'catalog', 'payments') | |
| method | Yes | The API method to call (e.g., 'list', 'create') | |
| request | No | The request object for the API call. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but only states it is a unified tool and lists services. It does not disclose that it makes HTTP calls, requires authentication, can modify data, or has rate limits. Minimal behavioral context is provided.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—two sentences with no superfluous words. It front-loads the core purpose and then lists services efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the tool's complexity (any API operation), the description lacks details on return values, how to structure the request object, or supported methods beyond 'list' and 'create' implied. Sibling tools exist but the description does not fully compensate for missing output schema or behavioral specifics.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds value by enumerating all available services, which is absent as enum constraints in the schema. This helps the agent select valid service values, going beyond the generic schema description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states it is a unified tool for all Square API operations, clearly indicating its purpose as a general-purpose API caller. It distinguishes from sibling tools (get_service_info, get_type_info) by specifying it performs operations rather than information retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises to 'get types before calling,' providing a prerequisite but not explicit when-to-use or when-not-to-use guidance. It implies this is the primary tool for API calls but does not contrast with alternatives beyond the mention of getting types.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
- First observed
get_service_info - First observed
get_type_info - First observed
make_api_request
TDQS
Scored across 3 tools
Each tool has a distinct and clearly defined role in the workflow (service info, type info, API request), with no overlap in purpose.
All tool names follow a consistent verb_noun pattern (get_service_info, get_type_info, make_api_request), using snake_case throughout.
Three tools is minimal but appropriate for a unified API wrapper, as the tools cover the essential introspection and request workflow.
The tool set covers the full lifecycle: discover services, get type information, and make API requests. No obvious gaps for the intended purpose.
Maintenance
Related MCP Connectors
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Connect AI to store orders, products and inventory with scoped access and human approvals.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely interact with Fireblocks services through the Model Context Protocol, supporting transaction management, vault and exchange account queries, network connections, and workspace user management.16 npm10MIT- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform CRM operations like creating contacts, managing deals, and updating leads through natural language using the Model Context Protocol.4-
- AlicenseAqualityCmaintenanceEnables AI agents to manage crypto payments, stores, products, and orders through the Model Context Protocol.2025 npmMIT
- FlicenseBqualityDmaintenanceConnects AI clients to retail customer, inventory, sales, order, and support capabilities through the Model Context Protocol.31-