Connect your AI coding agent to your Mobazha store via MCP (Model Context Protocol). Once connected, your agent can directly manage products, orders, messages, and more.
> This skill requires credentials. The agent needs an API token from your store to connect. The agent must ask for your explicit consent before initiating any connection to your store. Tokens should be stored in environment variables, never committed to source control.
After connecting, your AI agent has access to 30+ store management tools:
| Category | Tools | What They Do |
|---|---|---|
| ---------- | ------- | ------------- |
| Products | listings_create, listings_update, listings_delete, listings_list_mine, listings_import_json | Full product CRUD + bulk import |
| Orders | orders_get_sales, orders_confirm, orders_fulfill, orders_refund | Order lifecycle |
| Chat | chat_get_conversations, chat_send_message | Buyer communication |
| Discounts | discounts_create, discounts_update, discounts_delete | Promotions |
| Collections | collections_create, collections_add_products | Product organization |
| Profile | profile_get, profile_update | Store identity |
| Notifications | notifications_list, notifications_mark_read | Activity feed |
| Search | search_listings, search_profiles | Marketplace discovery |
| Finance | exchange_rates_get, wallet_get_receiving_accounts, fiat_get_providers | Payments and rates |
All Mobazha deployments include a built-in MCP SSE endpoint. This is the recommended method because:
| Deployment | SSE URL |
|---|---|
| ------------ | --------- |
| SaaS | https://app.mobazha.org/platform/v1/mcp/sse |
| Standalone (custom domain) | https://shop.example.com/platform/v1/mcp/sse |
| Standalone (local Docker) | http://localhost/platform/v1/mcp/sse |
| Native install (local) | http://localhost:5102/platform/v1/mcp/sse |
| Native install (VPS) | http:// |
app.mobazha.orgOpen your store's admin panel in a browser and generate a token via Settings > API, or via curl:
curl -X POST https://shop.example.com/platform/v1/auth/tokens \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "<your-admin-password>"}'
The default gateway port for native installs is 5102:
curl -X POST http://localhost:5102/platform/v1/auth/tokens \
-H "Content-Type: application/json" \
-d '{"username": "admin", "password": "<your-admin-password>"}'
For a VPS, replace localhost with your server's IP or use an SSH tunnel:
ssh -L 5102:localhost:5102 root@<vps-ip>
# Then use http://localhost:5102 from your local machine
Add to ~/.claude.json (or project-level .mcp.json):
{
"mcpServers": {
"mobazha-store": {
"type": "sse",
"url": "https://shop.example.com/platform/v1/mcp/sse",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"mobazha-store": {
"url": "https://shop.example.com/platform/v1/mcp/sse",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Or go to Settings > MCP Servers > Add Server and enter the SSE URL.
codex mcp add mobazha-store --transport sse \
--url "https://shop.example.com/platform/v1/mcp/sse" \
--header "Authorization: Bearer <your-token>"
Add to opencode.json:
{
"mcp": {
"mobazha-store": {
"type": "sse",
"url": "https://shop.example.com/platform/v1/mcp/sse",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
> Replace https://shop.example.com with your actual store URL from the table above.
Ask your AI agent:
> "List my store's products" or "Show my recent orders"
The agent should call listings_list_mine or orders_get_sales and return results. If it works, the connection is live.
For a guide on what you can do with MCP tools, see the store-management skill.
For environments where SSE is not supported by the AI agent, or for air-gapped setups, a mobazha-mcp stdio binary is available. It ships with the standalone Docker image and native install.
The binary is bundled in the container:
docker exec -it <container> mobazha-mcp --gateway-url http://localhost:5102 --token <token>
| Flag | Env Variable | Default | Description |
|---|---|---|---|
| ------ | ------------- | --------- | ------------- |
--gateway-url | MOBAZHA_GATEWAY_URL | http://localhost:5102 | Store gateway URL |
--token | MOBAZHA_TOKEN | (required) | Bearer token |
--search-url | MOBAZHA_SEARCH_URL | (optional) | Marketplace search API URL |
{
"mcpServers": {
"mobazha-store": {
"command": "mobazha-mcp",
"args": ["--gateway-url", "http://localhost:5102"],
"env": {
"MOBAZHA_TOKEN": "<your-token>"
}
}
}
}
curl http://localhost:5102/healthzcurl http://localhost/healthzcurl -H "Authorization: Bearer " http://localhost:5102/v1/profiles search_listings and search_profiles require the marketplace search servicelistings:write for listings_create).gitignore if they contain tokens共 1 个版本