@wootsup/mcp 0.1.0 → 0.3.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.
Files changed (131) hide show
  1. package/CHANGELOG.md +148 -83
  2. package/README.md +31 -27
  3. package/SECURITY.md +15 -6
  4. package/dist/auth/keychain.d.ts +27 -1
  5. package/dist/auth/keychain.js +48 -2
  6. package/dist/auth/keychain.js.map +1 -1
  7. package/dist/cli-hint.d.ts +22 -0
  8. package/dist/cli-hint.js +55 -0
  9. package/dist/cli-hint.js.map +1 -0
  10. package/dist/index.js +97 -22
  11. package/dist/index.js.map +1 -1
  12. package/dist/install-skill.js +1 -1
  13. package/dist/modules/apimapper/cache.js +25 -17
  14. package/dist/modules/apimapper/cache.js.map +1 -1
  15. package/dist/modules/apimapper/client.d.ts +62 -1
  16. package/dist/modules/apimapper/client.js +555 -291
  17. package/dist/modules/apimapper/client.js.map +1 -1
  18. package/dist/modules/apimapper/connections.js +230 -75
  19. package/dist/modules/apimapper/connections.js.map +1 -1
  20. package/dist/modules/apimapper/credential-sanitizer.d.ts +5 -0
  21. package/dist/modules/apimapper/credential-sanitizer.js +60 -1
  22. package/dist/modules/apimapper/credential-sanitizer.js.map +1 -1
  23. package/dist/modules/apimapper/credentials.js +19 -47
  24. package/dist/modules/apimapper/credentials.js.map +1 -1
  25. package/dist/modules/apimapper/diagnose.js +21 -2
  26. package/dist/modules/apimapper/diagnose.js.map +1 -1
  27. package/dist/modules/apimapper/flows.js +60 -77
  28. package/dist/modules/apimapper/flows.js.map +1 -1
  29. package/dist/modules/apimapper/gateway/advanced-tool.js +56 -5
  30. package/dist/modules/apimapper/gateway/advanced-tool.js.map +1 -1
  31. package/dist/modules/apimapper/gateway/essentials.d.ts +1 -1
  32. package/dist/modules/apimapper/gateway/essentials.js +8 -1
  33. package/dist/modules/apimapper/gateway/essentials.js.map +1 -1
  34. package/dist/modules/apimapper/get-skill.d.ts +1 -1
  35. package/dist/modules/apimapper/get-skill.js +44 -6
  36. package/dist/modules/apimapper/get-skill.js.map +1 -1
  37. package/dist/modules/apimapper/graph.js +40 -36
  38. package/dist/modules/apimapper/graph.js.map +1 -1
  39. package/dist/modules/apimapper/index.js +2 -0
  40. package/dist/modules/apimapper/index.js.map +1 -1
  41. package/dist/modules/apimapper/library.js +425 -83
  42. package/dist/modules/apimapper/library.js.map +1 -1
  43. package/dist/modules/apimapper/license.js +12 -36
  44. package/dist/modules/apimapper/license.js.map +1 -1
  45. package/dist/modules/apimapper/local-sources.js +20 -34
  46. package/dist/modules/apimapper/local-sources.js.map +1 -1
  47. package/dist/modules/apimapper/misc.js +13 -27
  48. package/dist/modules/apimapper/misc.js.map +1 -1
  49. package/dist/modules/apimapper/onboarding.d.ts +30 -1
  50. package/dist/modules/apimapper/onboarding.js +114 -19
  51. package/dist/modules/apimapper/onboarding.js.map +1 -1
  52. package/dist/modules/apimapper/schema.js +9 -18
  53. package/dist/modules/apimapper/schema.js.map +1 -1
  54. package/dist/modules/apimapper/settings.js +49 -52
  55. package/dist/modules/apimapper/settings.js.map +1 -1
  56. package/dist/modules/apimapper/sites-tools.d.ts +29 -0
  57. package/dist/modules/apimapper/sites-tools.js +165 -0
  58. package/dist/modules/apimapper/sites-tools.js.map +1 -0
  59. package/dist/modules/apimapper/tool-result.d.ts +46 -0
  60. package/dist/modules/apimapper/tool-result.js +63 -0
  61. package/dist/modules/apimapper/tool-result.js.map +1 -0
  62. package/dist/modules/apimapper/toolslist-size.d.ts +11 -10
  63. package/dist/modules/apimapper/toolslist-size.js +16 -14
  64. package/dist/modules/apimapper/toolslist-size.js.map +1 -1
  65. package/dist/modules/apimapper/types.d.ts +21 -0
  66. package/dist/modules/apimapper/types.js.map +1 -1
  67. package/dist/modules/apimapper/whitelist-drift.d.ts +85 -0
  68. package/dist/modules/apimapper/whitelist-drift.js +360 -0
  69. package/dist/modules/apimapper/whitelist-drift.js.map +1 -0
  70. package/dist/modules/apimapper/workflows.js +82 -27
  71. package/dist/modules/apimapper/workflows.js.map +1 -1
  72. package/dist/modules/apimapper/yootheme-binding.d.ts +35 -0
  73. package/dist/modules/apimapper/yootheme-binding.js +186 -0
  74. package/dist/modules/apimapper/yootheme-binding.js.map +1 -0
  75. package/dist/platform/index.d.ts +56 -0
  76. package/dist/platform/index.js +151 -2
  77. package/dist/platform/index.js.map +1 -1
  78. package/dist/setup/detect-clients.d.ts +40 -1
  79. package/dist/setup/detect-clients.js +148 -1
  80. package/dist/setup/detect-clients.js.map +1 -1
  81. package/dist/setup/probe-handshake.js +40 -7
  82. package/dist/setup/probe-handshake.js.map +1 -1
  83. package/dist/setup/remove-config.d.ts +8 -0
  84. package/dist/setup/remove-config.js +145 -0
  85. package/dist/setup/remove-config.js.map +1 -0
  86. package/dist/setup/uninstall.d.ts +34 -0
  87. package/dist/setup/uninstall.js +147 -0
  88. package/dist/setup/uninstall.js.map +1 -0
  89. package/dist/setup-cli.d.ts +7 -0
  90. package/dist/setup-cli.js +29 -1
  91. package/dist/setup-cli.js.map +1 -1
  92. package/dist/sites/loader.d.ts +41 -0
  93. package/dist/sites/loader.js +119 -0
  94. package/dist/sites/loader.js.map +1 -0
  95. package/dist/sites/schema.d.ts +69 -0
  96. package/dist/sites/schema.js +71 -0
  97. package/dist/sites/schema.js.map +1 -0
  98. package/dist/sites/secret-resolver.d.ts +47 -0
  99. package/dist/sites/secret-resolver.js +150 -0
  100. package/dist/sites/secret-resolver.js.map +1 -0
  101. package/dist/skill-instructions.d.ts +1 -1
  102. package/dist/skill-instructions.js +5 -0
  103. package/dist/skill-instructions.js.map +1 -1
  104. package/dist/transports/stdio.js +4 -4
  105. package/dist/transports/stdio.js.map +1 -1
  106. package/dist/uninstall-skill.d.ts +27 -0
  107. package/dist/uninstall-skill.js +89 -0
  108. package/dist/uninstall-skill.js.map +1 -0
  109. package/docs/architecture.md +21 -21
  110. package/docs/customgraph-internal-migration.md +4 -4
  111. package/docs/security.md +2 -21
  112. package/docs/tools.md +40 -12
  113. package/manifest.json +77 -79
  114. package/package.json +68 -65
  115. package/skills/apimapper/SKILL.md +53 -7
  116. package/skills/apimapper/reference/conditional-style-multi-items.md +114 -0
  117. package/skills/apimapper/reference/jmespath-pitfalls.md +108 -0
  118. package/skills/apimapper/reference/joomla.md +1 -1
  119. package/skills/apimapper/reference/library-template-discovery.md +65 -0
  120. package/skills/apimapper/reference/merge-two-sources-on-key.md +99 -0
  121. package/skills/apimapper/reference/troubleshooting.md +20 -0
  122. package/skills/apimapper/reference/yootheme.md +1 -1
  123. package/dist/auth/oauth-provider.d.ts +0 -68
  124. package/dist/auth/oauth-provider.js +0 -232
  125. package/dist/auth/oauth-provider.js.map +0 -1
  126. package/dist/server-http.d.ts +0 -22
  127. package/dist/server-http.js +0 -159
  128. package/dist/server-http.js.map +0 -1
  129. package/dist/transports/http.d.ts +0 -29
  130. package/dist/transports/http.js +0 -267
  131. package/dist/transports/http.js.map +0 -1
