Clover商户集成
STDIO用于访问Clover API的MCP服务器
用于访问Clover API的MCP服务器
A minimal MCP server for interacting with the Clover API using OAuth authentication.
This MCP server allows generative AI models and other clients to access your Clover merchant data using the Model Context Protocol. With this integration, models can:
To install Clover MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ibraheem4/clover-mcp --client claude
~/.config/anthropic/claude.mcp.json
):{ "mcpServers": { "clover": { "command": "npx", "args": ["-y", "@ibraheem4/clover-mcp"], "env": { "CLOVER_CLIENT_ID": "your-clover-client-id", "CLOVER_CLIENT_SECRET": "your-clover-client-secret", "CLOVER_BASE_URL": "https://apisandbox.dev.clover.com" }, "disabled": false, "autoApprove": ["initiate_oauth_flow", "get_merchant_info", "list_inventory", "list_orders"] } } }
/mcp use clover
Can you help me connect to my Clover account?
You can run the MCP server directly:
# Install and run in one command npx @ibraheem4/clover-mcp # With credentials CLOVER_CLIENT_ID=your-client-id CLOVER_CLIENT_SECRET=your-client-secret npx @ibraheem4/clover-mcp
Before using this MCP server, you need to set up a Clover app:
http://localhost:4000/oauth-callback
Code
.env
fileThe following tools are available via the MCP protocol:
get_oauth_status
: Check if OAuth credentials are availableinitiate_oauth_flow
: Start the OAuth flow to get access tokensget_merchant_info
: Get information about the merchantlist_inventory
: List inventory items with optional filterslist_orders
: List orders with optional filtersHere are some example prompts you can use with Claude after connecting:
Connect to Clover:
I'd like to connect to my Clover account.
Get Merchant Information:
What information do you have about my Clover merchant account?
List Inventory Items:
Show me the first 10 items in my inventory.
List Orders:
Can you list my most recent orders?
npm install
cp .env.example .env # Edit .env with your Clover OAuth credentials
npm run build
./run.sh
To publish a new version to npm:
# Update version in package.json npm version patch # or minor, or major # Build and publish npm run build npm publish
If you encounter OAuth problems:
http://localhost:4000/oauth-callback
initiate_oauth_flow
MIT