@commerceforai/mcp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +14 -1
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -206,10 +206,23 @@ export function buildServer(commerce, cfg) {
206
206
  write: true,
207
207
  input: { plan_id: z.string().optional() },
208
208
  }, async (a) => out(await commerce.store.sync({ plan_id: a.plan_id })));
209
+ tool("sales_tax_status", {
210
+ description: "Sales tax readiness: whether collection is on, Stripe Tax setup status, registered states, the next step, and the tax categories. Stripe collects only where the merchant has added a registration; the merchant registers and files. Don't tell the owner what they legally owe; suggest an accountant.",
211
+ input: {},
212
+ }, async () => out(await commerce.store.tax()));
213
+ tool("configure_sales_tax", {
214
+ description: "Turn Stripe Tax collection on or off, and set the default tax category for products without their own (e.g. txcd_30011000 for clothing; see sales_tax_status for categories). Changes what customers pay, so get the owner's OK. Set one product's category with update_product tax_code.",
215
+ write: true,
216
+ input: { enabled: z.boolean().optional(), default_tax_code: z.string().nullable().optional() },
217
+ }, async (a) => out(await commerce.store.update({ ...(a.enabled !== undefined ? { tax_enabled: a.enabled } : {}), ...(a.default_tax_code !== undefined ? { default_tax_code: a.default_tax_code } : {}) })));
218
+ tool("sales_by_state", {
219
+ description: "Sales, orders and tax collected by state over the last N days (default 365), with which states are registered. `watch` marks US states near common registration thresholds, worth checking with an accountant; it isn't a legal determination.",
220
+ input: { days: z.number().int().min(1).max(366).optional() },
221
+ }, async (a) => out(await commerce.reports.tax(a)));
209
222
  tool("update_product", {
210
223
  description: "Update a product's name, description, images, or set active=false to stop selling it.",
211
224
  write: true,
212
- input: { product_id: z.string(), name: z.string().optional(), description: z.string().optional(), images: z.array(z.string().url()).optional(), active: z.boolean().optional() },
225
+ input: { product_id: z.string(), name: z.string().optional(), description: z.string().optional(), images: z.array(z.string().url()).optional(), active: z.boolean().optional(), tax_code: z.string().nullable().optional() },
213
226
  }, async ({ product_id, ...rest }) => out(await commerce.products.update(product_id, rest)));
214
227
  tool("update_variant", {
215
228
  description: "Change a variant's price (cents), name, SKU, or set active=false to stop selling it.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commerceforai/mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server that lets AI agents operate a CommerceForAI store, with guardrails.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "@modelcontextprotocol/sdk": "^1.32.2",
15
15
  "zod": "^4.6.7",
16
- "commerceforai": "0.1.0"
16
+ "commerceforai": "0.1.1"
17
17
  },
18
18
  "main": "./dist/index.js",
19
19
  "types": "./dist/index.d.ts",
@@ -36,6 +36,7 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
+ "mcpName": "com.commerceforai/mcp",
39
40
  "scripts": {
40
41
  "build": "tsc -p tsconfig.json",
41
42
  "typecheck": "tsc -p tsconfig.json --noEmit"