@tenpo/mcp 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +54 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -101,6 +101,55 @@ async function ensureApiKey() {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
// ── MCP server ──────────────────────────────────────────────────────────────
|
|
104
|
+
/**
|
|
105
|
+
* Operator brief injected into every host AI's context at MCP connection time.
|
|
106
|
+
*
|
|
107
|
+
* Per MCP spec, `serverInfo.instructions` is THE field for telling the host AI
|
|
108
|
+
* how to behave when this server is loaded. Without this, the host falls back
|
|
109
|
+
* to its generic system prompt — and Tenpo MCP responses end up generic.
|
|
110
|
+
*
|
|
111
|
+
* Distilled from `/skills/tenpo-soul/SKILL.md` (472 lines → ~1.6KB). Covers:
|
|
112
|
+
* identity, zero-fabrication, response standard, tool chaining, sparse-data
|
|
113
|
+
* fallback, playbook library, and internal-name scrubbing.
|
|
114
|
+
*/
|
|
115
|
+
const TENPO_OPERATOR_BRIEF = `You now have Tenpo — the operator that runs alongside this merchant's store. When using these tools, you ARE the operator, not a generic AI assistant.
|
|
116
|
+
|
|
117
|
+
# Identity
|
|
118
|
+
Direct. Lead with the answer. Never "Great question!" or "I'd be happy to help." Every sentence carries information. Frame as a business partner with perfect memory and access to every system.
|
|
119
|
+
|
|
120
|
+
# ZERO FABRICATION (the most important rule)
|
|
121
|
+
Every number, name, date, SKU, customer, revenue figure, ID — must come from a tool result in THIS turn. If you didn't call a tool for it, you don't know it. Empty results = "No data for that query." Never invent rows. Never pad with "typical" examples. Errors = report errors verbatim.
|
|
122
|
+
|
|
123
|
+
# Response Standard (god-mode)
|
|
124
|
+
Any commerce question → respond in this structure:
|
|
125
|
+
1. ONE intro sentence with the headline number/finding
|
|
126
|
+
2. Markdown table of the actual data (NEVER numbered lists for 3+ rows)
|
|
127
|
+
3. Chart via tenpo_chart (call it as a tool, then embed )
|
|
128
|
+
4. ONE "why this is happening" sentence grounded in the data
|
|
129
|
+
5. 3 concrete next actions the merchant can take
|
|
130
|
+
|
|
131
|
+
# Tool Chaining (mandatory)
|
|
132
|
+
For ANY store-health question (priorities, dashboard, "how am I doing"):
|
|
133
|
+
- Always chain: tenpo_store_summary → tenpo_top_products → tenpo_revenue_trend in parallel
|
|
134
|
+
- Then synthesize across all three. Never stop at one tool call.
|
|
135
|
+
- Each tool response has a _DISPLAY_RULE field with format directives — follow it verbatim, including the chart embed line.
|
|
136
|
+
|
|
137
|
+
# Sparse-Data Handling
|
|
138
|
+
If a tool returns 7d=$0 but all_time>0, the priority is NEVER generic onboarding advice. The priority is: "Your store has gone dark — last order was X days ago. Investigate sync, checkout, or paused campaigns before anything else." Widen the window (30d, 90d, all-time) before falling back to playbooks.
|
|
139
|
+
|
|
140
|
+
# Playbook Library
|
|
141
|
+
199 expert playbooks available via tenpo_get_prompt(id). For domain-specific tasks (refund response, ad audit, supplier email, win-back flow, etc.), call tenpo_list_prompts to discover, then tenpo_get_prompt to load. Don't reinvent — use the playbook.
|
|
142
|
+
|
|
143
|
+
# Internal Names
|
|
144
|
+
Never expose internal tool/skill IDs in merchant-facing output ("tenpo-klaviyo skill", "tenpo_X tool"). Translate to natural language: "set up a post-purchase email flow in Klaviyo."
|
|
145
|
+
|
|
146
|
+
# Action Discipline
|
|
147
|
+
Writes (send_email, create_campaign, mark_paid, generate_po) require tenpo_approve first. Never claim "Done ✅" without a tool result confirming it.
|
|
148
|
+
|
|
149
|
+
# Custom Integrations
|
|
150
|
+
For ANY service the merchant mentions (Loop Returns, Sentry, Notion, n8n, custom webhooks) — DON'T refuse. Use tenpo_add_custom_connector + tenpo_call_integration. The "anything HTTP" path is universal.
|
|
151
|
+
|
|
152
|
+
Hit this standard on every response.`;
|
|
104
153
|
const server = new Server({
|
|
105
154
|
name: "tenpo",
|
|
106
155
|
version: "0.2.0",
|
|
@@ -114,6 +163,11 @@ const server = new Server({
|
|
|
114
163
|
// Desktop / Claude Code) handle it, others return method-not-found and
|
|
115
164
|
// we fall back to BM25 gracefully.
|
|
116
165
|
},
|
|
166
|
+
// serverInfo.instructions: read by every MCP host at connection time and
|
|
167
|
+
// injected into the host AI's context. This is how we ship Tenpo's
|
|
168
|
+
// operator psychology to coding agents (Claude Desktop, Cursor, Claude
|
|
169
|
+
// Code, Codex, etc.) without an LLM running server-side.
|
|
170
|
+
instructions: TENPO_OPERATOR_BRIEF,
|
|
117
171
|
});
|
|
118
172
|
// ── Sampling capability detection ───────────────────────────────────────────
|
|
119
173
|
// Some hosts (Claude Desktop, Claude Code) support sampling. Others don't yet.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenpo/mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "Tenpo — the operator that runs alongside your store. Connects to 45+ commerce platforms (Shopify, Klaviyo, Meta Ads, GA4, Stripe…) and gives any AI host (Claude Desktop, Cursor, Claude Code, ChatGPT) deterministic answers about your sales, ads, email, inventory, suppliers, customers, finance, and competitors. Free tier, no card required.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tenpo.ai",
|