Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
VEX_ENVNoPer-project default Vendure environment name for the MCP server (for example, "myproject-staging").
VEX_TOOLSNoSet to "lean" (alias "minimal") to register only the universal interface: vex_setup, vex_current_env, vex_refetch_schema, vex_query, vex_mutate, and vex_schema. The default (unset or "full") registers all 15 tools.full
VEX_PRETTY_JSONNoSet to "1" to pretty-print MCP responses. Responses are compact JSON by default.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

vex exposes the Vendure Admin GraphQL API as MCP tools, including custom plugin extensions.

No interactive authentication or login flow is required — vex authenticates to Vendure via the API key stored in the active environment (sent as the vendure-api-key header on every request). If a tool returns an auth error, the key is missing, wrong, or revoked; ask the user to update it via vex_setup rather than initiating a login.

If vex_setup action="show" reports no active env, ask the user for URL + API key and add one. The cached schema lives at the resource vendure://schema/<envName>; call vex_refetch_schema if stale.

Action-dispatch tools

Most tools take an action parameter that selects the operation; each tool's description lists its valid actions and the fields each one needs. Set action first, then supply only that action's fields. Example: vex_customers {action:"list", filterByEmail:"…"} or vex_products {action:"get", id:"…"}.

Choosing the environment

Most tools accept an optional env param to target a specific environment for that call; without it, vex uses VEX_ENV, then a project link matching the server's working directory, then the active environment. (vex_setup edits config directly, and vex_refetch_schema takes an explicit environment name.) Call vex_current_env to see which environment is currently in use.

Choosing the right tool

Pick the highest-level tool that matches the user's request:

  • Typed entity tools (vex_customers, vex_products, vex_orders, vex_zones, vex_tax, vex_channels, vex_assets) are the preferred path for standard Vendure entities. They validate input with Zod and return shaped JSON. vex_assets uploads local files as assets (action upload with filePaths).

  • Schema discovery (vex_schema with action list_operations, describe_operation, describe_type, list_custom_fields, or list_permissions) — use to discover what's available before falling back to raw GraphQL. This lists operations on the schema; don't confuse it with vex_operations (replayable queries the user has saved).

  • Raw GraphQL (vex_query, vex_mutate) — escape hatch for custom plugin operations or anything the typed tools don't cover. Read the schema resource or use vex_schema first so the document is correct. vex_mutate accepts a files map (dotted variable path → local file path) for Upload-scalar mutations.

Reusable queries

  • Fragments (vex_fragments with action list/get/save/delete) are reusable selection sets on a specific type. Reach for them when you keep rewriting the same field list.

  • Saved operations (vex_operations with action list/get/run/delete) are full queries or mutations persisted with their default variables. action:"run" re-executes one with optional variableOverrides (shallow-merge into defaults) or replaceVariables (full replacement). Save operations the user is likely to repeat.

Lean mode

When started with the env var VEX_TOOLS=lean, only the universal interface is exposed (vex_setup, vex_current_env, vex_refetch_schema, vex_query, vex_mutate, vex_schema). Drive everything via vex_schema discovery plus raw vex_query/vex_mutate.

Permission errors

A FORBIDDEN/UNAUTHORIZED failure means the API key's role lacks a permission. The error names the operation and suggests likely Permission values; verify with vex_schema action "list_permissions" and tell the user which permission to assign to the key's role in the Vendure admin UI.

Vendure quick reference

Mutations often return unions (Entity | ErrorResult) — branch on the response and surface errorCode/message from the error branch. List queries take ListOptions { take, skip, filter, sort }; default to small take (~10). Filter values use real JSON types (true not "true", 10 not "10"). Never echo full API keys back to the user.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
vex_setupC

Manage Vendure API environments: add, remove, list, switch, show, or set (update).

vex_current_envA

Show which Vendure environment vex is using and why (env param > VEX_ENV > project link > active). Returns {name, host, source, projectPath?} or a none-configured notice.

vex_refetch_schemaA

Re-fetch and cache the GraphQL schema for a Vendure environment. Uses introspection or the configured schema source.

vex_queryC

Execute a raw GraphQL query.

vex_mutateB

Execute a raw GraphQL mutation. Supports Upload-scalar file uploads via files.

vex_schemaA

Discover the Vendure Admin GraphQL schema (types, operations, custom fields).

Actions:

  • describe_type: Return SDL for a type and its referenced types (depth 1 or 2); skips built-in scalars.

  • list_custom_fields: List an entity's custom fields; null if it has no typed customFields block.

  • list_operations: List top-level queries/mutations, optionally filtered by kind and substring.

  • describe_operation: Return an operation's SDL signature plus SDL for its arg and return types.

  • list_permissions: List Permission enum values (incl. custom plugin permissions) with descriptions.

vex_customersB

Manage Vendure customers.

