sunleaf
Click on "Deploy 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., "@sunleaf Do you have a caffeine-free tea under $15?"
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.
Sunleaf MCP Demo
An MCP server that lets AI assistants such as Claude Desktop and Cursor answer customer questions from a shop's own files: its product catalog, FAQs and policy pages.
Demo with fictional sample data. Not a client project.
What it shows
A business's own files, connected to an AI assistant. Sunleaf Tea Co. is a made-up tea shop. Its catalog, FAQs and policies are plain JSON and Markdown files in
data/.Read-only. The assistant can search and read. It cannot change anything.
Cited answers. Every passage comes with an id the assistant can cite, such as
[faq-006]or[policy:returns#opened-tins], and each policy's scope rules travel with any section of it that is returned.Honest when unsure. When nothing in the data matches, the server says so. When only part of a question matches, it returns the closest passages marked as partial, and the assistant is told to answer only from what they actually say.
No API keys, no network calls. The server runs locally over stdio and makes no network requests itself. Your AI client may send the data it returns to its model provider (see Security notes).
Related MCP server: Shopify MCP Server
Tools, resources and prompt
Name | Kind | What it does |
| tool | Keyword search over the catalog, with optional category and in-stock filters |
| tool | Full details for one product id |
| tool | The best-matching FAQ entries, with their ids |
| tool | The full shipping, returns, privacy or wholesale policy |
| tool | Searches FAQs and policies together. Returns cited passages marked as answers or partial matches, with each policy's scope rules, and says so when nothing matches |
| resource | All products (JSON) |
| resource | All FAQs (JSON) |
| resource template | One policy (Markdown) |
| prompt | Drafts a reply to a customer message using only these sources |
Quick start
You need Node.js 20 or later to run the server. The tests need Node.js 22.12 or later.
git clone https://github.com/panditfloki/sunleaf-mcp-demo.git
cd sunleaf-mcp-demo
npm install
npm run build
npm testConnect to Claude Desktop
Open the Claude Desktop config file (create it if it does not exist):
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%AppData%\Claude\claude_desktop_config.json
Add the server, using the absolute path to your copy of this repository:
{ "mcpServers": { "sunleaf": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/sunleaf-mcp-demo/build/index.js"] } } }Quit Claude Desktop completely and open it again.
If the server does not show up, check the logs (
~/Library/Logs/Claude/mcp*.logon macOS). If Claude cannot findnode, which is common when Node.js was installed with nvm, replace"node"with the full path thatwhich nodeprints.
A ready-to-edit copy is in examples/claude_desktop_config.json.
Connect to Cursor
Add this to .cursor/mcp.json in this folder, then open the folder in Cursor:
{
"mcpServers": {
"sunleaf": {
"type": "stdio",
"command": "node",
"args": ["${workspaceFolder}/build/index.js"]
}
}
}To use it in every project, put the same entry in ~/.cursor/mcp.json with an absolute path instead of ${workspaceFolder}. In Cursor Settings, the MCP section should then show sunleaf as connected. A copy is in examples/cursor-mcp.json.
Test with MCP Inspector
MCP Inspector needs Node.js 22.19 or later.
npm run inspectThis opens the Inspector in your browser, where you can list the tools and call them. For a scripted check:
npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/listQuestions to try
"Do you have a caffeine-free tea under $15?"
"What is your return policy for opened tins?"
"How should I brew the Darjeeling first flush?"
"Do you ship to Canada?" The shipping policy lists where the shop ships and Canada is not on it, so the assistant should say no and cite the policy.
"What is your FSSAI licence number?" The data does not hold it, so the assistant should say the data does not cover it.
Use your own data
Point the server at your own folder with the SUNLEAF_DATA_DIR environment variable. The folder needs the same layout:
my-shop/
products.json
faqs.json
policies/
shipping.md
returns.md
privacy.md
wholesale.mdproducts.json: an array of products with
id,name,category,price_inr,price_usd,sizes(list),in_stock(true or false),tags(list) andshort_description.faqs.json: an array of FAQs with
id,question,answerandtags(list), plus an optionalpolicy(shipping,returns,privacyorwholesale) naming the policy that governs the FAQ. The named policy file must exist.policies/: Markdown files. Each
##heading becomes a separate section that can be cited. Missing policy files are skipped.Start each policy with a section that states its scope, such as where you ship or who can apply.
answer_sourcesreturns that first section together with any other section of the same policy and with any FAQ linked to it throughpolicy, so an answer about shipping costs or a wholesale FAQ cannot lose the rule about destinations.Ids ignore case and surrounding spaces, in validation and lookup alike.
X-1andx-1count as the same id, so a file with both is rejected as a duplicate.
The server checks both JSON files when it starts, and stops with a clear message if a field is missing or an id is used twice.
In Claude Desktop, set the variable in the server entry:
"sunleaf": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/sunleaf-mcp-demo/build/index.js"],
"env": { "SUNLEAF_DATA_DIR": "/ABSOLUTE/PATH/TO/my-shop" }
}Use an absolute path. A relative path is resolved from this package's folder, not from wherever the AI client starts.
Screenshots
Coming soon: Claude Desktop (docs/claude-desktop.png), Cursor (docs/cursor.png), MCP Inspector (docs/inspector.png) and a short demo GIF (docs/demo.gif).
Security notes
Read-only. No tool writes, deletes or sends anything.
Local files only. The server reads its data folder and nothing else. It makes no network calls.
stdio. It runs as a local process that your AI client starts and stops.
Real business data. Whatever the tools return is shown to the AI client and, through it, to the model provider. Only put in the data folder what you are comfortable sharing that way.
How it works
src/index.tsstarts the server over stdio. It never writes to stdout, because stdout carries the MCP protocol. Logs go to stderr.src/server.tsregisters the tools, resources and prompt with the official MCP TypeScript SDK (@modelcontextprotocol/serverv2).src/search.tsis a small offline keyword search. A word in a product name or FAQ question counts 3 times, in tags 2 times and in body text once, and rare words count more than common ones.answer_sourcesgrades each passage by the share of the question it covers, weighted by rarity. At least half: it is returned as an answer. Less: the closest passages come back marked as partial, because some questions are answered by exclusion ("Do you ship to Canada?" is answered by the list of countries the shop ships to). Nothing at all: it says so.src/data.tsloads and checks the data folder.
Limits. This is keyword search, not semantic search. A paraphrase that shares no words with the data can miss, and no retrieval method can guarantee that an AI never guesses. For real business data, add embeddings or a synonym list, and keep the instruction to answer only from returned passages.
Development
npm run dev # run from source with tsx
npm test # unit tests and an in-process client/server test
npm run build # compile to build/License
MIT. See LICENSE.
© 2026 dydxfx · https://dydxfx.com
Available Tools
5 toolsanswer_sourcesFind answer sourcesARead-onlyIdempotent
Search the FAQs and policies together for a customer question. Returns passages with ids to cite, marked as answers or as partial matches, plus the scope rules of any policy they come from or are governed by. A partial match can still answer by exclusion: a list of the countries the shop ships to answers whether it ships somewhere else. If nothing matches, it says so: tell the customer instead of guessing.
Inputs: question (required). Returns: match, sources
get_policyGet policyARead-onlyIdempotent
The full text of one Sunleaf store policy as Markdown: shipping, returns, privacy or wholesale.
Inputs: name (required).
get_productGet productARead-onlyIdempotent
Full details for one Sunleaf product by its id (from search_products): description, sizes, tags, price and stock.
Inputs: id (required). Returns: product
search_faqsSearch FAQsARead-onlyIdempotent
Find the Sunleaf FAQ entries that best match a question. Returns each question and answer with its FAQ id for citation.
Inputs: query (required), max_results.
search_productsSearch productsARead-onlyIdempotent
Search the Sunleaf Tea Co. catalog by keywords such as a tea type, flavour, occasion or teaware item. Returns matching products with id, category, price in INR and USD, sizes and stock status. Use get_product for full details.
Inputs: query (required), category, max_results, in_stock_only. Returns: results
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: FAQ search, product search, product detail retrieval, policy retrieval, and a combined answer tool that searches both FAQs and policies with citations. Even though search_faqs and answer_sources overlap on FAQs, answer_sources is broader and returns different output, so there's no real ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (search_faqs, search_products, get_product, get_policy, answer_sources). The pattern is predictable and uniform throughout.
With 5 tools, the server is well-scoped for a read-only customer support context covering products, FAQs, and policies. Each tool serves a necessary role, and the count is neither too thin nor excessive.
The surface fully covers the domain: product search and details, FAQ search, policy retrieval, and a combined answer tool that handles cross-domain queries. There are no obvious missing operations for the stated purpose of answering customer questions.
Maintenance
Related MCP Connectors
Gives AI assistants read access to your Dedox help centre and knowledge base articles.
AI customer service: set up an AI support agent, search knowledge, look up orders, answer customers.
Connect AI to store orders, products and inventory with scoped access and human approvals.
Ask questions across Shopify, Klaviyo, GA4 and 20+ e-commerce sources in plain English.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and manage Shopify store data including products, orders, inventory, and analytics through the Model Context Protocol. It allows users to query store performance and customer details using natural language.-
- AlicenseAqualityDmaintenanceProvides AI assistants with real-time access to Shopify store analytics, sales data, and inventory through ShopifyQL and the Admin GraphQL API. It enables users to query store performance, customer metrics, and marketing insights using natural language.13MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to answer high-trust sales questions with cited, vetted facts or explicit refusals, grounded in a local knowledge base.1-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search and retrieve unified product knowledge from documentation, training sessions, resolved support tickets, and curated team answers, with source attribution, and to report gaps that trigger a human review loop.MIT