package/docs/tools.md CHANGED
@@ -1,24 +1,29 @@
1
1
  # Tools reference
2
2
 
3
- Auto-extracted from `src/modules/apimapper/*.ts` on **2026-05-18**.
3
+ Auto-extracted from `src/modules/apimapper/*.ts` on **2026-06-03**.
4
4
 
5
5
  To regenerate after adding tools, run:
6
6
 
7
7
  ```bash
8
8
  cd packages/apimapper-mcp
9
- node scripts/extract-tools.mjs
9
+ npm run build # ensure dist/ is fresh
10
+ node scripts/extract-tool-descriptions.mjs # writes .grounding/tools-truth.json + a markdown table on stdout
10
11
  ```
11
12
 
12
- …and paste the `---MD---` output into the sections below. (The
13
- extractor is intentionally simple; a fully auto-generated build-step
14
- is tracked as a future improvement.)
13
+ …and reconcile the sections below against the table. (The extractor
14
+ boots a real `McpServer` and reads each tool's evaluated description —
15
+ no source-text scraping. A fully auto-generated build-step is tracked
16
+ as a future improvement.)
15
17
 
16
18
  ## Summary
17
19
 
18
- - **Total tools:** 77 registered (+ a few system surfaces brought in
20
+ - **Total tools:** 79 registered (+ a few system surfaces brought in
19
21
  via `@getimo/mcp-toolkit`).
20
- - **Annotation breakdown:** 43 `readOnly`, 15 `mutating`, 10 `creating`,
21
- 6 `destructive`.
22
+ - **Surface split:** 19 first-class in `tools/list` (15 module
23
+ essentials + the `apimapper_advanced` gateway + 3 top-level tools
24
+ registered in `index.ts`); the other 60 route through
25
+ `apimapper_advanced` so the listed surface stays under each client's
26
+ tool cap.
22
27
 
23
28
  The annotation tells the AI client what kind of side-effect each tool
24
29
  has. Destructive tools additionally require a `confirm: true`
@@ -30,7 +35,7 @@ vault) for the full convention.
30
35
 