Actions:

  • list: List customers with optional filters.

  • get: Get a single customer by ID with full details.

  • create: Create a new customer.

  • update: Update an existing customer.

  • delete: Delete a customer by ID.

  • add_note: Add a note to a customer.

vex_productsB

Manage Vendure products and their variants.

Actions:

  • list: List products with optional name filter (variant detail omitted; use get for it).

  • get: Get a single product by ID with variants, options, and facet values.

  • create: Create a new product.

  • update: Update an existing product.

  • delete: Delete a product by ID.

  • create_variants: Create variants for an existing product.

vex_ordersB

Manage Vendure orders and draft orders.

Actions:

  • list: List orders with optional code filter.

  • get: Get a single order by ID with full details.

  • create_draft: Create a new draft order.

  • add_item: Add a product variant to a draft order.

  • set_customer: Set the customer for a draft order.

  • transition: Transition an order to a new state.

  • cancel: Cancel an order.

vex_zonesB

Manage Vendure zones and their country/region members.

Actions:

  • list: List zones with optional pagination.

  • get: Get a single zone by ID with its country/region members.

  • create: Create a new zone, optionally assigning members immediately.

  • update: Update an existing zone.

  • delete: Delete a zone by ID.

  • add_members: Add countries/regions to an existing zone.

  • remove_members: Remove countries/regions from an existing zone.

  • create_country: Create a new country/region.

  • list_countries: List available countries/regions with optional pagination.

vex_taxB

Manage Vendure tax categories and tax rates.

Actions:

  • list_categories: List tax categories.

  • get_category: Get a tax category by ID.

  • create_category: Create a new tax category (e.g. 'Standard', 'Reduced', 'Zero-rated').

  • delete_category: Delete a tax category by ID.

  • list_rates: List tax rates.

  • get_rate: Get a tax rate by ID.

  • create_rate: Create a new tax rate linking a tax category to a zone with a percentage value.

  • update_rate: Update an existing tax rate.

  • delete_rate: Delete a tax rate by ID.

vex_channelsB

Manage Vendure channels.

Actions:

  • list: List channels with optional pagination.

  • get: Get a channel by ID.

  • get_active: Get the currently active channel.

  • update: Update channel settings (default tax/shipping zone, currency, language, inventory).

vex_assetsA

Manage Vendure assets (images/files), incl. multipart upload of local files.

Actions:

  • upload: Upload local files as new assets (Upload scalar via multipart request).

  • list: List assets (take/skip pagination, optional name substring filter).

  • get: Fetch one asset by ID (incl. focal point and tags).

  • update: Update an asset's name, tags, or focal point.

  • delete: Delete an asset by ID.

vex_fragmentsA

Manage reusable GraphQL fragments (named selection sets).

Actions:

  • list: List saved fragments, optionally filtered by on-clause type.

  • get: Return the raw SDL of a saved fragment.

  • save: Persist a fragment definition, validating its selection against the cached schema before writing.

  • delete: Delete a saved fragment.

vex_operationsA

Manage saved (replayable) GraphQL operations: queries or mutations persisted with default variables. (Distinct from vex_schema's list_operations, which lists schema-defined operations.)

Actions:

  • list: List saved operations, optionally filtered by kind or root field.

  • get: Return the full saved-operation record (name, kind, rootField, document, default variables, timestamps).

  • run: Execute a saved operation by name. Override top-level variables (shallow merge) or replace them entirely.

  • delete: Delete a saved operation.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 15 tools

Disambiguation4/5

Tools are cleanly partitioned by domain (customers, products, orders, zones, tax, channels, assets, fragments, operations) with distinct CRUD-style actions inside each. Minor overlaps exist between vex_setup's 'show' action and vex_current_env, and separately the description of vex_operations explicitly disambiguates itself from vex_schema's list_operations — showing the authors know these boundaries need clarifying. vex_refetch_schema vs vex_schema is also close but distinguishable (cache refresh vs schema discovery).

Naming Consistency4/5

Every tool uses a consistent vex_ prefix and snake_case, with actions also in snake_case (list_categories, create_rate, add_members). The only pattern deviation is verb-first names for action tools (vex_query, vex_mutate, vex_refetch_schema) versus plural-noun names for resource tools (vex_customers, vex_products), but this maps sensibly to the tool type rather than being arbitrary.

Tool Count4/5

15 tools sits at the top of the comfortable range but each maps to a genuine Vendure admin domain, so none feel gratuitous. Because each tool bundles many actions, the effective operation count is far higher, which is a reasonable trade-off for keeping the top-level tool list scannable.

Completeness4/5

The surface covers core commerce entities (customers, products, orders, zones, tax, channels, assets) plus an escape hatch via vex_query/vex_mutate and schema introspection for anything uncovered. Notable gaps remain — promotions, shipping methods, collections/facets, and admin/role management have no dedicated tools — but agents can work around these with raw GraphQL.

Maintenance

ActivityMaintained
ResponsivenessLimited data