@extenshi/mcp 0.5.1 → 0.6.0

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.
@@ -0,0 +1,245 @@
1
+ const docs = (page) => `https://docs.extenshi.io/developers/${page}`;
2
+ const toolPage = (key) => `https://dojo.extenshi.io/tools/${key}`;
3
+ export const DEVELOPMENT_GUIDE_URL = docs('development-workflow');
4
+ export const DEVELOPMENT_SERVICES = [
5
+ {
6
+ id: 'documentation',
7
+ purpose: 'Discover capabilities, extension shapes, exact CLI commands and reusable agent skills.',
8
+ tools: ['get_development_guide', 'search_docs', 'list_extension_templates'],
9
+ access: 'Free guidance; no API key. Hosted transport still requires connector sign-in.',
10
+ urls: [docs('mcp'), DEVELOPMENT_GUIDE_URL, docs('agent-skills')],
11
+ },
12
+ {
13
+ id: 'account',
14
+ purpose: 'Sign in, provision an API key for local tools and check credit pools before paid work.',
15
+ tools: ['get_credit_balance', 'connection_diagnostics'],
16
+ access: 'Balance lookup is free and requires identity; catalog reads and scans use credit pools.',
17
+ urls: [docs('scan-credits'), 'https://dojo.extenshi.io/api-keys', 'https://dojo.extenshi.io/billing'],
18
+ },
19
+ {
20
+ id: 'research',
21
+ purpose: 'Validate demand, competitors, user complaints, permissions and existing security findings.',
22
+ tools: [
23
+ 'search_extensions',
24
+ 'get_extension',
25
+ 'get_reviews',
26
+ 'get_security',
27
+ 'get_risk_by_store_ids',
28
+ 'market_overview',
29
+ ],
30
+ access: 'Identity required. Catalog tools cost 1 read per call; get_security costs 3. Bulk risk: up to 40 per call. Chrome review text is unavailable; use its aggregate.',
31
+ urls: [docs('mcp'), 'https://catalog.extenshi.io'],
32
+ },
33
+ {
34
+ id: 'projects',
35
+ purpose: 'Read an existing project, selected browser types, manifests, repository binding, saved tool state, hosted URLs and starter files.',
36
+ tools: [
37
+ 'list_my_projects',
38
+ 'get_project_state',
39
+ 'get_project_scaffold',
40
+ 'get_project_workspace',
41
+ 'import_manifest',
42
+ 'diff_project_state',
43
+ 'apply_project_patch',
44
+ 'record_project_evidence',
45
+ 'get_release_readiness',
46
+ ],
47
+ access: 'Own-project MCP reads are free and require identity. Create projects in the cabinet. Synchronize repository metadata, source/built manifests and scope with typed revisioned patches. project.write and evidence.write require explicit OAuth consent. Repository metadata does not grant GitHub access. Automated release-readiness access requires a Pro project.',
48
+ urls: [
49
+ DEVELOPMENT_GUIDE_URL,
50
+ 'https://dojo.extenshi.io/projects',
51
+ 'https://dojo.extenshi.io/integrations',
52
+ ],
53
+ },
54
+ {
55
+ id: 'manifest',
56
+ purpose: 'Choose minimum permissions, target browsers and manifest entries; validate every referenced file.',
57
+ tools: ['list_extension_templates', 'get_project_state', 'get_project_scaffold'],
58
+ access: 'Free template guidance; project reads require identity. The cabinet also has a manifest editor.',
59
+ urls: [docs('manifest-generator'), toolPage('manifest-generator')],
60
+ },
61
+ {
62
+ id: 'icons',
63
+ purpose: 'Design the SVG, preview at toolbar sizes and export store assets with the local CLI.',
64
+ tools: ['generate_icon_workflow'],
65
+ access: 'Free workflow. Drawing, browser preview and file export happen in the local agent environment; the cabinet offers its own icon generator subject to availability and credits.',
66
+ urls: [docs('icon-generator'), toolPage('icon-generator')],
67
+ },
68
+ {
69
+ id: 'privacy',
70
+ purpose: 'Describe actual data practices; generate/export a policy or maintain a hosted policy and its version history.',
71
+ tools: [
72
+ 'list_privacy_policy_versions',
73
+ 'get_privacy_policy_version',
74
+ 'update_privacy_policy_with_ai',
75
+ 'publish_privacy_policy',
76
+ ],
77
+ access: 'Hosted policy tools require an owned Pro project. Version reads spend no credit; AI updates have a per-project daily limit. publish_privacy_policy changes the live page. The browser generator supports export.',
78
+ urls: [docs('privacy-policy-generator'), docs('data-declaration'), toolPage('privacy-policy-generator')],
79
+ },
80
+ {
81
+ id: 'onboarding',
82
+ purpose: 'Prepare a welcome page, pin guide, install instructions and uninstall survey; wire verified URLs into the extension.',
83
+ tools: ['generate_welcome_page_workflow', 'get_project_state'],
84
+ access: 'Free welcome-page brief. Edit, host and inspect responses in the cabinet where enabled; account/project limits apply. MCP returns guidance and saved state, not a page-publishing tool.',
85
+ urls: [
86
+ DEVELOPMENT_GUIDE_URL,
87
+ docs('pin-guide'),
88
+ docs('uninstall-feedback'),
89
+ toolPage('onboarding-page'),
90
+ toolPage('instruction-generator'),
91
+ toolPage('install-instructions'),
92
+ toolPage('uninstall-feedback'),
93
+ ],
94
+ },
95
+ {
96
+ id: 'listing-and-marketing',
97
+ purpose: 'Prepare listing copy, screenshots, landing page, support links and AI discovery assets.',
98
+ tools: [],
99
+ access: 'Use CLI generate-listing / review-risk and cabinet tools where enabled. MCP has no listing, landing-page or SEO execution tool.',
100
+ urls: [
101
+ docs('cli'),
102
+ docs('ai-visibility'),
103
+ docs('store-policies'),
104
+ toolPage('page-generator'),
105
+ toolPage('seo-optimizer'),
106
+ toolPage('ai-visibility'),
107
+ ],
108
+ },
109
+ {
110
+ id: 'verification-and-ci',
111
+ purpose: 'Test the built extension in each target browser, review store risks, scan the final package and retain reports in CI.',
112
+ tools: ['scan_extension'],
113
+ access: 'Scan requires a local artifact and API key, and spends 1 scan credit. CLI review-risk is local. Configure GitHub Actions in the repository; browser tests use the agent environment.',
114
+ urls: [docs('cli'), docs('cli-github-actions'), docs('store-policies')],
115
+ },
116
+ {
117
+ id: 'publishing',
118
+ purpose: 'Validate store credentials, submit the exact tested package and verify review status and the public listing.',
119
+ tools: ['publish_extension'],
120
+ access: 'Local stdio or CLI with local store credentials; publishing access is checked. Store registration, disclosures and review are separate steps. Upload success alone does not establish a live release.',
121
+ urls: [docs('cli'), docs('publish-to-chrome-web-store'), toolPage('publish')],
122
+ },
123
+ {
124
+ id: 'maintenance',
125
+ purpose: 'Claim the listing, respond to findings, inspect reviews/uninstall feedback, update policies and maintain releases.',
126
+ tools: ['get_reviews', 'get_security', 'get_project_state'],
127
+ access: 'Catalog reads are metered. Ownership, declarations, responses, badges and feedback management use the cabinet; consult account access.',
128
+ urls: [
129
+ docs('claim-your-extension'),
130
+ docs('respond-to-findings'),
131
+ docs('security-badge'),
132
+ docs('uninstall-feedback'),
133
+ docs('data-declaration'),
134
+ ],
135
+ },
136
+ {
137
+ id: 'monetization',
138
+ purpose: 'Optional paid-feature integration: seller setup, offers, checkout, signed entitlements and purchase verification.',
139
+ tools: [],
140
+ access: 'Conditional integration, not a callable MCP service. Verify current SDK distribution, project access, seller agreement and payment readiness in the documentation and cabinet before planning installation or promising working payments.',
141
+ urls: [docs('pay-sdk'), 'https://dojo.extenshi.io/projects'],
142
+ },
143
+ ];
144
+ const WORKFLOW = [
145
+ {
146
+ id: 'scope',
147
+ actions: 'Record the user problem, target sites and browsers, MVP, permissions/data needs, acceptance criteria, distribution and optional monetization. Inspect available tools with get_development_guide; use search_docs for current details. Keep deferred features out of release promises.',
148
+ doneWhen: 'A written scope and acceptance checklist cover implementation, testing, assets, release and maintenance.',
149
+ },
150
+ {
151
+ id: 'research',
152
+ actions: 'If market research is needed, check get_credit_balance, then search_extensions / market_overview, get_extension and get_reviews for a small relevant set. Use get_security for detailed findings or get_risk_by_store_ids for a batch. Record gaps and constraints.',
153
+ doneWhen: 'The chosen feature and supported surfaces have evidence; optional research is marked skipped with a reason.',
154
+ },
155
+ {
156
+ id: 'project-and-repository',
157
+ actions: 'With identity, call list_my_projects then get_project_state for the selected project. Reuse its repository. If no project exists, create/configure one in dojo where available; otherwise continue locally and record that integration is pending. Create or reuse a Git remote, preferably GitHub, before substantial implementation.',
158
+ doneWhen: 'Project ID (or explicit pending status), repository URL, branch, README, build commands and release checklist are recorded.',
159
+ },
160
+ {
161
+ id: 'architecture-and-scaffold',
162
+ actions: 'Call list_extension_templates, choose minimum permissions and browser-specific files. For a new project call get_project_scaffold once per browser into separate outputs; preserve existing code when integrating an existing repository. Read includeToolStates only for needed keys. Write integration.file verbatim to integration.path, review integration.unwired and re-read state after cabinet changes.',
163
+ doneWhen: 'Each manifest references real packaged files; browser variants and the project integration contract are preserved.',
164
+ },
165
+ {
166
+ id: 'implementation',
167
+ actions: 'Implement the MVP, accessible popup/options, storage and error handling. Test actual target sites and extension lifecycle, including service-worker restart and permission denial. Plan localization. If payments or user accounts are needed, verify the supported integration and complete its prerequisites before depending on it.',
168
+ doneWhen: 'Acceptance criteria pass on real target surfaces; optional integrations have end-to-end evidence or remain explicit blockers.',
169
+ },
170
+ {
171
+ id: 'assets-and-hosted-pages',
172
+ actions: "Use generate_icon_workflow and generate_welcome_page_workflow as needed. Prepare screenshots, pin/install instructions, a privacy policy, uninstall feedback, support and landing URLs. For an existing Pro policy, list/read versions, then update_privacy_policy_with_ai when needed, review proposedMarkdown and publish within the author's authorization. Re-read get_project_state and verify the returned URLs.",
173
+ doneWhen: 'Assets show the real product; hosted links load and match actual data practices; installation/uninstallation flows work.',
174
+ },
175
+ {
176
+ id: 'quality-and-listing',
177
+ actions: 'Build each browser package; run unit/integration checks and manual browser scenarios. Get exact review-risk and generate-listing commands from search_docs; review disclosures, permission justifications, listing copy and screenshots against the build. Run scan_extension if available, otherwise the local CLI. Add CI using cli-github-actions docs.',
178
+ doneWhen: 'The exact versioned artifact has passing checks, retained scan/review reports and truthful store materials; unresolved findings have a disposition.',
179
+ },
180
+ {
181
+ id: 'release',
182
+ actions: "Verify store accounts, credentials and submission access; use publish_extension with validate_only first when available. Submit the tested artifact within the user's publishing authorization through local MCP, CLI or the store console. Record upload, submission, approval and public-listing status separately.",
183
+ doneWhen: 'Store status and installed version are verified; pending store review is reported as pending, with artifact and source commit recorded.',
184
+ },
185
+ {
186
+ id: 'operate',
187
+ actions: 'Claim the catalog listing, maintain declarations and a security badge, review findings and uninstall feedback, verify optional purchase/license flows, and plan updates. Repeat build, review, scan, policy and release checks for later versions.',
188
+ doneWhen: 'A handoff records repository/commit, artifacts, URLs, checks, remaining blockers, support owner and follow-up work.',
189
+ },
190
+ ];
191
+ export function buildDevelopmentGuide(registeredTools) {
192
+ const names = new Set(registeredTools.map((tool) => tool.name));
193
+ return {
194
+ schemaVersion: 1,
195
+ documentation: DEVELOPMENT_GUIDE_URL,
196
+ availability: 'tools lists the tools registered on THIS connection. Registration does not prove account access, remaining credits or local prerequisites. Service URLs describe where work happens; check live account/project access. Use MCP tools/list for the exact input schemas. This guide makes no network calls.',
197
+ tools: registeredTools.map((tool) => ({
198
+ ...tool,
199
+ docs: [
200
+ ...new Set(DEVELOPMENT_SERVICES.filter((s) => s.tools.includes(tool.name)).flatMap((s) => s.urls.filter((url) => url.startsWith('https://docs.extenshi.io/')))),
201
+ ],
202
+ })),
203
+ localActions: ['scan_extension', 'publish_extension'].map((name) => ({
204
+ name,
205
+ availableInThisConnection: names.has(name),
206
+ fallback: 'Use local @extenshi/mcp (stdio), or npx @extenshi/cli@latest on the machine holding the artifact. Read search_docs for exact commands and prerequisites.',
207
+ docs: docs('cli'),
208
+ })),
209
+ services: DEVELOPMENT_SERVICES.map(({ tools, ...service }) => ({
210
+ ...service,
211
+ toolsInThisConnection: tools.filter((name) => names.has(name)),
212
+ })),
213
+ repository: {
214
+ recommendation: 'Keep source in a developer-owned Git repository; prefer GitHub for the existing dojo integration and GitHub Actions. Reuse the bound repository. GitLab, Bitbucket or self-hosted Git also work with local code and CI; their automatic dojo binding is not provided by these MCP tools.',
215
+ setup: "Choose repository owner and visibility with the developer; use a private repository unless public source is intended. Connect GitHub at https://dojo.extenshi.io/integrations and select the repository in the project where enabled. Repository creation/writes use GitHub, its connector/CLI or the cabinet, with the user's authorization.",
216
+ layout: [
217
+ 'README.md: setup, target browsers, build/test/release commands',
218
+ 'src/: extension logic and extenshi.config.js at the path supplied by the project',
219
+ 'assets/ and _locales/: icons and translations (follow the chosen framework layout)',
220
+ 'tests/: behavior and browser scenarios',
221
+ 'docs/: privacy source, listing copy, support and release checklist',
222
+ '.github/workflows/: build, tests and artifact scan',
223
+ 'dist/: generated per-browser packages; attach versioned artifacts to CI/releases',
224
+ ],
225
+ practice: 'Commit source, dependency lockfile and .env.example with placeholders. Keep tokens, store credentials, signing keys, .env and user data in local/CI secret storage. Use branches and reviewable pull requests; associate release artifacts with a source commit/tag.',
226
+ docs: [
227
+ 'https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories',
228
+ docs('cli-github-actions'),
229
+ DEVELOPMENT_GUIDE_URL,
230
+ ],
231
+ },
232
+ workflow: WORKFLOW,
233
+ handoff: [
234
+ 'scope and acceptance criteria',
235
+ 'project ID, repository URL, branch and commit',
236
+ 'completed/skipped/blocked stages with reasons',
237
+ 'per-browser artifact version and checks',
238
+ 'hosted policy/onboarding/support URLs',
239
+ 'store submission versus live status',
240
+ 'optional payment verification',
241
+ 'remaining actions and owners',
242
+ ],
243
+ };
244
+ }
245
+ //# sourceMappingURL=development-guide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development-guide.js","sourceRoot":"","sources":["../src/development-guide.ts"],"names":[],"mappings":"AAaA,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,uCAAuC,IAAI,EAAE,CAAA;AAC5E,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,kCAAkC,GAAG,EAAE,CAAA;AAEzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;QACC,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,wFAAwF;QACjG,KAAK,EAAE,CAAC,uBAAuB,EAAE,aAAa,EAAE,0BAA0B,CAAC;QAC3E,MAAM,EAAE,+EAA+E;QACvF,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,qBAAqB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;KAChE;IACD;QACC,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,wFAAwF;QACjG,KAAK,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;QACvD,MAAM,EAAE,yFAAyF;QACjG,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,mCAAmC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AAG,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;YAC9D,GAAG,OAAO;YACV,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC9D,CAAC,CAAC;QACH,UAAU,EAAE;YACX,cAAc,EACb,0RAA0R;YAC3R,KAAK,EACJ,+UAA+U;YAChV,MAAM,EAAE;gBACP,gEAAgE;gBAChE,kFAAkF;gBAClF,oFAAoF;gBACpF,wCAAwC;gBACxC,oEAAoE;gBACpE,oDAAoD;gBACpD,kFAAkF;aAClF;YACD,QAAQ,EACP,sQAAsQ;YACvQ,IAAI,EAAE;gBACL,wGAAwG;gBACxG,IAAI,CAAC,oBAAoB,CAAC;gBAC1B,qBAAqB;aACrB;SACD;QACD,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE;YACR,+BAA+B;YAC/B,+CAA+C;YAC/C,+CAA+C;YAC/C,yCAAyC;YACzC,uCAAuC;YACvC,qCAAqC;YACrC,+BAA+B;YAC/B,8BAA8B;SAC9B;KACD,CAAA;AACF,CAAC"}
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ import { makeBff } from './bff.js';
25
25
  import { loadConfig } from './config.js';
