SS

square/square-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

111 stars 27 forks 质量 81 趋势 9Apache-2.0

square/square-mcp-server 是从 https://github.com/square/square-mcp-server. 导入的 MCP 服务器候选

概览

square/square-mcp-server 是从 https://github.com/square/square-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

该项目遵循模型上下文协议(Model Context Protocol)标准,允许AI助手与Square的Connect API交互。

大多数人应该使用托管服务器。 Square 在 https://mcp.squareup.com/mcp 运行一个远程 MCP 服务器,支持 OAuth 登录;请参见 Square MCP 文档,了解如何与你的 AI 助手一起设置。这个仓库是本地的自架服务器:如果你想运行自己的副本,可以作为起点。代码更改会通过贡献中描述的生成器进行。

快速启动

用npx启动本地服务器。这样可以在你自己的机器上运行服务器,使用你自己的访问令牌;关于托管服务器,请参见上面说明。

将YOUR_SQUARE_ACCESS_TOKEN替换为你实际的Square访问令牌。你可以按照Square访问令牌指南获得访问令牌。你也可以在执行命令前设置环境变量。

远程MCP服务器

Square 提供一个托管的远程 MCP 服务器:

推荐使用远程服务器:它使用OAuth,所以你用Square账户登录,而不是创建和管理访问令牌。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Square Model Context Protocol Server (Beta)

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.

# 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 offers a hosted remote MCP server at:

https://mcp.squareup.com/mcp

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:

在 GitHub 查看完整 README

安装

npx mcp-remote https://mcp.squareup.com/mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp_square_api": { "command": "npx", "args": ["mcp-remote", "https://mcp.squareup.com/mcp"] } } }