Skip to main content

Elastic Path MCP Servers

Learn how to set up and use Elastic Path's Model Context Protocol (MCP) offerings to accelerate storefront development with AI-powered tools. This guide covers our Dev MCP server for building React/Next.js commerce applications, our Elastic Path Composable Commerce MCP Server for direct API operations, and our integrations with Context7.

What are the Elastic Path MCP Servers?

Elastic Path provides specialized MCP servers to support different development workflows:

  • Developer MCP Server: AI-powered scaffolding for React/Next.js storefront components with curated best practices, designed to eliminate the boilerplate and repetitive tasks that slow down storefront development
  • Elastic Path Composable Commerce MCP Server: Direct access to Elastic Path API operations for commerce management, automation, and analytics

These servers provide AI agents with the specific context needed to build accurate, production-ready commerce implementations using Elastic Path.

Developer MCP Server

How it works

The MCP server exposes a tool called get-documentation to your coding agent. This tool has access to a specially created data store of documentation and code examples relating to creating a storefront. In response to your prompts, the tool will locate, rank, and return relevant code snippets and documentation to provide your coding agent with the necessary context to accurately implement a storefront against Elastic Path.

Quick Start

1. Acquire an access key.

While the Dev MCP Server is in beta, access is restricted. Contact your Elastic Path representative to request an invite and receive your beta key.

2. Configure the Dev MCP Server

Add the Elastic Path Dev MCP server to your IDE configuration. This example is for Cursor IDE (edit ~/.cursor/mcp.json). For other AI tools, adapt the config as required:

{
"mcpServers": {
"elastic-path-dev-mcp": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://storefront-agent.vercel.app/mcp",
"--header",
"Authorization:${AUTH_TOKEN}"
],
"env": {
"AUTH_TOKEN": "your-access-token-here"
}
}
}
}

3. Test Your MCP Connection

Test the connection by asking your AI assistant to work on a storefront feature. For example:

"Generate a product grid component for my Elastic Path storefront"

The MCP server should provide code samples and docs your agent can use to implement your storefront.

tip

If the agent does not call the tool, try being more specific; e.g. include 'use the Elastic Path MCP server' in your prompt

Dev MCP Server Capabilities

The Elastic Path Dev MCP server exposes a get-documentation tool with configurable options to tailor responses to your specific development needs:

Tool Configuration Options

  • query (required): Your question or request for documentation/code examples
  • tokens: Maximum number of tokens to return (default: 5000, controls response length)
  • topic: Optional focus area to narrow results (e.g., "authentication", "cart management", "payments", "checkout")

The server specializes in generating storefront components and provides:

Storefront Scaffolding:

  • Product grid components with filtering and pagination
  • Shopping cart management with add/remove/update functionality
  • Checkout flow components with payment integration
  • Customer authentication and account management
  • Search and category navigation

Framework Support:

  • React components with TypeScript
  • Next.js pages and API routes
  • Tailwind CSS styling
  • Elastic Path SDK integration

Example Prompts:

"Create a product detail page with add to cart functionality"
"Generate a shopping cart sidebar with quantity controls"
"Build a checkout form with Elastic Path Payments"
"Create a customer login/register component"

Best Practices

1. Effective Prompting

Be specific about what you want to generate:

  • Mention the framework (React, Next.js)
  • Specify styling approach (Tailwind CSS, CSS modules)
  • Include functional requirements (responsive, accessible)
  • Request error handling and loading states
  • Use an appropriate token budget

2. Iterative Development

Start with basic components and enhance:

  1. Authenticate your storefront with Elastic Path
  2. Generate basic product display page
  3. Add cart functionality
  4. Implement checkout flow
  5. Enhance with advanced features

3. Code Review

Always review generated code for:

  • Security best practices
  • Performance considerations
  • Accessibility compliance
  • Code style consistency

Elastic Path Composable Commerce MCP Server

The Elastic Path Composable Commerce MCP Server provides direct access to your Elastic Path commerce platform through the Model Context Protocol. This server enables AI assistants to perform real-time operations across your entire e-commerce infrastructure including orders, products, catalogs, pricing, promotions, and more.

What You Can Do

The server provides comprehensive access to Elastic Path APIs, enabling you to:

  • Query and manage orders with filtering and advanced analytics
  • Create and update products with full catalog management
  • Browse published catalogs with customer-facing pricing
  • Manage pricebooks, promotions, and multi-currency pricing
  • Create custom APIs and extend commerce capabilities
  • Track sales trends and analyze business performance
  • And more...

Installation & Setup

The Elastic Path Composable Commerce MCP Server can be installed from npm.

Configure the server in your MCP client with your Elastic Path credentials:

  • EPCC_CLIENT_ID: Your EPCC application client ID
  • EPCC_CLIENT_SECRET: Your EPCC application secret
  • EPCC_BASE_URL: Your EPCC API endpoint (e.g., https://useast.api.elasticpath.com)

For detailed installation instructions, configuration examples for different MCP clients, and troubleshooting guidance, please visit the package on npm.

Example Use Cases

Once configured, you can ask your AI assistant to perform operations like:

"Show me order metrics for the last 30 days"
"Get details for order ABC123"
"Create a new product in the Electronics hierarchy"
"Show me all published catalogs"
"Create a 15% discount promotion for Black Friday"
"Add price modifiers for seasonal discounts"
"Create a custom API for product reviews"
"What's the current USD to EUR exchange rate?"

The server handles authentication automatically, manages token refresh, and formats results for easy reading.


Also Available: Context7 Integrations

What is Context7?

Context7 is a third-party service that indexes documentation and code examples for various libraries and frameworks. It maintains up-to-date, searchable repositories of documentation that AI assistants can access to provide accurate, contextual help. It makes these available via a publically available MCP server.

Context7 has indexed two resources for Elastic Path:

  • Elastic Path API Documentation: Complete API references, guides, and examples. Wide coverage, less specific, less accurate for coding.
  • Elastic Path Shopper SDK: Specific, precise usage examples for all methods of the Elastic Path Shopper SDK. Very accurate for coding.

Context7 Documentation Server

Access comprehensive Elastic Path documentation through Context7:

Use Cases:

  • When you need detailed API reference information
  • Exploring comprehensive documentation beyond what the Dev MCP server provides

Context7 Shopper SDK Server

Specialized assistance for the Elastic Path Shopper SDK:

Use Cases:

  • When building custom implementations with the Shopper SDK
  • Need specific SDK function examples and usage patterns
Ask External AI