{"_id":"square-mcp-server","_rev":"3-a34de66efa5abc700ecafce4c3555c29","name":"square-mcp-server","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"square-mcp-server","version":"0.1.0","author":{"name":"Block, Inc"},"license":"APACHE-2.0","_id":"square-mcp-server@0.1.0","maintainers":[{"name":"block-oss-releases","email":"oss-releases@block.xyz"}],"bin":{"square-mcp-server":"dist/index.js"},"dist":{"shasum":"b76d1f3db1eb242c5d81bc552812eb6f69537fb3","tarball":"https://registry.npmjs.org/square-mcp-server/-/square-mcp-server-0.1.0.tgz","fileCount":47,"integrity":"sha512-0LsnxCK/unaORgHkqrf54O+URPRKS9RxbzKFJluzjGlQTRnSK0E+FPkqbBKpOKZQSi52YYQC6M7AowyjNA+/Vw==","signatures":[{"sig":"MEYCIQDvi3vkB3aYjztVfTKGQeGjYf+a5Z38soeDFS3EkzkLJQIhAJ83J0TXR+nEUAaX3hk4O+1AtqpQ7grm5PG3a8nnXX8n","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3152717},"type":"module","gitHead":"0f5311641c4f41b90da099d772aff40e57aee2d9","scripts":{"build":"tsc && shx chmod +x dist/*.js","start":"node dist/index.js start","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"block-oss-releases","email":"oss-releases@block.xyz"},"_npmVersion":"10.8.2","description":"MCP Server for Square API","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"^3.22.4","cors":"^2.8.5","open":"^10.1.0","yaml":"^2.7.0","yargs":"^17.7.2","dotenv":"^16.4.5","express":"^5.0.1","commander":"^12.0.0","form-data":"^4.0.0","node-fetch":"^3.3.2","escape-html":"^1.0.3","@modelcontextprotocol/sdk":"^1.5.0"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","typescript":"^5.6.2","@types/cors":"^2.8.17","@types/node":"^22","@types/yargs":"^17.0.33","@types/express":"^5.0.0","@types/form-data":"^2.5.0","@types/node-fetch":"^2.6.11","@types/escape-html":"^1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/square-mcp-server_0.1.0_1745596318860_0.3830811583425995","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"square-mcp-server","version":"0.1.1","author":{"name":"Block, Inc"},"license":"APACHE-2.0","_id":"square-mcp-server@0.1.1","maintainers":[{"name":"block-oss-releases","email":"oss-releases@block.xyz"}],"bin":{"square-mcp-server":"dist/index.js"},"dist":{"shasum":"2e337aedefb555d286603ac51c866e69aa125742","tarball":"https://registry.npmjs.org/square-mcp-server/-/square-mcp-server-0.1.1.tgz","fileCount":47,"integrity":"sha512-mT7HiD6uDWrv5n+io+rTPbvXN51EHmxlE8IHssfk+aPjZjaefzZCgH0kcg3IlZhzhoAI7dgffANSJNRjIS+10w==","signatures":[{"sig":"MEYCIQCwBW7OyzOho6L/BVkWKbDSq/2Whn99yrmblMXp2r/PngIhANE3gn/J5Vdae2+CRAHRnuamtZihq0lE1YdwXeli5vT2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3152687},"type":"module","gitHead":"ea7e4b1b24abdac7a29ba541ac1b267fe2ed119f","scripts":{"build":"tsc && shx chmod +x dist/*.js","start":"node dist/index.js start","watch":"tsc --watch","prepare":"npm run build"},"_npmUser":{"name":"block-oss-releases","email":"oss-releases@block.xyz"},"_npmVersion":"10.8.2","description":"MCP Server for Square API","directories":{},"_nodeVersion":"20.19.0","dependencies":{"zod":"^3.22.4","cors":"^2.8.5","open":"^10.1.0","yaml":"^2.7.0","yargs":"^17.7.2","dotenv":"^16.4.5","express":"^5.0.1","commander":"^12.0.0","form-data":"^4.0.0","node-fetch":"^3.3.2","escape-html":"^1.0.3","@modelcontextprotocol/sdk":"^1.5.0"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.4","typescript":"^5.6.2","@types/cors":"^2.8.17","@types/node":"^22","@types/yargs":"^17.0.33","@types/express":"^5.0.0","@types/form-data":"^2.5.0","@types/node-fetch":"^2.6.11","@types/escape-html":"^1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/square-mcp-server_0.1.1_1745596819110_0.621630724631929","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"square-mcp-server","version":"0.1.2","description":"MCP Server for Square API","license":"APACHE-2.0","author":{"name":"Block, Inc"},"type":"module","bin":{"square-mcp-server":"dist/index.js"},"scripts":{"build":"tsc && shx chmod +x dist/*.js","prepare":"npm run build","watch":"tsc --watch","start":"node dist/index.js start"},"dependencies":{"@modelcontextprotocol/sdk":"^1.5.0","commander":"^12.0.0","cors":"^2.8.5","dotenv":"^16.4.5","escape-html":"^1.0.3","express":"^5.0.1","form-data":"^4.0.0","node-fetch":"^3.3.2","open":"^10.1.0","yaml":"^2.7.0","yargs":"^17.7.2","zod":"^3.22.4"},"devDependencies":{"@types/cors":"^2.8.17","@types/escape-html":"^1.0.4","@types/express":"^5.0.0","@types/form-data":"^2.5.0","@types/node":"^22","@types/node-fetch":"^2.6.11","@types/yargs":"^17.0.33","shx":"^0.3.4","typescript":"^5.6.2"},"_id":"square-mcp-server@0.1.2","gitHead":"9ce4bef75d5f8c4a3e5564f1d5901f9384853d1c","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-rhK5ZV5Uz+EzHGzHWZN/EDNpU+aVSL0+04zZI6+qEgbSik8/FAqsM1KJg+NrhHnAJNMgPatL2p/ZVmEaXkxUHA==","shasum":"49b2f7d61755b5ae6f36e3ce1f4ba63a824d1cce","tarball":"https://registry.npmjs.org/square-mcp-server/-/square-mcp-server-0.1.2.tgz","fileCount":47,"unpackedSize":3154503,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA9+7L42i1A+iFWbGoYs7A2AkBiKXz/zB8F5+rW3iDmgAiEArMzN0/SBNI0zJ1j16MtLVU3Ecr70xRQ61MIx+VpBQWE="}]},"_npmUser":{"name":"block-oss-releases","email":"oss-releases@block.xyz"},"directories":{},"maintainers":[{"name":"block-oss-releases","email":"oss-releases@block.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/square-mcp-server_0.1.2_1745613592950_0.705562992715157"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-25T15:51:58.859Z","modified":"2025-04-25T20:39:53.346Z","0.1.0":"2025-04-25T15:51:59.050Z","0.1.1":"2025-04-25T16:00:19.343Z","0.1.2":"2025-04-25T20:39:53.176Z"},"author":{"name":"Block, Inc"},"license":"APACHE-2.0","description":"MCP Server for Square API","maintainers":[{"name":"block-oss-releases","email":"oss-releases@block.xyz"}],"readme":"# Square Model Context Protocol Server (Beta)\n\nThis project follows the [Model Context Protocol](https://modelcontextprotocol.com/) standard, allowing AI assistants to interact with Square's connect API.\n\n## Quick Start\n\nGet up and running with the Square MCP server using npx:\n\n```bash\n# Basic startup\nnpx square-mcp-server start\n\n# With environment configuration\nACCESS_TOKEN=YOUR_SQUARE_ACCESS_TOKEN SANDBOX=true npx square-mcp-server start\n\n# local runs\nnpx /path/to/project/square-mcp-server\n```\n\nReplace `YOUR_SQUARE_ACCESS_TOKEN` with your actual Square access token. You can obtain your access token by following the guide at [Square Access Tokens](https://developer.squareup.com/docs/build-basics/access-tokens). You can also set environment variables before running the command.\n\n## Configuration Options\n\n| Environment Variable | Purpose | Example |\n|---------------------|---------|---------|\n| `ACCESS_TOKEN` | Your Square API access token | `ACCESS_TOKEN=sq0atp-...` |\n| `SANDBOX` | Use Square sandbox environment | `SANDBOX=true` |\n| `PRODUCTION` | Use Square production environment | `PRODUCTION=true` |\n| `DISALLOW_WRITES` | Restrict to read-only operations | `DISALLOW_WRITES=true` |\n| `SQUARE_VERSION` | Specify Square API version | `SQUARE_VERSION=2025-04-16` |\n\n## Integration with AI Assistants\n\n### Goose Integration\n\nTo configure the Square MCP Server with [Goose](https://block.github.io/goose/):\n\n```bash\n# Automatic installation\nnpx square-mcp-server install\n\n# Get URL for manual installation\nnpx square-mcp-server get-goose-url\n```\n\nThe `install` command automatically updates your Goose configuration.\n\n### Claude Desktop Integration\n\nFor Claude Desktop integration, see the [Model Context Protocol Quickstart Guide](https://modelcontextprotocol.io/quickstart/user). Add this configuration to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp_square_api\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"square-mcp-server\",\n        \"start\"\n      ],\n      \"env\": {\n        \"ACCESS_TOKEN\": \"YOUR_SQUARE_ACCESS_TOKEN\",\n        \"SANDBOX\": \"true\"\n      }\n    }\n  }\n}\n```\n\n## Tool Reference\n\nThe Square MCP Server provides a streamlined set of tools for interacting with Square APIs:\n\n| Tool | Description | Primary Use |\n|------|-------------|------------|\n| `get_service_info` | Discover methods available for a service | Exploration and discovery |\n| `get_type_info` | Get detailed parameter requirements | Request preparation |\n| `make_api_request` | Execute API calls to Square | Performing operations |\n\n## Service Catalog\n\nSquare MCP Server provides access to Square's complete [API ecosystem](https://developer.squareup.com/reference/square). Check out the [Square API Documentation](https://developer.squareup.com/docs) for detailed information about each service:\n\n| Service | Description |\n|---------|-------------|\n| `applepay` | Apple Pay integration |\n| `bankaccounts` | Bank account management |\n| `bookingcustomattributes` | Custom attributes for bookings |\n| `bookings` | Appointment booking management |\n| `cards` | Payment card management |\n| `cashdrawers` | Cash drawer management |\n| `catalog` | Catalog management (items, categories, etc.) |\n| `checkout` | Checkout and payment processing |\n| `customercustomattributes` | Custom attributes for customers |\n| `customergroups` | Customer grouping |\n| `customersegments` | Customer segmentation |\n| `customers` | Customer management |\n| `devices` | Square device management |\n| `disputes` | Payment dispute handling |\n| `events` | Event tracking |\n| `giftcardactivities` | Gift card activity tracking |\n| `giftcards` | Gift card management |\n| `inventory` | Inventory tracking |\n| `invoices` | Invoice management |\n| `labor` | Workforce management |\n| `locationcustomattributes` | Custom attributes for locations |\n| `locations` | Location management |\n| `loyalty` | Loyalty program management |\n| `merchantcustomattributes` | Custom attributes for merchants |\n| `merchants` | Merchant account management |\n| `oauth` | Authentication |\n| `ordercustomattributes` | Custom attributes for orders |\n| `orders` | Order management |\n| `payments` | Payment processing |\n| `payouts` | Payout management |\n| `refunds` | Refund management |\n| `sites` | Website integration |\n| `snippets` | Square Online Code integration |\n| `subscriptions` | Subscription management |\n| `team` | Staff management |\n| `terminal` | Square Terminal management |\n| `vendors` | Supplier management |\n| `webhooksubscriptions` | Event notifications |\n\n## Usage Pattern\n\nFor optimal interaction with the Square API through MCP:\n\n1. **Discover**: Use `get_service_info` to explore available methods\n   ```\n   get_service_info(service: \"catalog\")\n   ```\n\n2. **Understand**: Use `get_type_info` to learn parameter requirements\n   ```\n   get_type_info(service: \"catalog\", method: \"list\")\n   ```\n\n3. **Execute**: Use `make_api_request` to perform the operation\n   ```\n   make_api_request(service: \"catalog\", method: \"list\", request: {})\n   ```\n\n## Development and Debugging\n\n### Using MCP Inspector\n\nThe [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) provides a visual interface for testing:\n\n```bash\n# Build the project\nnpm run build\n\n# Start the inspector with the Square MCP Server\nnpx @modelcontextprotocol/inspector node dist/index.js start\n```\n\n### Development Workflow\n\n1. Clone the repository\n2. Install dependencies: `npm install`\n3. Start development mode: `npm run watch`\n4. Run the server: `node dist/index.js start`\n5. Test your changes using the MCP Inspector\n\n## Contributing\n\nThis 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.","readmeFilename":"README.md"}