@wootsup/mcp 0.1.0-rc.9 → 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 (240) hide show
  1. package/CHANGELOG.md +148 -83
  2. package/README.md +36 -32
  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.d.ts +19 -0
  11. package/dist/index.js +163 -22
  12. package/dist/index.js.map +1 -1
  13. package/dist/install-skill.js +1 -1
  14. package/dist/modules/apimapper/cache.d.ts +2 -2
  15. package/dist/modules/apimapper/cache.js +119 -29
  16. package/dist/modules/apimapper/cache.js.map +1 -1
  17. package/dist/modules/apimapper/client.d.ts +102 -1
  18. package/dist/modules/apimapper/client.js +631 -297
  19. package/dist/modules/apimapper/client.js.map +1 -1
  20. package/dist/modules/apimapper/connections-format.d.ts +51 -0
  21. package/dist/modules/apimapper/connections-format.js +261 -0
  22. package/dist/modules/apimapper/connections-format.js.map +1 -0
  23. package/dist/modules/apimapper/connections-trim.d.ts +82 -0
  24. package/dist/modules/apimapper/connections-trim.js +224 -0
  25. package/dist/modules/apimapper/connections-trim.js.map +1 -0
  26. package/dist/modules/apimapper/connections.d.ts +14 -2
  27. package/dist/modules/apimapper/connections.js +612 -153
  28. package/dist/modules/apimapper/connections.js.map +1 -1
  29. package/dist/modules/apimapper/credential-sanitizer.d.ts +5 -0
  30. package/dist/modules/apimapper/credential-sanitizer.js +60 -1
  31. package/dist/modules/apimapper/credential-sanitizer.js.map +1 -1
  32. package/dist/modules/apimapper/credentials-format.d.ts +21 -0
  33. package/dist/modules/apimapper/credentials-format.js +145 -0
  34. package/dist/modules/apimapper/credentials-format.js.map +1 -0
  35. package/dist/modules/apimapper/credentials.d.ts +12 -2
  36. package/dist/modules/apimapper/credentials.js +226 -73
  37. package/dist/modules/apimapper/credentials.js.map +1 -1
  38. package/dist/modules/apimapper/diagnose.d.ts +54 -2
  39. package/dist/modules/apimapper/diagnose.js +213 -12
  40. package/dist/modules/apimapper/diagnose.js.map +1 -1
  41. package/dist/modules/apimapper/elicitation.d.ts +54 -0
  42. package/dist/modules/apimapper/elicitation.js +90 -0
  43. package/dist/modules/apimapper/elicitation.js.map +1 -0
  44. package/dist/modules/apimapper/flows-format.d.ts +50 -0
  45. package/dist/modules/apimapper/flows-format.js +318 -0
  46. package/dist/modules/apimapper/flows-format.js.map +1 -0
  47. package/dist/modules/apimapper/flows.d.ts +13 -2
  48. package/dist/modules/apimapper/flows.js +312 -122
  49. package/dist/modules/apimapper/flows.js.map +1 -1
  50. package/dist/modules/apimapper/gateway/advanced-tool.d.ts +9 -0
  51. package/dist/modules/apimapper/gateway/advanced-tool.js +265 -0
  52. package/dist/modules/apimapper/gateway/advanced-tool.js.map +1 -0
  53. package/dist/modules/apimapper/gateway/capturing-server.d.ts +81 -0
  54. package/dist/modules/apimapper/gateway/capturing-server.js +87 -0
  55. package/dist/modules/apimapper/gateway/capturing-server.js.map +1 -0
  56. package/dist/modules/apimapper/gateway/essentials.d.ts +4 -0
  57. package/dist/modules/apimapper/gateway/essentials.js +35 -0
  58. package/dist/modules/apimapper/gateway/essentials.js.map +1 -0
  59. package/dist/modules/apimapper/gateway/test-support.d.ts +17 -0
  60. package/dist/modules/apimapper/gateway/test-support.js +43 -0
  61. package/dist/modules/apimapper/gateway/test-support.js.map +1 -0
  62. package/dist/modules/apimapper/get-skill.d.ts +3 -3
  63. package/dist/modules/apimapper/get-skill.js +47 -7
  64. package/dist/modules/apimapper/get-skill.js.map +1 -1
  65. package/dist/modules/apimapper/graph-builder.js +1 -1
  66. package/dist/modules/apimapper/graph-builder.js.map +1 -1
  67. package/dist/modules/apimapper/graph.d.ts +2 -2
  68. package/dist/modules/apimapper/graph.js +170 -35
  69. package/dist/modules/apimapper/graph.js.map +1 -1
  70. package/dist/modules/apimapper/index.d.ts +17 -1
  71. package/dist/modules/apimapper/index.js +68 -17
  72. package/dist/modules/apimapper/index.js.map +1 -1
  73. package/dist/modules/apimapper/inspect.d.ts +3 -2
  74. package/dist/modules/apimapper/inspect.js +97 -13
  75. package/dist/modules/apimapper/inspect.js.map +1 -1
  76. package/dist/modules/apimapper/library.d.ts +2 -2
  77. package/dist/modules/apimapper/library.js +665 -80
  78. package/dist/modules/apimapper/library.js.map +1 -1
  79. package/dist/modules/apimapper/license-format.d.ts +22 -0
  80. package/dist/modules/apimapper/license-format.js +149 -0
  81. package/dist/modules/apimapper/license-format.js.map +1 -0
  82. package/dist/modules/apimapper/license.d.ts +16 -2
  83. package/dist/modules/apimapper/license.js +62 -38
  84. package/dist/modules/apimapper/license.js.map +1 -1
  85. package/dist/modules/apimapper/local-sources.d.ts +2 -2
  86. package/dist/modules/apimapper/local-sources.js +44 -30
  87. package/dist/modules/apimapper/local-sources.js.map +1 -1
  88. package/dist/modules/apimapper/misc.d.ts +30 -2
  89. package/dist/modules/apimapper/misc.js +114 -49
  90. package/dist/modules/apimapper/misc.js.map +1 -1
  91. package/dist/modules/apimapper/node-schema.d.ts +52 -0
  92. package/dist/modules/apimapper/node-schema.js +70 -2
  93. package/dist/modules/apimapper/node-schema.js.map +1 -1
  94. package/dist/modules/apimapper/normalizers.d.ts +1 -0
  95. package/dist/modules/apimapper/normalizers.js +51 -0
  96. package/dist/modules/apimapper/normalizers.js.map +1 -1
  97. package/dist/modules/apimapper/onboarding.d.ts +78 -3
  98. package/dist/modules/apimapper/onboarding.js +428 -26
  99. package/dist/modules/apimapper/onboarding.js.map +1 -1
  100. package/dist/modules/apimapper/read-cache.d.ts +31 -2
  101. package/dist/modules/apimapper/read-cache.js +20 -6
  102. package/dist/modules/apimapper/read-cache.js.map +1 -1
  103. package/dist/modules/apimapper/render/_shared.d.ts +24 -0
  104. package/dist/modules/apimapper/render/_shared.js +84 -0
  105. package/dist/modules/apimapper/render/_shared.js.map +1 -0
  106. package/dist/modules/apimapper/render/dag.d.ts +18 -0
  107. package/dist/modules/apimapper/render/dag.js +70 -0
  108. package/dist/modules/apimapper/render/dag.js.map +1 -0
  109. package/dist/modules/apimapper/render/index.d.ts +2 -0
  110. package/dist/modules/apimapper/render/index.js +112 -0
  111. package/dist/modules/apimapper/render/index.js.map +1 -0
  112. package/dist/modules/apimapper/render/renderers/chart-bar.d.ts +2 -0
  113. package/dist/modules/apimapper/render/renderers/chart-bar.js +70 -0
  114. package/dist/modules/apimapper/render/renderers/chart-bar.js.map +1 -0
  115. package/dist/modules/apimapper/render/renderers/chart-line.d.ts +2 -0
  116. package/dist/modules/apimapper/render/renderers/chart-line.js +71 -0
  117. package/dist/modules/apimapper/render/renderers/chart-line.js.map +1 -0
  118. package/dist/modules/apimapper/render/renderers/diff.d.ts +2 -0
  119. package/dist/modules/apimapper/render/renderers/diff.js +154 -0
  120. package/dist/modules/apimapper/render/renderers/diff.js.map +1 -0
  121. package/dist/modules/apimapper/render/renderers/flow-diagram.d.ts +1 -0
  122. package/dist/modules/apimapper/render/renderers/flow-diagram.js +180 -0
  123. package/dist/modules/apimapper/render/renderers/flow-diagram.js.map +1 -0
  124. package/dist/modules/apimapper/render/renderers/json-tree.d.ts +2 -0
  125. package/dist/modules/apimapper/render/renderers/json-tree.js +87 -0
  126. package/dist/modules/apimapper/render/renderers/json-tree.js.map +1 -0
  127. package/dist/modules/apimapper/render/renderers/schema-diagram.d.ts +2 -0
  128. package/dist/modules/apimapper/render/renderers/schema-diagram.js +83 -0
  129. package/dist/modules/apimapper/render/renderers/schema-diagram.js.map +1 -0
  130. package/dist/modules/apimapper/render/renderers/table.d.ts +2 -0
  131. package/dist/modules/apimapper/render/renderers/table.js +75 -0
  132. package/dist/modules/apimapper/render/renderers/table.js.map +1 -0
  133. package/dist/modules/apimapper/render/schemas.d.ts +23 -0
  134. package/dist/modules/apimapper/render/schemas.js +56 -0
  135. package/dist/modules/apimapper/render/schemas.js.map +1 -0
  136. package/dist/modules/apimapper/render/secret-masking.d.ts +5 -0
  137. package/dist/modules/apimapper/render/secret-masking.js +51 -0
  138. package/dist/modules/apimapper/render/secret-masking.js.map +1 -0
  139. package/dist/modules/apimapper/render/sidecar.d.ts +21 -0
  140. package/dist/modules/apimapper/render/sidecar.js +66 -0
  141. package/dist/modules/apimapper/render/sidecar.js.map +1 -0
  142. package/dist/modules/apimapper/render/token-cap.d.ts +21 -0
  143. package/dist/modules/apimapper/render/token-cap.js +57 -0
  144. package/dist/modules/apimapper/render/token-cap.js.map +1 -0
  145. package/dist/modules/apimapper/schema.d.ts +2 -2
  146. package/dist/modules/apimapper/schema.js +92 -33
  147. package/dist/modules/apimapper/schema.js.map +1 -1
  148. package/dist/modules/apimapper/settings-format.d.ts +23 -0
  149. package/dist/modules/apimapper/settings-format.js +135 -0
  150. package/dist/modules/apimapper/settings-format.js.map +1 -0
  151. package/dist/modules/apimapper/settings.d.ts +2 -2
  152. package/dist/modules/apimapper/settings.js +100 -42
  153. package/dist/modules/apimapper/settings.js.map +1 -1
  154. package/dist/modules/apimapper/sites-tools.d.ts +29 -0
  155. package/dist/modules/apimapper/sites-tools.js +165 -0
  156. package/dist/modules/apimapper/sites-tools.js.map +1 -0
  157. package/dist/modules/apimapper/skill-resources.d.ts +2 -2
  158. package/dist/modules/apimapper/skill-resources.js.map +1 -1
  159. package/dist/modules/apimapper/token-baseline.harness.d.ts +91 -0
  160. package/dist/modules/apimapper/token-baseline.harness.js +291 -0
  161. package/dist/modules/apimapper/token-baseline.harness.js.map +1 -0
  162. package/dist/modules/apimapper/tool-result.d.ts +46 -0
  163. package/dist/modules/apimapper/tool-result.js +63 -0
  164. package/dist/modules/apimapper/tool-result.js.map +1 -0
  165. package/dist/modules/apimapper/toolslist-size.d.ts +56 -0
  166. package/dist/modules/apimapper/toolslist-size.js +192 -0
  167. package/dist/modules/apimapper/toolslist-size.js.map +1 -0
  168. package/dist/modules/apimapper/types.d.ts +44 -8
  169. package/dist/modules/apimapper/types.js +26 -1
  170. package/dist/modules/apimapper/types.js.map +1 -1
  171. package/dist/modules/apimapper/use-profile.d.ts +21 -0
  172. package/dist/modules/apimapper/use-profile.js +56 -2
  173. package/dist/modules/apimapper/use-profile.js.map +1 -1
  174. package/dist/modules/apimapper/whitelist-drift.d.ts +85 -0
  175. package/dist/modules/apimapper/whitelist-drift.js +360 -0
  176. package/dist/modules/apimapper/whitelist-drift.js.map +1 -0
  177. package/dist/modules/apimapper/workflows.d.ts +2 -2
  178. package/dist/modules/apimapper/workflows.js +202 -20
  179. package/dist/modules/apimapper/workflows.js.map +1 -1
  180. package/dist/modules/apimapper/yootheme-binding.d.ts +35 -0
  181. package/dist/modules/apimapper/yootheme-binding.js +186 -0
  182. package/dist/modules/apimapper/yootheme-binding.js.map +1 -0
  183. package/dist/platform/index.d.ts +56 -0
  184. package/dist/platform/index.js +195 -7
  185. package/dist/platform/index.js.map +1 -1
  186. package/dist/setup/detect-clients.d.ts +40 -1
  187. package/dist/setup/detect-clients.js +148 -1
  188. package/dist/setup/detect-clients.js.map +1 -1
  189. package/dist/setup/probe-handshake.js +40 -7
  190. package/dist/setup/probe-handshake.js.map +1 -1
  191. package/dist/setup/remove-config.d.ts +8 -0
  192. package/dist/setup/remove-config.js +145 -0
  193. package/dist/setup/remove-config.js.map +1 -0
  194. package/dist/setup/uninstall.d.ts +34 -0
  195. package/dist/setup/uninstall.js +147 -0
  196. package/dist/setup/uninstall.js.map +1 -0
  197. package/dist/setup-cli.d.ts +60 -0
  198. package/dist/setup-cli.js +155 -5
  199. package/dist/setup-cli.js.map +1 -1
  200. package/dist/sites/loader.d.ts +41 -0
  201. package/dist/sites/loader.js +119 -0
  202. package/dist/sites/loader.js.map +1 -0
  203. package/dist/sites/schema.d.ts +69 -0
  204. package/dist/sites/schema.js +71 -0
  205. package/dist/sites/schema.js.map +1 -0
  206. package/dist/sites/secret-resolver.d.ts +47 -0
  207. package/dist/sites/secret-resolver.js +150 -0
  208. package/dist/sites/secret-resolver.js.map +1 -0
  209. package/dist/skill-instructions.d.ts +1 -1
  210. package/dist/skill-instructions.js +5 -0
  211. package/dist/skill-instructions.js.map +1 -1
  212. package/dist/transports/stdio.js +4 -4
  213. package/dist/transports/stdio.js.map +1 -1
  214. package/dist/uninstall-skill.d.ts +27 -0
  215. package/dist/uninstall-skill.js +89 -0
  216. package/dist/uninstall-skill.js.map +1 -0
  217. package/docs/architecture.md +22 -22
  218. package/docs/customgraph-internal-migration.md +4 -4
  219. package/docs/security.md +2 -21
  220. package/docs/tools.md +40 -12
  221. package/manifest.json +77 -70
  222. package/package.json +68 -60
  223. package/skills/apimapper/SKILL.md +53 -7
  224. package/skills/apimapper/reference/conditional-style-multi-items.md +114 -0
  225. package/skills/apimapper/reference/jmespath-pitfalls.md +108 -0
  226. package/skills/apimapper/reference/joomla.md +1 -1
  227. package/skills/apimapper/reference/library-template-discovery.md +65 -0
  228. package/skills/apimapper/reference/merge-two-sources-on-key.md +99 -0
  229. package/skills/apimapper/reference/render.md +132 -0
  230. package/skills/apimapper/reference/troubleshooting.md +21 -1
  231. package/skills/apimapper/reference/yootheme.md +1 -1
  232. package/dist/auth/oauth-provider.d.ts +0 -68
  233. package/dist/auth/oauth-provider.js +0 -232
  234. package/dist/auth/oauth-provider.js.map +0 -1
  235. package/dist/server-http.d.ts +0 -22
  236. package/dist/server-http.js +0 -159
  237. package/dist/server-http.js.map +0 -1
  238. package/dist/transports/http.d.ts +0 -29
  239. package/dist/transports/http.js +0 -267
  240. package/dist/transports/http.js.map +0 -1