26
26
  import { reportServerStarted } from './startup.js';
27
27
  import { flushTelemetry, initTelemetry } from './telemetry.js';
28
- import { MISSING_KEY_MESSAGE, registerTools, SERVER_INSTRUCTIONS, SERVER_NAME, } from './tools.js';
28
+ import { getServerInstructions, MISSING_KEY_MESSAGE, registerTools, SERVER_NAME, } from './tools.js';
29
29
  import { checkForUpdate } from './update-check.js';
30
30
  const require = createRequire(import.meta.url);
31
31
  const pkg = require('../package.json');
@@ -41,17 +41,18 @@ function requireKey() {
41
41
  function bff() {
42
42
  return makeBff(cfg.bffUrl, requireKey());
43
43
  }
44
+ const capabilities = new Set(['read', 'docs', 'scan', 'publish']);
44
45
  const server = new FastMCP({
45
46
  name: SERVER_NAME,
46
47
  // FastMCP types `version` as a semver template literal; package.json gives a plain string.
47
48
  version: pkg.version,
48
- instructions: SERVER_INSTRUCTIONS,
49
+ instructions: getServerInstructions(capabilities),
49
50
  });
50
51
  // stdio identity is fixed (env key) — the call context is ignored. ALL four
51
52
  // capabilities are enabled: the local client has a filesystem and store creds.
52
53
  const stdioDeps = {
53
54
  cfg: { bffUrl: cfg.bffUrl, scanUrl: cfg.scanUrl, docsUrl: cfg.docsUrl },
54
- capabilities: new Set(['read', 'docs', 'scan', 'publish']),
55
+ capabilities,
55
56
  getBff: () => bff(),
56
57
  requireApiKey: () => requireKey(),
57
58
  getApiKey: () => cfg.apiKey ?? undefined,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAY,OAAO,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAEN,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,WAAW,GAEX,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAA;AAE7D,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,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