31
36
  | Module | Tools | Notes |
32
37
  |---|---:|---|
33
- | `connections.ts` | 11 | CRUD + probe + sample-data + resources |
38
+ | `connections.ts` | 12 | CRUD + probe + sample-data + resources + recover |
34
39
  | `flows.ts` | 11 | CRUD + compile + import/export + trace |
35
40
  | `library.ts` | 9 | Catalog + activate / deactivate templates |
36
41
  | `credentials.ts` | 7 | CRUD + link + OAuth begin |
@@ -42,11 +47,14 @@ vault) for the full convention.
42
47
  | `graph.ts` | 2 | Preview + validate |
43
48
  | `cache.ts` | 2 | Stats + invalidate |
44
49
  | `schema.ts` | 2 | Profile + snapshot list |
50
+ | `gateway/advanced-tool.ts` | 1 | `apimapper_advanced` gateway to the 60 advanced tools |
51
+ | `render/` | 1 | `apimapper_render` deterministic table/diagram/chart renderer |
52
+ | `yootheme-binding.ts` | 1 | `apimapper_yootheme_binding_for_flow` source-name bridge |
45
53
  | `onboarding.ts` | 1 | Composite startup report |
46
54
  | `diagnose.ts` | 1 | Composite token + identity probe |
47
55
  | `inspect.ts` | 1 | Token decode (network-free) |
48
56
  | `get-skill.ts` | 1 | Read bundled skill doc |
49
- | `use-profile.ts` | 1 | Switch active profile |
57
+ | `use-profile.ts` | 2 | Switch active profile + list profiles |
50
58
  | `index.ts` | 1 | `apimapper_rest_modules_status` |
51
59
 
52
60
  ### Adapter Status (`index.ts`)
@@ -55,6 +63,24 @@ vault) for the full convention.
55
63
  |------|------------|-------------|
56
64
  | `apimapper_rest_modules_status` | `readOnly` | Module-loading status for this MCP adapter (which sub-modules registered cleanly). |
57
65
 
66
+ ### Advanced Tool Gateway (`gateway/advanced-tool.ts`)
67
+
68
+ | Tool | Annotation | Description |
69
+ |------|------------|-------------|
70
+ | `apimapper_advanced` | `creating` | Gateway to the 60 advanced tools. Call `{ tool }` for a target's schema + annotations (discovery), or `{ tool, arguments }` to run it. The target tool's own confirmation guards stay in effect. |
71
+
72
+ ### Render (`render/`)
73
+
74
+ | Tool | Annotation | Description |
75
+ |------|------------|-------------|
76
+ | `apimapper_render` | `readOnly` | Render structured data as deterministic, pre-formatted text (tables, charts, flow-diagrams). Use when the user asks to visualize / show as a diagram / draw / display as a table or chart. |
77
+
78
+ ### YOOtheme Binding Bridge (`yootheme-binding.ts`)
79
+
80
+ | Tool | Annotation | Description |
81
+ |------|------------|-------------|
82
+ | `apimapper_yootheme_binding_for_flow` | `readOnly` | Given a published flow ID, return the exact YOOtheme GraphQL source names (singular + List) and the schema fields available for binding. Replaces a multi-call chain. |
83
+
58
84
  ### Health, Releases, Brandfetch & Feedback (`misc.ts`)
59
85
 
60
86
  | Tool | Annotation | Description |
@@ -92,7 +118,8 @@ vault) for the full convention.
92
118
  | `apimapper_connection_get` | `readOnly` | Fetch full configuration of a single connection by ID. |
93
119
  | `apimapper_connection_health_check` | `readOnly` | Probe a set of connections in one batch and report status. May take 10-30s. |
94
120
  | `apimapper_connection_list` | `readOnly` | List all API Mapper connections. Use `apimapper_connection_get` for full details. |
95
- | `apimapper_connection_pipeline_update` | `mutating` | Update the connection's pipeline (endpoints, default_params, headers, items_path, items_shape). |
121
+ | `apimapper_connection_pipeline_update` | `mutating` | Update the connection's pipeline (endpoints, default_params, default_headers, headers, items_path, items_shape, body, body_type, graphql_variables, response_type). |
122
+ | `apimapper_connection_recover` | `mutating` | Recover a connection that is un-editable because its `params` field is corrupt (stored as a JSON-string with embedded UI metadata instead of an object). Resets `params` to a clean object. Has a `confirm` guard. |
96
123
  | `apimapper_connection_resources` | `readOnly` | List browseable resources on a connection (drive files, sheets, IG media). |