package/manifest.json CHANGED
@@ -1,76 +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.9",
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/products/api-mapper",
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
- }
38
- }
39
- },
40
- "user_config": [
41
- {
42
- "key": "APIMAPPER_TOKEN",
43
- "type": "string",
44
- "title": "API Mapper MCP key",
45
- "description": "Your amk_live_... key from API Mapper → Settings → MCP Keys",
46
- "required": true,
47
- "secret": 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"
48
11
  },
49
- {
50
- "key": "APIMAPPER_SITE_URL",
51
- "type": "string",
52
- "title": "Site URL",
53
- "description": "The base URL of your WordPress or Joomla site (e.g. https://example.com)",
54
- "required": true
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"
55
18
  },
56
- {
57
- "key": "APIMAPPER_PLATFORM",
58
- "type": "string",
59
- "title": "Platform",
60
- "description": "Either 'wordpress' or 'joomla'",
61
- "required": true,
62
- "default": "wordpress"
63
- }
64
- ],
65
- "compatibility": {
66
- "claude_desktop": ">=0.10.0",
67
- "platforms": [
68
- "darwin",
69
- "win32",
70
- "linux"
19
+ "license": "MIT",
20
+ "keywords": [
21
+ "api-mapper",
22
+ "wordpress",
23
+ "joomla",
24
+ "yootheme",
25
+ "mcp",
26
+ "claude"
71
27
  ],
72
- "runtimes": {
73
- "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
+ }
74
82
  }
75
- }
76
83
  }
