mcp-ecom-agent-layer
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ecom-agent-layersearch for men's running shoes under $50"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-ecom-agent-layer
The AI-access layer for the mcp-ecom storefront: an MCP server exposing nine e-commerce capabilities to agents, and — from Phase 2 onward — the agents themselves.
Status: Phase 1 (MCP server) complete. No agent exists yet.
→ Technical Snapshot — the whole service in one document: architecture, the nine tools, the security model, deployment and known limits.
→ Iterations — how it was built: what worked, what failed, and how to replicate this service from scratch.
→ M4 Plan — what comes next: the agent that uses these nine tools, and how it is kept from approving itself.
Both carry a plain-language summary in every section, so they read for technical and non-technical audiences alike.
What this is
MCP Client -> this server -> mcp-ecom /api/v1 -> PostgresAn adapter, not a second implementation. Business logic — may this order be cancelled, is there stock, who owns this cart — stays in the storefront's API. This server never touches the database and never re-implements a rule, because the value of an adapter is that there is exactly one implementation of each rule.
Related MCP server: commercetools MCP Essentials
The tools
Tool | Risk | What it does |
| Low | Search the catalogue by keyword, category, price, rating |
| Low | Full detail for one product |
| Low | Stock available right now, never cached |
| Low | The caller's own orders |
| Low | One of the caller's orders |
| Low | The caller's cart, with totals computed server-side |
| Medium | Add a product; increments by default, |
| Medium | Remove one product, or empty the cart |
| High | Cancel an order — requires an approval token |
Low executes silently. Medium executes and is surfaced as an informational event. High is refused at the server without a valid approval token, regardless of what the caller intended.
Two things worth understanding before changing anything
Identity is never an argument. The server derives the caller from the
bearer token by asking GET /api/v1/auth/whoami. It does not decode the
token itself: NextAuth v4 mints an encrypted JWE, so reading a subject out
of one in Python would mean a second implementation of NextAuth's key
derivation, which would break silently the day that changes.
Approval tokens are bound, not merely present. Each is HMAC-signed over
(session, tool, argument hash, nonce, expiry) and single-use. The
argument hash is the part that matters: without it, approval to cancel
order #3 is approval to cancel order #7, and a prompt-injected agent can
talk itself past a confirmation step. Approvals are minted only by the
POST /approvals HTTP route, which is deliberately not an MCP tool —
an agent that can approve itself makes the mechanism theatre.
Running it
python -m venv .venv
.venv/Scripts/pip install -r requirements-dev.txt # Scripts/ on Windows, bin/ elsewhere
.venv/Scripts/python -m pytestMCP_APPROVAL_SECRET=<32 random bytes> .venv/Scripts/python server.pyServes streamable HTTP on $PORT (default 8000). Deliberately not stdio: a
stdio process carries one ambient identity, which is wrong for a
multi-user app — every caller would share whichever token the process
started with.
Variable | Required | Purpose |
| yes | Signs approval tokens. Unrelated to |
| no | Storefront API root; defaults to the deployed instance |
| no | Approval lifetime, default 300 |
| no | Listen port, default 8000 |
Known limitations
These are honest gaps, not oversights. Each needs closing before this is more than a demo.
Prompt injection via tool output is unmitigated. Product descriptions and review text are attacker-controllable and flow into agent context through low-risk tools. Approval tokens close the execution path only.
The spent-nonce set is in process. Single-use holds for one replica; scale out and a token becomes replayable within its TTL.
Approvals defend the agent path, not the API. Anyone holding a bearer token can still call the cancel endpoint directly. That is unchanged and by design — the API's own defence is ownership plus status rules.
Session JWTs cannot be revoked. Short lifetimes bound the exposure; nothing shortens it to zero.
Provenance
Split out of the mcp-ecom monorepo, where it was built as apps/mcp
during milestone M3. The design documents, phase plans and the reasoning
behind each decision live there under docs/mcp/.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform e-commerce operations through a standardized interface implementing the x402 and Agentic Commerce Protocol (ACP). Supports merchant sessions, product search, and payment orchestration with production-ready security features.
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to interact with the commercetools Composable Commerce platform. It provides tools for managing products, categories, orders, carts, and customer data through secure read and write operations.13MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage products, shopping carts, and orders in an online store through a well-defined MCP API.
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to discover products, build carts, and complete purchases across multiple downstream commerce services through a secure, contract-driven API.
Related MCP Connectors
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Connect e-commerce and marketing data to AI assistants via MCP.
Agent-native commerce with trusted catalog, durable carts, and Stripe Checkout via MCP and UCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/arone011-creator/mcp-ecom-agent-layer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server