streamable-httpupdated 8d ago
A type-safe MCP (Model Context Protocol) server that provides Amazon product data through the Canopy API. Built with xmcp and deployed on Cloudflare Workers.
What can you do with Canopy API?
Canopy API MCP Server
A type-safe MCP (Model Context Protocol) server that provides Amazon product data through the Canopy API. Built with xmcp and deployed on Cloudflare Workers.
Features
- 12 Amazon Data Tools ā product info, variants, stock, sales, reviews, search, autocomplete, categories, sellers, authors, and deals
- Streamable HTTP transport at
/mcp(current MCP spec) - File-based tools ā one file per tool under
src/tools/ - Type Safety ā TypeScript types generated from the Canopy OpenAPI spec via
openapi-typescript - Flexible Auth ā middleware accepts the API key in any of four header formats
- CORS Enabled ā preflight + custom API key headers allowed
Quick Start
You'll need a Canopy API key from canopyapi.co.
npm install
npm run dev # xmcp watcher + wrangler dev (local Workers runtime)
npm run deploy # build + wrangler deploy --env production
Testing
Use the MCP Inspector and connect to http://localhost:8787/mcp (or your deployed URL). Provide the API key as a request header:
npx -y @modelcontextprotocol/inspector@latest
Or with curl:
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "CANOPY-API-KEY: $CANOPY_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Authentication
The server requires a Canopy API key on every request. Any of these header forms works (checked in this order):
CANOPY-API-KEY: your-api-keyAPI-KEY: your-api-keyX-API-KEY: your-api-keyAuthorization: Bearer your-api-key
A missing key returns HTTP 401 with a JSON-RPC error before the request reaches the MCP transport (see src/middleware.ts).
Available Tools
Product Information
get_amazon_productā product details by ASIN, URL, or GTINget_amazon_product_variantsā product variantsget_amazon_product_stockā stock level estimatesget_amazon_product_salesā sales estimates (weekly, monthly, annual)get_amazon_product_reviewsā top product reviews
Search & Discovery
search_amazon_productsā search with filters and sortingget_amazon_autocompleteā search term suggestionsget_amazon_dealsā current deals
Categories
get_amazon_categoriesā root category taxonomyget_amazon_categoryā category details with products and subcategories
Entities
get_amazon_sellerā seller information and product listingsget_amazon_authorā author information and book listings
Project Structure
canopy-api-mcp/
āāā src/
ā āāā tools/ # one file per tool (auto-discovered by xmcp)
ā ā āāā get-amazon-product.ts
ā ā āāā ...
ā āāā lib/
ā ā āāā api-key.ts # reads API key from extra.authInfo
ā āāā middleware.ts # auth middleware (lifts header ā authInfo.token)
ā āāā api-client.ts # type-safe Canopy REST client
ā āāā types/
ā āāā api.d.ts # generated from OpenAPI
āāā xmcp.config.ts # xmcp config (endpoint, CORS, paths)
āāā wrangler.jsonc # Cloudflare Workers config
āāā tsconfig.json
āāā package.json
Type Safety
src/types/api.d.ts is generated from the Canopy OpenAPI spec. Regenerate when the API changes:
npm run generate
Scripts
npm run devā xmcp watcher +wrangler dev(local Workers runtime)npm run buildāxmcp build --cf(emitsworker.jsfor Cloudflare)npm run deployā build +wrangler deploy --env productionnpm run deleteā remove the deployed Workernpm run generateā regenerate API types from the OpenAPI spec
Migration from v1.x
v2.0 replaces ModelFetch with xmcp. The MCP endpoint moved from /sse/mcp (deprecated SSE transport mount) to /mcp (current Streamable HTTP convention). Update any clients accordingly.
Related
Install
Add Canopy API to your client. Pick the one you use.
claude mcp add --transport http canopy-api https://mcp.canopyapi.co/mcpcodex mcp add canopy-api --url https://mcp.canopyapi.co/mcp{
"mcpServers": {
"canopy-api": {
"url": "https://mcp.canopyapi.co/mcp"
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"servers": {
"canopy-api": {
"type": "http",
"url": "https://mcp.canopyapi.co/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
{
"mcpServers": {
"canopy-api": {
"url": "https://mcp.canopyapi.co/mcp"
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"canopy-api": {
"serverUrl": "https://mcp.canopyapi.co/mcp"
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance19/25
- Trust9/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 0 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 6 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 2.0.1Latest | Aug 31, 2026 |
| 2.0.0 | Aug 31, 2026 |