package/package.json CHANGED
@@ -1,62 +1,70 @@
1
1
  {
2
- "name": "@wootsup/mcp",
3
- "version": "0.1.0-rc.9",
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/products/api-mapper",
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
- "dev": "tsx watch src/index.ts",
44
- "typecheck": "tsc --noEmit",
45
- "start:http": "node dist/server-http.js",
46
- "build:dxt": "node scripts/build-dxt.js"
47
- },
48
- "dependencies": {
49
- "@clack/prompts": "^0.10.0",
50
- "@getimo/mcp-toolkit": "^1.0.2",
51
- "@modelcontextprotocol/sdk": "^1.27.0",
52
- "@napi-rs/keyring": "^1.3.0",
53
- "undici": "^7.25.0",
54
- "zod": "^4.3.6"
55
- },
56
- "devDependencies": {
57
- "@types/node": "^22.0.0",
58
- "tsx": "^4.21.0",
59
- "typescript": "^5.6.0",
60
- "vitest": "^2.1.0"
61
- }
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
+ }
62
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, 74 MCP tools.
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.
@@ -0,0 +1,108 @@
1
+ # JMESPath Pitfalls
2
+
3
+ The nine traps that bite every Transform JMESPath expression in API Mapper, plus the date-primitive functions added in 2.0.8 that finally make weekday-name ↔ ISO-datetime joins tractable.
4
+
5
+ ## The 9 traps
6
+
7
+ 1. **Top-level vs item-level scope.** A flat `[].name` projects across items; bare `name` reads the wrapper object. Mixing the two is the most common cause of `null` everywhere.
8
+ 2. **Implicit numeric coercion.** `[?price > 100]` reads `price` as a string when the API returns a string. Cast first with `to_number(price) > \`100\`` or normalize upstream.
9
+ 3. **`@` vs nothing.** Inside multi-select hashes the `@` refers to the current item — `{name: @.name}` is shorthand. Forgetting `@` inside a filter expression (`[?@.x == 'y']`) is silently parsed as a function call.
10
+ 4. **String-quoted literals.** JSON literals use backticks: `\`100\``, `\`true\``, `\`null\``. Single-quoted strings (`'red'`) are raw strings. Mixing them up yields lexer errors that the engine reports far from the actual typo.
11
+ 5. **`null` propagation through pipes.** `items | [].name | [?contains(@, 'foo')]` returns `null` (not `[]`) when an item has no `name`. Wrap with `coalesce_empty(@, '')` or filter `not_null(@)`.
12
+ 6. **`length()` on null.** Vendor `length(null)` throws. Use `length(@.items || \`[]\`)` to default.
13
+ 7. **Backslash-escapes inside raw strings.** Single-quoted strings do NOT honour `\n` / `\t`. To embed a literal `'` use `'\\''` (close, escape, open).
14
+ 8. **Empty-array vs missing-key.** `[?tags]` keeps items whose `tags` is non-empty AND non-null. To match items with the *key* present regardless of value, use `[?contains(keys(@), 'tags')]`.
15
+ 9. **Multi-projection collapse on header-skip slices.** `[1:][*].{weekday: [0], open: [1]}` looks like "slice off the header row, then map each remaining row into a hash", but JMESPath parses `[1:][*]` as a *chained multi-projection* that flattens row boundaries before the hash runs. The fix is one pipe: `[1:] | [*].{weekday: [0], open: [1]}`. See "Symptom / Cause / Fix" below.
16
+
17
+ ### Pitfall 9 in detail (header-skip slice → hash projection)
18
+
19
+ **Symptom.** Output schema auto-detection returns flat columns prefixed with the row index, like:
20
+
21
+ ```
22
+ 0_weekday, 0_open, 0_close,
23
+ 1_weekday, 1_open, 1_close,
24
+ 2_weekday, 2_open, 2_close, ...
25
+ ```
26
+
27
+ Each row also reads as `null` in the actual data preview. Every binding in the Multi-Items element lands on the wrapper object instead of the row.
28
+
29
+ **Cause.** `[1:][*]` is two consecutive projections. JMESPath flattens them: the inner array index dissolves, so the trailing `.{weekday: [0], ...}` operates on the wrapper object's positional slots, not on each row. The auto-detected schema reflects that flattened shape.
30
+
31
+ **Fix.** Insert a pipe between the slice and the hash projection so the second stage starts fresh:
32
+
33
+ ```jmespath
34
+ # Working — pipe resets the projection so [*] iterates row-by-row
35
+ [1:] | [*].{
36
+ weekday: [0],
37
+ open: [1],
38
+ close: [2]
39
+ }
40
+ ```
41
+
42
+ This recipe is the canonical shape for "Google Sheets export with a header row" sources. If you find yourself debugging `0_*` / `1_*` / `2_*` column names in the YOOtheme source field picker, this is almost always the cause.
43
+
44
+ ## Date-primitive functions (new in 2.0.8)
45
+
46
+ JMESPath has no built-in date support. API Mapper ships four custom date primitives so weekday-name ↔ ISO-datetime joins (Calendly → Sheet schedule, HubSpot meeting-times → office-hours, etc.) become possible without exporting to a sidecar service.
47
+
48
+ | Function | Signature | Returns |
49
+ |----------|-----------|---------|
50
+ | `date_weekday` | `date_weekday(iso_string [, tz])` | English weekday name `"Monday"`..`"Sunday"`, or `null` on bad input |
51
+ | `date_iso_to_time` | `date_iso_to_time(iso_string [, tz])` | `"HH:MM"` 24-hour time, or `null` |
52
+ | `date_iso_to_date` | `date_iso_to_date(iso_string [, tz])` | `"YYYY-MM-DD"` calendar date, or `null` |
53
+ | `time_in_window` | `time_in_window(time, from, to)` | `true` if `time` is in `[from, to)`. Supports cross-midnight when `from > to`. `false` on any malformed input |
54
+
55
+ ### Timezone rules
56
+
57
+ - `tz` is an IANA timezone string (`"Europe/Berlin"`, `"America/New_York"`, `"UTC"`).
58
+ - If `tz` is omitted, the offset already encoded in the input string is preserved. A Calendly payload `"2026-06-04T09:00:00+02:00"` returns `"09:00"` from `date_iso_to_time(@, )` (no second arg) — i.e. the customer's local time.
59
+ - If `tz` IS supplied, the datetime is shifted into that zone first.
60
+ - An unknown timezone (typo, mistaken country code) returns `null`. This is the same graceful-failure mode as malformed datetimes — one bad row never crashes the flow.
61
+
62
+ ### The Maria recipe (Calendly + Sheet weekday-join)
63
+
64
+ ```
65
+ # Source A — Calendly available_times
66
+ [].{
67
+ day: date_weekday(start_time, 'Europe/Berlin'),
68
+ local_time: date_iso_to_time(start_time, 'Europe/Berlin'),
69
+ start_time: start_time
70
+ }
71
+ ```
72
+
73
+ Now each Calendly slot carries a Sheet-comparable `day` (e.g. `"Wednesday"`) AND a comparable `local_time` (e.g. `"09:30"`). See `merge-two-sources-on-key` for the full join pattern.
74
+
75
+ ### Slot-against-business-hours filter
76
+
77
+ ```
78
+ [?time_in_window(date_iso_to_time(start_time, 'Europe/Berlin'),
79
+ '09:00', '17:00')]
80
+ ```
81
+
82
+ Cross-midnight windows (bars, support shifts):
83
+
84
+ ```
85
+ [?time_in_window(local_time, '22:00', '02:00')] # 10pm..2am
86
+ ```
87
+
88
+ ## Depth-cap warning
89
+
90
+ JMESPath expression depth is capped at **10 levels** of bracket / pipe nesting. Above that, the engine returns `expression too deeply nested (N levels)`.
91
+
92
+ **As of 2.0.8 this is caught at flow-write time** (HTTP 422 on `flow_create` / `flow_update`) with per-node `jmespathErrors`. The response payload looks like:
93
+
94
+ ```json
95
+ {
96
+ "success": false,
97
+ "error": "1 JMESPath expression exceeded the depth limit of 10",
98
+ "jmespathErrors": { "t1": "JMESPath expression too deeply nested (13 levels). Maximum: 10" },
99
+ "status": 422
100
+ }
101
+ ```
102
+
103
+ If you hit this, the cure is almost always to split the expression into TWO transform nodes piped together — that resets the depth counter and is easier to debug.
104
+
105
+ ## See also
106
+
107
+ - `merge-two-sources-on-key` — joining two sources on a shared key, with date-primitive bridging.
108
+ - `troubleshooting` — broader error triage.
@@ -70,7 +70,7 @@ Joomla extensions install as a `.zip` (system plugin). The MCP server bundles a
70
70
  To verify the plugin is loaded:
71
71
  ```
72
72
  apimapper_health
73
- # → { platform: "joomla", version: "2.0.7", plugin: "enabled" }
73
+ # → { platform: "joomla", version: "2.0.13", plugin: "enabled" }
74
74
  ```
75
75
 
76
76
  If `plugin: "disabled"`, enable via Joomla admin → Extensions → Plugins → search "API Mapper".