97
124
  | `apimapper_connection_test` | `readOnly` | Probe a connection's upstream endpoint to verify reachability + auth. |
98
125
  | `apimapper_connection_update` | `mutating` | Update fields on an existing connection. Only provided fields are changed; wire-format is snake_case. |
@@ -211,7 +238,8 @@ vault) for the full convention.
211
238
 
212
239
  | Tool | Annotation | Description |
213
240
  |------|------------|-------------|
214
- | `apimapper_use_profile` | `readOnly` | Activate a configured site profile and probe its identity endpoint to confirm the site is reachable and the plugin signature matches. |
241
+ | `apimapper_list_profiles` | `readOnly` | List all configured site profiles (name, siteUrl, platform) with an `is_active` flag. Use to discover profile names before calling `apimapper_use_profile`. |
242
+ | `apimapper_use_profile` | `mutating` | Activate a configured site profile and probe its identity endpoint to confirm the site is reachable and the plugin signature matches. |
215
243
 
216
244
  ## Convention reminders
217
245
 
package/manifest.json CHANGED
@@ -1,85 +1,83 @@
1
1
  {
2
- "dxt_version": "0.1",
3
- "name": "@wootsup/mcp",
4
- "display_name": "API Mapper for WordPress & Joomla",
5
- "version": "0.1.0-rc.13-w3.1",
6
- "description": "Build API integrations, OAuth credentials, and YOOtheme sources via natural conversation. Connects your AI assistant to API Mapper running on WordPress or Joomla.",
7
- "author": {
8
- "name": "WootsUp",
9
- "url": "https://wootsup.com"
10
- },
11
- "homepage": "https://wootsup.com",
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/wootsup/api-mapper"
15
- },
16
- "license": "MIT",
17
- "keywords": [
18
- "api-mapper",
19
- "wordpress",
20
- "joomla",
21
- "yootheme",
22
- "mcp",
23
- "claude"
24
- ],
25
- "server": {
26
- "type": "node",
27
- "entry_point": "dist/index.js",
28
- "mcp_config": {
29
- "command": "node",
30
- "args": [
31
- "${__dirname}/dist/index.js"
32
- ],
33
- "env": {
34
- "APIMAPPER_TOKEN": "${user_config.APIMAPPER_TOKEN}",
35
- "APIMAPPER_SITE_URL": "${user_config.APIMAPPER_SITE_URL}",
36
- "APIMAPPER_PLATFORM": "${user_config.APIMAPPER_PLATFORM}",
37
- "APIMAPPER_PROFILE": "${user_config.APIMAPPER_PROFILE}"
38
- }
39
- }
40
- },
41
- "user_config": [
42
- {
43
- "key": "APIMAPPER_TOKEN",
44
- "type": "string",
45
- "title": "API Mapper MCP key",
46
- "description": "Your amk_live_... key from API Mapper → Settings → MCP Keys",
47
- "required": true,
48
- "secret": true
49
- },
50
- {
51
- "key": "APIMAPPER_SITE_URL",
52
- "type": "string",
53
- "title": "Site URL",
54
- "description": "The base URL of your WordPress or Joomla site (e.g. https://example.com)",
55
- "required": true
2
+ "dxt_version": "0.1",
3
+ "name": "@wootsup/mcp",
4
+ "display_name": "API Mapper for WordPress & Joomla",
5
+ "version": "0.3.0",
6
+ "description": "Build API integrations, OAuth credentials, and YOOtheme sources via natural conversation. Connects your AI assistant to API Mapper running on WordPress or Joomla.",
7
+ "icon": "icon.png",
8
+ "author": {
9
+ "name": "WootsUp",
10
+ "url": "https://wootsup.com"
56
11
  },
57
- {
58
- "key": "APIMAPPER_PLATFORM",
59
- "type": "string",
60
- "title": "Platform",
61
- "description": "Either 'wordpress' or 'joomla'",
62
- "required": true,
63
- "default": "wordpress"
12
+ "homepage": "https://wootsup.com",
13
+ "documentation": "https://wootsup.com/docs/mcp/api-mapper/installation",
14
+ "support": "https://wootsup.com/contact/",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/wootsup/api-mapper"
64
18
  },
65
- {
66
- "key": "APIMAPPER_PROFILE",
67
- "type": "string",
68
- "title": "Profile name",
69
- "description": "Optional label for this site profile, used to switch between multiple sites via apimapper_use_profile. Defaults to 'default'.",
70
- "required": false,
71
- "default": "default"
72
- }
73
- ],
74
- "compatibility": {
75
- "claude_desktop": ">=0.10.0",
76
- "platforms": [
77
- "darwin",
78
- "win32",
79
- "linux"
19
+ "license": "MIT",
20
+ "keywords": [
21
+ "api-mapper",
22
+ "wordpress",
23
+ "joomla",
24
+ "yootheme",
25
+ "mcp",
26
+ "claude"
80
27
  ],
81
- "runtimes": {
82
- "node": ">=22.0.0"
28
+ "server": {
29
+ "type": "node",
30
+ "entry_point": "dist/index.js",
31
+ "mcp_config": {
32
+ "command": "node",
33
+ "args": [
34
+ "${__dirname}/dist/index.js"
35
+ ],
36
+ "env": {
37
+ "APIMAPPER_SITE_URL": "${user_config.APIMAPPER_SITE_URL}",
38
+ "APIMAPPER_TOKEN": "${user_config.APIMAPPER_TOKEN}",
39
+ "APIMAPPER_PROFILE": "${user_config.APIMAPPER_PROFILE}",
40
+ "APIMAPPER_SITES_FILE": "${user_config.APIMAPPER_SITES_FILE}"
41
+ }
42
+ }
43
+ },
44
+ "user_config": {
45
+ "APIMAPPER_SITE_URL": {
46
+ "type": "string",
47
+ "title": "Site URL",
48
+ "description": "Single-site setup: the base URL of your WordPress or Joomla site (e.g. https://example.com). Leave empty if you use the Sites file below.",
49
+ "required": false
50
+ },
51
+ "APIMAPPER_TOKEN": {
52
+ "type": "string",
53
+ "title": "API Mapper MCP key",
54
+ "description": "Single-site setup: your amk_live_... key from API Mapper → ⋮ menu → Settings → MCP Access. Leave empty if you use the Sites file below.",
55
+ "required": false,
56
+ "sensitive": true
57
+ },
58
+ "APIMAPPER_PROFILE": {
59
+ "type": "string",
60
+ "title": "Profile name (Optional for Single Site Configuration)",
61
+ "description": "Optional label for this site profile. Defaults to 'default'. With a Sites file, it selects which configured site is active; switch any time via apimapper_use_profile.",
62
+ "required": false,
63
+ "default": "default"
64
+ },
65
+ "APIMAPPER_SITES_FILE": {
66
+ "type": "string",
67
+ "title": "Sites file (for Multi-Site Configurations)",
68
+ "description": "Advanced / agency setups only: path to a sites.json that manages several sites from one install. Leave empty for a single site (use Site URL + key above). Normally populated by the setup wizard.",
69
+ "required": false
70
+ }
71
+ },
72
+ "compatibility": {
73
+ "claude_desktop": ">=0.10.0",
74
+ "platforms": [
75
+ "darwin",
76
+ "win32",
77
+ "linux"
78
+ ],
79
+ "runtimes": {
80
+ "node": ">=22.0.0"
81
+ }
83
82
  }
84
- }
85
83
  }
package/package.json CHANGED
@@ -1,67 +1,70 @@
1
1
  {
2
- "name": "@wootsup/mcp",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "description": "API Mapper MCP Server — multi-platform (WordPress/Joomla), multi-AI-client, Stripe-style auth, bundled skills",
6
- "license": "MIT",
7
- "author": "WootsUp <hello@wootsup.com>",
8
- "homepage": "https://wootsup.com",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/wootsup/api-mapper.git",
12
- "directory": "packages/apimapper-mcp"
13
- },
14
- "bugs": "https://github.com/wootsup/api-mapper/issues",
15
- "keywords": [
16
- "mcp",
17
- "model-context-protocol",
18
- "api-mapper",
19
- "wordpress",
20
- "joomla",
21
- "claude",
22
- "chatgpt",
23
- "cursor"
24
- ],
25
- "publishConfig": {
26
- "access": "public"
27
- },
28
- "bin": {
29
- "apimapper-mcp": "./dist/index.js"
30
- },
31
- "files": [
32
- "dist/",
33
- "skills/",
34
- "docs/",
35
- "manifest.json",
36
- "CHANGELOG.md",
37
- "SECURITY.md"
38
- ],
39
- "scripts": {
40
- "build": "tsc && chmod +x dist/index.js 2>/dev/null || true",
41
- "test": "vitest run",
42
- "test:watch": "vitest",
43
- "test:coverage": "vitest run --coverage",
44
- "dev": "tsx watch src/index.ts",
45
- "typecheck": "tsc --noEmit",
46
- "start:http": "node dist/server-http.js",
47
- "build:dxt": "node scripts/build-dxt.js",
48
- "token-baseline": "node scripts/token-baseline.mjs"
49
- },
50
- "dependencies": {
51
- "@clack/prompts": "^0.10.0",
52
- "@getimo/mcp-toolkit": "^1.1.1",
53
- "@modelcontextprotocol/sdk": "^1.27.0",
54
- "@napi-rs/keyring": "^1.3.0",
55
- "undici": "^7.25.0",
56
- "zod": "^4.3.6"
57
- },
58
- "devDependencies": {
59
- "@types/archiver": "^7.0.0",
60
- "@types/node": "^22.0.0",
61
- "@vitest/coverage-v8": "~2.1.9",
62
- "archiver": "^8.0.0",
63
- "tsx": "^4.21.0",
64
- "typescript": "^5.6.0",
65
- "vitest": "^2.1.0"
66
- }
2
+ "name": "@wootsup/mcp",
3
+ "version": "0.3.0",
4
+ "type": "module",
5
+ "description": "API Mapper MCP Server — multi-platform (WordPress/Joomla), multi-AI-client, Stripe-style auth, bundled skills",
6
+ "license": "MIT",
7
+ "author": "WootsUp <hello@wootsup.com>",
8
+ "homepage": "https://wootsup.com",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/wootsup/api-mapper.git",
12
+ "directory": "packages/apimapper-mcp"
13
+ },
14
+ "bugs": "https://wootsup.com/contact/",
15
+ "keywords": [
16
+ "mcp",
17
+ "model-context-protocol",
18
+ "api-mapper",
19
+ "wordpress",
20
+ "joomla",
21
+ "claude",
22
+ "chatgpt",
23
+ "cursor"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "bin": {
29
+ "apimapper-mcp": "./dist/index.js"
30
+ },
31
+ "files": [
32
+ "dist/",
33
+ "skills/",
34
+ "docs/",
35
+ "manifest.json",
36
+ "CHANGELOG.md",
37
+ "SECURITY.md"
38
+ ],
39
+ "scripts": {
40
+ "prepublishOnly": "node -e \"if (process.env.RELEASE_PHP_PUBLISH !== '1') { console.error('Manual npm publish is no longer supported. Use: php scripts/release.php release apimapper-mcp <bump> followed by php scripts/release.php push-tag apimapper-mcp <version>, which triggers the GitHub Actions publish workflow (.github/workflows/apimapper-mcp-publish.yml). Set RELEASE_PHP_PUBLISH=1 only if you know you are running from that workflow.'); process.exit(1); }\"",
41
+ "build": "tsc && chmod +x dist/index.js 2>/dev/null || true",
42
+ "test": "vitest run",
43
+ "test:watch": "vitest",
44
+ "test:coverage": "vitest run --coverage",
45
+ "dev": "tsx watch src/index.ts",
46
+ "typecheck": "tsc --noEmit",
47
+ "build:dxt": "node scripts/build-dxt.js",
48
+ "bump": "node scripts/bump-version.mjs",
49
+ "token-baseline": "node scripts/token-baseline.mjs"
50
+ },
51
+ "dependencies": {
52
+ "@clack/prompts": "^0.10.0",
53
+ "@getimo/mcp-toolkit": "^1.1.1",
54
+ "@modelcontextprotocol/sdk": "^1.27.0",
55
+ "@napi-rs/keyring": "^1.3.0",
56
+ "undici": "^7.25.0",
57
+ "zod": "^4.3.6"
58
+ },
59
+ "devDependencies": {
60
+ "@types/archiver": "^7.0.0",
61
+ "@types/node": "^22.0.0",
62
+ "@vitest/coverage-v8": "~2.1.9",
63
+ "ajv": "^8.20.0",
64
+ "archiver": "^8.0.0",
65
+ "esbuild": "^0.21.5",
66
+ "tsx": "^4.21.0",
67
+ "typescript": "^5.6.0",
68
+ "vitest": "^2.1.0"
69
+ }
67
70
  }
@@ -10,7 +10,7 @@ allowed-tools:
10
10
 
11
11
  # API Mapper
12
12
 
13
- Bridge any REST API into YOOtheme via a saved flow (Source → Filter → Transform → Output). One server, one Bearer key, 17-tool gateway surface (77 capabilities behind `apimapper_advanced`).
13
+ Bridge any REST API into YOOtheme via a saved flow (Source → Filter → Transform → Output). One server, one Bearer key, 19-tool surface; 60 more behind `apimapper_advanced`; 79 total.
14
14
 
15
15
  ## Quickstart
16
16
 
@@ -19,8 +19,8 @@ Bridge any REST API into YOOtheme via a saved flow (Source → Filter → Transf
19
19
  npx -y @wootsup/mcp setup
20
20
  ```
21
21
  Interactive wizard: paste your MCP key, pick the AI client(s) to configure
22
- (Claude Desktop, Cursor, Zed, Continue, Cline, Roo Code), wizard writes
23
- the config files for you.
22
+ (Claude Desktop, Claude Code, Cursor, VS Code, Cline, Codex CLI), wizard
23
+ writes the config files for you.
24
24
 
25
25
  2. **Generate a key**
26
26
  - WordPress: click *API Mapper* in the WP admin menu to open the editor.
@@ -36,14 +36,60 @@ Bridge any REST API into YOOtheme via a saved flow (Source → Filter → Transf
36
36
  apimapper_onboarding → lists platform, existing flows
37
37
  ```
38
38
 
39
+ ## Step 1 (mandatory): Check the library FIRST
40
+
41
+ Before reaching for `apimapper_connection_create`, look in the library. Most
42
+ common APIs already have curated templates with OAuth wizard, auto-header
43
+ detection, and a YOOtheme source schema baked in.
44
+
45
+ ```
46
+ apimapper_library_featured() # the top featured templates
47
+ apimapper_library_list({ query: 'sheets' }) # search for any API by name
48
+ apimapper_credential_list({}) # ALWAYS check credentials BEFORE activating an auth-protected template
49
+ apimapper_library_activate({ id: '<template-id>', credential_id: '<cred-id>' }) # the canonical activation path
50
+ ```
51
+
52
+ **Auth-protected templates (Google Sheets, Notion, Airtable, Pexels, OpenWeatherMap,
53
+ Calendly, GitHub, …): you MUST link a credential.** The activation tool auto-links
54
+ when exactly ONE matching credential exists for the template's provider; otherwise
55
+ it returns a structured `credential_required` / `credential_ambiguous` error
56
+ listing the candidates. Always call `apimapper_credential_list({})` first, then
57
+ pass the right `credential_id` explicitly to `library_activate`. Missing the
58
+ credential silently lands a broken connection (empty endpoint, no auth) that
59
+ returns empty data and is hard to debug from downstream tool calls.
60
+
61
+ Templates ship today for: **Google Sheets, Calendly, Notion, Airtable, GitHub,
62
+ Pexels, Unsplash, OpenWeatherMap, REST Countries, Google Drive/Docs/Slides/
63
+ Tasks**, and more. Library activations come with:
64
+ - OAuth wizard (no manual app-registration pain)
65
+ - Auto-header detection for spreadsheet sources (Google Sheets!)
66
+ - Curated YOOtheme source schema (no positional-field-name footguns)
67
+ - Pre-configured caching and items_path
68
+
69
+ ## Step 2: Custom connection_create — ONLY when no template fits
70
+
71
+ If `library_list({ query: '<api-name>' })` returns no match, fall back to
72
+ `apimapper_connection_create` for niche or unknown APIs.
73
+
74
+ **Server-enforced (not just prose).** A custom `connection_create` whose
75
+ endpoint host is covered by a curated template is rejected with HTTP 409
76
+ `error_code: library_template_available`; the error message names the template
77
+ and the exact `apimapper_library_activate({ id })` call, and a structured
78
+ `library_suggestion` ({matched_host, templates[], activate_call}) accompanies
79
+ it. When the endpoint is genuinely NOT covered (a niche/write/webhook call on a
80
+ covered host), retry `connection_create` with `acknowledge_no_library: true` —
81
+ the audited override. Always prefer activation.
82
+
39
83
  ## Common Tools
40
84
 
41
85
  | Tool | Use for |
42
86
  |------|---------|
43
- | `apimapper_connection_create` | New REST/OAuth source |
87
+ | `apimapper_library_featured` | **Start here** top templates, mandatory first call |
88
+ | `apimapper_library_list` | Search/browse the library by name or category |
89
+ | `apimapper_library_activate` | Activate a featured template (canonical path) |
90
+ | `apimapper_connection_create` | Custom connection — only when no template matches |
44
91
  | `apimapper_flow_setup_with_sources` | One-shot connection+flow+publish |
45
92
  | `apimapper_flow_compile` | Validate graph before publish |
46
- | `apimapper_library_activate` | Drop a featured template |
47
93
  | `apimapper_diagnose` | Triage 401/404/5xx |
48
94
 
49
95
  For topic docs: `apimapper_get_skill topic="..."` or read `skill://apimapper/<topic>`.
@@ -52,6 +98,6 @@ For topic docs: `apimapper_get_skill topic="..."` or read `skill://apimapper/<to
52
98
 
53
99
  - **Source not in YOOtheme Builder** → flow is *saved* but not *published*. Click Publish. Published name (not "API Mapper") appears in YOOtheme Source dropdown.
54
100
  - **Joomla 404 on `/wp-json/...`** → Joomla wraps in `com_ajax`. See `apimapper_get_skill topic="joomla"`.
55
- - **OAuth expired** → use `apimapper_credential_link` to re-auth, NOT delete-and-recreate (loses `refresh_token`).
101
+ - **OAuth expired** → use `apimapper_oauth_authorize_begin` to re-auth (re-runs the OAuth2 authorize flow on the existing credential), NOT delete-and-recreate (loses `refresh_token`). `apimapper_credential_link` only *attaches* a credential to a connection; it does not re-authorize.
56
102
 
57
- Full docs: `wootsup.com/docs/mcp/`
103
+ Full docs: `https://wootsup.com/docs/mcp/api-mapper/`
@@ -0,0 +1,114 @@
1
+ # Conditional Style on Multi-Items
2
+
3
+ How to drive per-row YOOtheme styles (panel, card, text, button, label) from a
4
+ row field, and where the YT-Pro enums trap you. This topic exists because of
5
+ two real Cold-AI sessions that wired customers into infinite loops with
6
+ `text_style: 'primary'` (not a valid enum) and lost an hour debugging "why is
7
+ the style not changing".
8
+
9
+ The short version:
10
+
11
+ - `text_style` does **not** accept `'primary'`. Use `text_color: 'primary'`
12
+ on the `text` element, or wrap it in a `grid_item` / `panel` whose
13
+ `panel_style` is `'primary'`.
14
+ - Conditional values come from JMESPath in the Transform stage and bind to
15
+ the Multi-Items element via the row's expression slot (`${item.foo}`).
16
+
17
+ ## Canonical YT-Pro 4.5 enum table
18
+
19
+ The values below are pinned against YOOtheme Pro 4.5
20
+ `wp-content/themes/yootheme/packages/builder/elements/<element>/element.json`.
21
+
22
+ | Property | Valid values | Where it lives |
23
+ |-----------------|-------------------------------------------------------------------------------|------------------------------------------------------|
24
+ | `text_style` | `""`, `"meta"`, `"lead"`, `"small"`, `"large"` | `text` element |
25
+ | `text_color` | `""`, `"muted"`, `"emphasis"`, `"primary"`, `"secondary"`, `"success"`, `"warning"`, `"danger"` | `text`, `heading`, `subtitle` |
26
+ | `panel_style` | `""`, `"default"`, `"primary"`, `"secondary"` | `grid_item`, `panel`, `card` (legacy) wrappers |
27
+ | `card_style` | `""`, `"default"`, `"primary"`, `"secondary"`, `"hover"` | `card` element |
28
+ | `button_style` | `"default"`, `"primary"`, `"secondary"`, `"danger"`, `"text"`, `"link"` | `button` element |
29
+ | `label_style` | `""`, `"success"`, `"warning"`, `"danger"` | `label` element |
30
+
31
+ ### Trap: `text_style: 'primary'` is not a thing
32
+
33
+ `text_style` is a typographic-role enum (caption, lead paragraph etc.), not a
34
+ color scheme. If you want the body text emphasized in the theme's primary
35
+ color, you have two correct routes:
36
+
37
+ 1. **Cheap route: `text_color: 'primary'` on the `text` element.**
38
+ The text element supports both `text_style` (size/weight) and
39
+ `text_color` (theme color slot). They compose — `text_style: 'lead'` +
40
+ `text_color: 'primary'` is valid.
41
+
42
+ 2. **Heavy route: wrap in `grid_item` with `panel_style: 'primary'`.**
43
+ This gives the whole row a primary-themed panel background and applies
44
+ the YT-Pro panel typography ramp. Use this when the cell needs a colored
45
+ pill/card around it, not just colored text.
46
+
47
+ If you see `requires_confirm: true` looping or you get an unhelpful YT-Pro
48
+ "unknown style" warning in the page render, this is the first thing to check.
49
+
50
+ ## Recipe A — text_color from row field
51
+
52
+ Bind the row field `priority` to the text element's `text_color`. The row's
53
+ JMESPath transform precomputes a valid enum value so the binding is just
54
+ `${item.color}`.
55
+
56
+ ```jmespath
57
+ items[].{
58
+ title: title,
59
+ body: description,
60
+ color: (priority == `high` && `danger`) ||
61
+ (priority == `medium` && `warning`) ||
62
+ `muted`
63
+ }
64
+ ```
65
+
66
+ In the YT-Pro Multi-Items element layout, the `text` child binds:
67
+
68
+ ```
69
+ title → ${item.title}
70
+ content → ${item.body}
71
+ text_color → ${item.color}
72
+ text_style → "lead"
73
+ ```
74
+
75
+ Note `text_style` stays a literal (`"lead"`) — only `text_color` varies per
76
+ row. Both compose cleanly.
77
+
78
+ ## Recipe B — panel_style wrapper from row field
79
+
80
+ Use this when each row needs a colored card or pill background, not just
81
+ colored text. The wrapper is a `grid_item` with its `panel_style` bound to
82
+ the row's color.
83
+
84
+ ```jmespath
85
+ items[].{
86
+ title: title,
87
+ body: description,
88
+ panelKey: (status == `error` && `primary`) ||
89
+ (status == `warn` && `secondary`) ||
90
+ `default`
91
+ }
92
+ ```
93
+
94
+ In the Multi-Items layout, the `grid_item` wrapping the row content binds:
95
+
96
+ ```
97
+ panel_style → ${item.panelKey}
98
+ panel_card → "default" (literal — keeps card chrome consistent)
99
+ ```
100
+
101
+ Inside that grid_item, the `text` child stays color-neutral
102
+ (`text_color: ""`, `text_style: ""`) so the panel's own typography applies.
103
+
104
+ ## Why `text_style: 'primary'` keeps tripping AIs
105
+
106
+ Customers (and AIs) generalize from the `panel_style` / `card_style` /
107
+ `button_style` precedent: those all accept `'primary'`. `text_style` looks
108
+ like the same family, but it isn't — it's a holdover from the original
109
+ UIkit text-role API where roles are `lead`/`meta`/`small`/`large`. YT-Pro's
110
+ "is this row important?" intent belongs in `text_color` or `panel_style`,
111
+ never in `text_style`.
112
+
113
+ When in doubt: prefer Recipe A (cheap, composes with everything), upgrade to
114
+ Recipe B only when the row needs visible chrome.