@agility/create-next-app 1.0.0-beta.2

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 (213) hide show
  1. package/.claude/settings.json +7 -0
  2. package/.claude/settings.local.json +24 -0
  3. package/FEATURE_ROADMAP.md +343 -0
  4. package/README.md +205 -0
  5. package/TESTING.md +131 -0
  6. package/bin/create-agility-app.js +48 -0
  7. package/dist/agility/api-keys/generateApiKeys.d.ts +9 -0
  8. package/dist/agility/api-keys/generateApiKeys.d.ts.map +1 -0
  9. package/dist/agility/api-keys/generateApiKeys.js +99 -0
  10. package/dist/agility/api-keys/generateApiKeys.js.map +1 -0
  11. package/dist/agility/api-keys/getApiKeys.d.ts +9 -0
  12. package/dist/agility/api-keys/getApiKeys.d.ts.map +1 -0
  13. package/dist/agility/api-keys/getApiKeys.js +14 -0
  14. package/dist/agility/api-keys/getApiKeys.js.map +1 -0
  15. package/dist/agility/index.d.ts +3 -0
  16. package/dist/agility/index.d.ts.map +1 -0
  17. package/dist/agility/index.js +8 -0
  18. package/dist/agility/index.js.map +1 -0
  19. package/dist/agility/instance/createNewInstance.d.ts +8 -0
  20. package/dist/agility/instance/createNewInstance.d.ts.map +1 -0
  21. package/dist/agility/instance/createNewInstance.js +65 -0
  22. package/dist/agility/instance/createNewInstance.js.map +1 -0
  23. package/dist/agility/instance/getAvailableInstances.d.ts +8 -0
  24. package/dist/agility/instance/getAvailableInstances.d.ts.map +1 -0
  25. package/dist/agility/instance/getAvailableInstances.js +43 -0
  26. package/dist/agility/instance/getAvailableInstances.js.map +1 -0
  27. package/dist/agility/instance/manageInstance.d.ts +9 -0
  28. package/dist/agility/instance/manageInstance.d.ts.map +1 -0
  29. package/dist/agility/instance/manageInstance.js +82 -0
  30. package/dist/agility/instance/manageInstance.js.map +1 -0
  31. package/dist/agility/utils/getMgmtAPIUrl.d.ts +20 -0
  32. package/dist/agility/utils/getMgmtAPIUrl.d.ts.map +1 -0
  33. package/dist/agility/utils/getMgmtAPIUrl.js +61 -0
  34. package/dist/agility/utils/getMgmtAPIUrl.js.map +1 -0
  35. package/dist/auth/api-key/authenticateWithApiKey.d.ts +6 -0
  36. package/dist/auth/api-key/authenticateWithApiKey.d.ts.map +1 -0
  37. package/dist/auth/api-key/authenticateWithApiKey.js +28 -0
  38. package/dist/auth/api-key/authenticateWithApiKey.js.map +1 -0
  39. package/dist/auth/index.d.ts +3 -0
  40. package/dist/auth/index.d.ts.map +1 -0
  41. package/dist/auth/index.js +8 -0
  42. package/dist/auth/index.js.map +1 -0
  43. package/dist/auth/oauth/authenticate.d.ts +6 -0
  44. package/dist/auth/oauth/authenticate.d.ts.map +1 -0
  45. package/dist/auth/oauth/authenticate.js +162 -0
  46. package/dist/auth/oauth/authenticate.js.map +1 -0
  47. package/dist/auth/oauth/constants.d.ts +5 -0
  48. package/dist/auth/oauth/constants.d.ts.map +1 -0
  49. package/dist/auth/oauth/constants.js +9 -0
  50. package/dist/auth/oauth/constants.js.map +1 -0
  51. package/dist/auth/oauth/exchangeCodeForToken.d.ts +7 -0
  52. package/dist/auth/oauth/exchangeCodeForToken.d.ts.map +1 -0
  53. package/dist/auth/oauth/exchangeCodeForToken.js +39 -0
  54. package/dist/auth/oauth/exchangeCodeForToken.js.map +1 -0
  55. package/dist/cli/index.d.ts +3 -0
  56. package/dist/cli/index.d.ts.map +1 -0
  57. package/dist/cli/index.js +290 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/promptForMissingOptions.d.ts +8 -0
  60. package/dist/cli/promptForMissingOptions.d.ts.map +1 -0
  61. package/dist/cli/promptForMissingOptions.js +92 -0
  62. package/dist/cli/promptForMissingOptions.js.map +1 -0
  63. package/dist/config/env/createEnvFile.d.ts +6 -0
  64. package/dist/config/env/createEnvFile.d.ts.map +1 -0
  65. package/dist/config/env/createEnvFile.js +31 -0
  66. package/dist/config/env/createEnvFile.js.map +1 -0
  67. package/dist/config/index.d.ts +2 -0
  68. package/dist/config/index.d.ts.map +1 -0
  69. package/dist/config/index.js +6 -0
  70. package/dist/config/index.js.map +1 -0
  71. package/dist/config/mcp/createMcpConfig.d.ts +5 -0
  72. package/dist/config/mcp/createMcpConfig.d.ts.map +1 -0
  73. package/dist/config/mcp/createMcpConfig.js +32 -0
  74. package/dist/config/mcp/createMcpConfig.js.map +1 -0
  75. package/dist/config/packages/installAgilityPackages.d.ts +6 -0
  76. package/dist/config/packages/installAgilityPackages.d.ts.map +1 -0
  77. package/dist/config/packages/installAgilityPackages.js +61 -0
  78. package/dist/config/packages/installAgilityPackages.js.map +1 -0
  79. package/dist/config/setupProject.d.ts +8 -0
  80. package/dist/config/setupProject.d.ts.map +1 -0
  81. package/dist/config/setupProject.js +32 -0
  82. package/dist/config/setupProject.js.map +1 -0
  83. package/dist/create-next-app/createNextApp.d.ts +9 -0
  84. package/dist/create-next-app/createNextApp.d.ts.map +1 -0
  85. package/dist/create-next-app/createNextApp.js +83 -0
  86. package/dist/create-next-app/createNextApp.js.map +1 -0
  87. package/dist/create-next-app/index.d.ts +3 -0
  88. package/dist/create-next-app/index.d.ts.map +1 -0
  89. package/dist/create-next-app/index.js +8 -0
  90. package/dist/create-next-app/index.js.map +1 -0
  91. package/dist/scaffold/components/createPageComponents.d.ts +6 -0
  92. package/dist/scaffold/components/createPageComponents.d.ts.map +1 -0
  93. package/dist/scaffold/components/createPageComponents.js +62 -0
  94. package/dist/scaffold/components/createPageComponents.js.map +1 -0
  95. package/dist/scaffold/containers/createContainers.d.ts +6 -0
  96. package/dist/scaffold/containers/createContainers.d.ts.map +1 -0
  97. package/dist/scaffold/containers/createContainers.js +48 -0
  98. package/dist/scaffold/containers/createContainers.js.map +1 -0
  99. package/dist/scaffold/index.d.ts +2 -0
  100. package/dist/scaffold/index.d.ts.map +1 -0
  101. package/dist/scaffold/index.js +6 -0
  102. package/dist/scaffold/index.js.map +1 -0
  103. package/dist/scaffold/instance/createBlankInstance.d.ts +8 -0
  104. package/dist/scaffold/instance/createBlankInstance.d.ts.map +1 -0
  105. package/dist/scaffold/instance/createBlankInstance.js +51 -0
  106. package/dist/scaffold/instance/createBlankInstance.js.map +1 -0
  107. package/dist/scaffold/models/createContentModels.d.ts +6 -0
  108. package/dist/scaffold/models/createContentModels.d.ts.map +1 -0
  109. package/dist/scaffold/models/createContentModels.js +70 -0
  110. package/dist/scaffold/models/createContentModels.js.map +1 -0
  111. package/dist/templates/copyDirectory.d.ts +5 -0
  112. package/dist/templates/copyDirectory.d.ts.map +1 -0
  113. package/dist/templates/copyDirectory.js +28 -0
  114. package/dist/templates/copyDirectory.js.map +1 -0
  115. package/dist/templates/copyTemplates.d.ts +8 -0
  116. package/dist/templates/copyTemplates.d.ts.map +1 -0
  117. package/dist/templates/copyTemplates.js +58 -0
  118. package/dist/templates/copyTemplates.js.map +1 -0
  119. package/dist/templates/index.d.ts +2 -0
  120. package/dist/templates/index.d.ts.map +1 -0
  121. package/dist/templates/index.js +6 -0
  122. package/dist/templates/index.js.map +1 -0
  123. package/dist/types/index.d.ts +50 -0
  124. package/dist/types/index.d.ts.map +1 -0
  125. package/dist/types/index.js +3 -0
  126. package/dist/types/index.js.map +1 -0
  127. package/dist/utils/git.d.ts +9 -0
  128. package/dist/utils/git.d.ts.map +1 -0
  129. package/dist/utils/git.js +71 -0
  130. package/dist/utils/git.js.map +1 -0
  131. package/dist/utils/validation.d.ts +45 -0
  132. package/dist/utils/validation.d.ts.map +1 -0
  133. package/dist/utils/validation.js +180 -0
  134. package/dist/utils/validation.js.map +1 -0
  135. package/package.json +45 -0
  136. package/src/agility/api-keys/generateApiKeys.ts +100 -0
  137. package/src/agility/api-keys/getApiKeys.ts +13 -0
  138. package/src/agility/index.ts +3 -0
  139. package/src/agility/instance/createNewInstance.ts +67 -0
  140. package/src/agility/instance/getAvailableInstances.ts +49 -0
  141. package/src/agility/instance/manageInstance.ts +90 -0
  142. package/src/agility/utils/getMgmtAPIUrl.ts +68 -0
  143. package/src/auth/api-key/authenticateWithApiKey.ts +24 -0
  144. package/src/auth/index.ts +3 -0
  145. package/src/auth/oauth/authenticate.ts +165 -0
  146. package/src/auth/oauth/constants.ts +6 -0
  147. package/src/auth/oauth/exchangeCodeForToken.ts +43 -0
  148. package/src/cli/index.ts +281 -0
  149. package/src/cli/promptForMissingOptions.ts +104 -0
  150. package/src/config/env/createEnvFile.ts +30 -0
  151. package/src/config/index.ts +2 -0
  152. package/src/config/mcp/createMcpConfig.ts +30 -0
  153. package/src/config/packages/installAgilityPackages.ts +63 -0
  154. package/src/config/setupProject.ts +31 -0
  155. package/src/create-next-app/createNextApp.ts +75 -0
  156. package/src/create-next-app/index.ts +3 -0
  157. package/src/scaffold/components/createPageComponents.ts +74 -0
  158. package/src/scaffold/containers/createContainers.ts +55 -0
  159. package/src/scaffold/index.ts +2 -0
  160. package/src/scaffold/instance/createBlankInstance.ts +55 -0
  161. package/src/scaffold/models/createContentModels.ts +83 -0
  162. package/src/templates/copyDirectory.ts +24 -0
  163. package/src/templates/copyTemplates.ts +57 -0
  164. package/src/templates/index.ts +2 -0
  165. package/src/types/index.ts +55 -0
  166. package/src/utils/git.ts +74 -0
  167. package/src/utils/validation.ts +184 -0
  168. package/templates/.claude/QUICK-START.md +230 -0
  169. package/templates/.claude/README.md +32 -0
  170. package/templates/.claude/settings.json +8 -0
  171. package/templates/BLANK-INSTANCE-SETUP.md +375 -0
  172. package/templates/DEVELOPMENT.md +160 -0
  173. package/templates/EXAMPLE-PROMPTS.md +643 -0
  174. package/templates/PROMPTS.md +410 -0
  175. package/templates/README.md +281 -0
  176. package/templates/agents.md +429 -0
  177. package/templates/app/[locale]/[...slug]/error.tsx +17 -0
  178. package/templates/app/[locale]/[...slug]/not-found.tsx +9 -0
  179. package/templates/app/[locale]/[...slug]/page.tsx +102 -0
  180. package/templates/app/[locale]/layout.tsx +22 -0
  181. package/templates/app/[locale]/page.tsx +12 -0
  182. package/templates/app/api/dynamic-redirect/route.ts +24 -0
  183. package/templates/app/api/preview/exit/route.ts +34 -0
  184. package/templates/app/api/preview/route.ts +63 -0
  185. package/templates/app/api/revalidate/route.ts +118 -0
  186. package/templates/components/agility-components/RichTextArea.tsx +66 -0
  187. package/templates/components/agility-components/index.ts +30 -0
  188. package/templates/components/agility-pages/MainTemplate.tsx +36 -0
  189. package/templates/components/agility-pages/index.ts +11 -0
  190. package/templates/docs/01-agility-cms-overview.md +139 -0
  191. package/templates/docs/02-page-routing.md +251 -0
  192. package/templates/docs/03-creating-components.md +462 -0
  193. package/templates/docs/04-data-fetching.md +484 -0
  194. package/templates/docs/05-containers-and-lists.md +596 -0
  195. package/templates/docs/06-localization.md +561 -0
  196. package/templates/docs/07-caching-strategies.md +410 -0
  197. package/templates/docs/08-common-components.md +756 -0
  198. package/templates/docs/09-whats-included.md +279 -0
  199. package/templates/docs/10-mcp-server-setup.md +153 -0
  200. package/templates/docs/11-linked-nested-content.md +611 -0
  201. package/templates/docs/README.md +164 -0
  202. package/templates/lib/cms/getAgilityContext.ts +28 -0
  203. package/templates/lib/cms/getAgilityPage.ts +51 -0
  204. package/templates/lib/cms/getAgilitySDK.ts +22 -0
  205. package/templates/lib/cms/getContentItem.ts +20 -0
  206. package/templates/lib/cms/getContentList.ts +19 -0
  207. package/templates/lib/cms/getRedirections.ts +85 -0
  208. package/templates/lib/cms/getSitemapFlat.ts +19 -0
  209. package/templates/lib/cms/getSitemapNested.ts +19 -0
  210. package/templates/lib/env.ts +99 -0
  211. package/templates/lib/i18n/config.ts +28 -0
  212. package/templates/proxy.ts +101 -0
  213. package/tsconfig.json +21 -0
@@ -0,0 +1,279 @@
1
+ # What's Included in This Starter
2
+
3
+ This document lists all features, patterns, and capabilities included in this Agility CMS Next.js starter project.
4
+
5
+ ## Core Features
6
+
7
+ ### ✅ Agility CMS Integration
8
+ - Full SDK integration with `@agility/nextjs` and `@agility/content-fetch`
9
+ - Environment-based configuration (fetch vs preview API)
10
+ - Type-safe helper functions for all CMS operations
11
+
12
+ ### ✅ Next.js 15 App Router
13
+ - Dynamic routing with `[locale]/[...slug]`
14
+ - Server Components by default
15
+ - Incremental Static Regeneration (ISR)
16
+ - Static generation at build time
17
+
18
+ ### ✅ Multi-Locale Support
19
+ - Configurable locales via environment variables
20
+ - Clean URLs for default locale (no prefix)
21
+ - Prefixed URLs for other locales (/fr/, /es/)
22
+ - Locale-aware sitemap generation
23
+ - Middleware-based locale routing
24
+
25
+ ### ✅ Middleware
26
+ - Preview mode handling
27
+ - Exit preview mode
28
+ - Dynamic page requests (ContentID routing)
29
+ - Locale-based routing and rewriting
30
+ - Search parameter encoding for static optimization
31
+ - Redirect handling
32
+
33
+ ### ✅ Caching
34
+ - Time-based revalidation (configurable)
35
+ - Cache tags for targeted revalidation
36
+ - On-demand revalidation via webhooks (API route ready)
37
+ - Preview mode bypasses cache
38
+ - Per-page revalidation configuration
39
+
40
+ ### ✅ Data Fetching Utilities
41
+ All in `src/lib/cms/`:
42
+ - `getAgilitySDK()` - Initialize SDK
43
+ - `getAgilityPage()` - Fetch complete page data
44
+ - `getAgilityContext()` - Get current context
45
+ - `getContentItem()` - Fetch single content
46
+ - `getContentList()` - Fetch content lists
47
+ - `getSitemapFlat()` - Flat sitemap
48
+ - `getSitemapNested()` - Nested sitemap
49
+ - `getRedirections()` - Fetch redirects
50
+
51
+ ### ✅ TypeScript
52
+ - Full TypeScript support
53
+ - Type-safe environment variables via `lib/env.ts`
54
+ - Interfaces for module props
55
+ - Generic types for CMS functions
56
+
57
+ ### ✅ Component Architecture
58
+ - Component registry in `agility-components/index.ts`
59
+ - Page template registry in `agility-pages/index.ts`
60
+ - ContentZone for zone-based rendering
61
+ - Example RichTextArea module
62
+
63
+ ### ✅ SEO & Metadata
64
+ - Dynamic metadata generation
65
+ - Title and description from Agility CMS
66
+ - Locale-aware URLs
67
+ - Static generation for all pages
68
+
69
+ ## Included Components
70
+
71
+ ### Page Templates
72
+ 1. **MainTemplate** - Single zone template with main-content-zone
73
+
74
+ ### Module Components
75
+ 1. **RichTextArea** - Rich text content with Tailwind prose styling
76
+
77
+ ## Included Utilities
78
+
79
+ ### CMS Helpers (`lib/cms/`)
80
+ - ✅ SDK initialization
81
+ - ✅ Page fetching
82
+ - ✅ Content item fetching
83
+ - ✅ Content list fetching
84
+ - ✅ Sitemap fetching (flat and nested)
85
+ - ✅ Redirections fetching
86
+ - ✅ Context management
87
+
88
+ ### i18n Helpers (`lib/i18n/`)
89
+ - ✅ Locale configuration
90
+ - ✅ Locale validation
91
+ - ✅ Path manipulation (get/remove locale)
92
+
93
+ ### Environment (`lib/env.ts`)
94
+ - ✅ Type-safe environment variable access
95
+ - ✅ Runtime validation
96
+ - ✅ Required vs optional vars
97
+
98
+ ## Routing Features
99
+
100
+ ### ✅ Dynamic Routing
101
+ - All pages route through `[locale]/[...slug]`
102
+ - Static params generation at build time
103
+ - 404 handling with not-found.tsx
104
+ - Error handling with error.tsx
105
+
106
+ ### ✅ Special Routes
107
+ - Preview mode: `?agilitypreviewkey=xxx`
108
+ - Exit preview: `?AgilityPreview=0`
109
+ - ContentID routing: `?ContentID=123`
110
+ - Locale switching: `?lang=fr`
111
+
112
+ ### ✅ URL Patterns
113
+ - Homepage: `/`
114
+ - Pages: `/about`, `/contact`
115
+ - Nested: `/blog/category/post`
116
+ - Localized: `/fr/about`, `/es/contacto`
117
+
118
+ ## Configuration
119
+
120
+ ### ✅ Environment Variables
121
+ ```env
122
+ AGILITY_GUID # Required
123
+ AGILITY_API_FETCH_KEY # Required
124
+ AGILITY_API_PREVIEW_KEY # Required
125
+ AGILITY_SECURITY_KEY # Optional (webhooks)
126
+ AGILITY_LOCALES # Required (e.g., "en-us,fr,es")
127
+ AGILITY_SITEMAP # Required (e.g., "website")
128
+ AGILITY_FETCH_CACHE_DURATION # Optional (default: 60)
129
+ AGILITY_PATH_REVALIDATE_DURATION # Optional (default: 60)
130
+ ```
131
+
132
+ ### ✅ Config Files
133
+ - `lib/i18n/config.ts` - Locale configuration
134
+ - `lib/env.ts` - Environment validation
135
+ - `proxy.ts` - Routing proxy (Next.js 16+)
136
+ - `tsconfig.json` - TypeScript config
137
+
138
+ ## What's NOT Included (Yet)
139
+
140
+ These are features from the demo site that could be added:
141
+
142
+ ### Components
143
+ - ❌ Hero components (BackgroundHero, PersonalizedHero)
144
+ - ❌ BentoSection with nested cards
145
+ - ❌ LogoStrip
146
+ - ❌ PostListing with pagination
147
+ - ❌ PostDetails
148
+ - ❌ Testimonials carousel
149
+ - ❌ TeamListing
150
+ - ❌ CompanyStats with animations
151
+ - ❌ ContactUs form
152
+ - ❌ Carousel
153
+ - ❌ PricingCards/PricingTable
154
+ - ❌ FAQ accordion
155
+ - ❌ ABTestHero
156
+
157
+ ### Features
158
+ - ❌ Header/Footer components
159
+ - ❌ Navigation component
160
+ - ❌ Breadcrumbs
161
+ - ❌ Search functionality
162
+ - ❌ Pagination helpers
163
+ - ❌ Image optimization component (AgilityPic)
164
+ - ❌ Personalization (audience/region)
165
+ - ❌ A/B testing
166
+ - ❌ Analytics integration
167
+ - ❌ AI search integration
168
+ - ❌ View transitions
169
+ - ❌ Bloom filter redirects
170
+
171
+ ### API Routes
172
+ - ❌ `/api/preview` - Preview mode handler
173
+ - ❌ `/api/preview/exit` - Exit preview
174
+ - ❌ `/api/revalidate` - Webhook handler
175
+ - ❌ `/api/dynamic-redirect` - ContentID redirect
176
+
177
+ ### Build Tools
178
+ - ❌ `prebuild` script for redirect cache
179
+ - ❌ Sitemap generation
180
+ - ❌ Robots.txt generation
181
+
182
+ ## Extensibility
183
+
184
+ ### Easy to Add
185
+ Using the documentation, you can easily add:
186
+ - ✅ New component components (follow pattern in 03-creating-components.md)
187
+ - ✅ New page templates (follow pattern in templates)
188
+ - ✅ Content lists (follow pattern in 05-containers-and-lists.md)
189
+ - ✅ Interactive components (follow hybrid pattern)
190
+ - ✅ API routes (standard Next.js)
191
+
192
+ ### Documentation Provided
193
+ All patterns documented in `.claude/docs/`:
194
+ - ✅ AI assistant guide
195
+ - ✅ CMS overview
196
+ - ✅ Page routing
197
+ - ✅ Creating modules
198
+ - ✅ Data fetching
199
+ - ✅ Containers and lists
200
+ - ✅ Localization
201
+ - ✅ Caching strategies
202
+ - ✅ Common components
203
+
204
+ ## Recommended Next Steps
205
+
206
+ After creating your project, consider adding:
207
+
208
+ 1. **Header & Footer**
209
+ - Create Header component fetching from sitemap
210
+ - Create Footer component with CMS content
211
+ - Add to layout.tsx
212
+
213
+ 2. **More Modules**
214
+ - Hero section
215
+ - Blog listing with pagination
216
+ - Testimonials
217
+ - Contact form
218
+ - FAQ accordion
219
+
220
+ 3. **API Routes**
221
+ - `/api/preview` for preview mode
222
+ - `/api/revalidate` for webhooks
223
+ - `/api/contact` for form submissions
224
+
225
+ 4. **Optimization**
226
+ - Add next/image for image optimization
227
+ - Set up webhooks for revalidation
228
+ - Configure analytics
229
+
230
+ 5. **Advanced Features**
231
+ - Search functionality
232
+ - Personalization
233
+ - A/B testing
234
+
235
+ ## Getting Started with Extensions
236
+
237
+ ### To Add a New Module:
238
+ 1. Read [03-creating-components.md](./03-creating-components.md)
239
+ 2. Create component file in `agility-components/`
240
+ 3. Register in `agility-components/index.ts`
241
+ 4. Create module in Agility CMS
242
+ 5. Add to pages in CMS
243
+
244
+ ### To Add a Content List:
245
+ 1. Read [05-containers-and-lists.md](./05-containers-and-lists.md)
246
+ 2. Create content definition in Agility CMS
247
+ 3. Create container in CMS
248
+ 4. Create module to display list
249
+ 5. Use `getContentList()` to fetch
250
+
251
+ ### To Add Multi-Language:
252
+ 1. Read [06-localization.md](./06-localization.md)
253
+ 2. Update `AGILITY_LOCALES` env var
254
+ 3. Update `lib/i18n/config.ts`
255
+ 4. Add locale content in CMS
256
+
257
+ ## Summary
258
+
259
+ This starter provides:
260
+ - ✅ **Solid Foundation**: All core Agility CMS patterns
261
+ - ✅ **Type Safety**: Full TypeScript support
262
+ - ✅ **Performance**: Caching and ISR built-in
263
+ - ✅ **Scalability**: Multi-locale support
264
+ - ✅ **Extensibility**: Easy to add features
265
+ - ✅ **Documentation**: Comprehensive AI-friendly docs
266
+
267
+ Perfect for:
268
+ - Starting new Agility CMS projects
269
+ - Learning Agility CMS with Next.js
270
+ - Building with AI coding assistants
271
+ - Creating production websites
272
+
273
+ ## Version Information
274
+
275
+ - Next.js: 15.x
276
+ - React: 19.x
277
+ - Agility CMS: Latest SDK
278
+ - TypeScript: 5.x
279
+ - Node.js: >= 18.0.0
@@ -0,0 +1,153 @@
1
+ # Agility CMS MCP Server Setup
2
+
3
+ The Agility CMS Model Context Protocol (MCP) server provides AI assistants like Claude with direct access to your Agility CMS content and configuration. This allows AI tools to help you build, configure, and manage your Agility CMS projects more effectively.
4
+
5
+ ## What is MCP?
6
+
7
+ The Model Context Protocol (MCP) is a standard that allows AI assistants to connect to external data sources and tools. The Agility CMS MCP server exposes your content models, components, and instance data to compatible AI tools.
8
+
9
+ ## Prerequisites
10
+
11
+ - Active Agility CMS account with API access
12
+ - Valid Agility CMS instance with content models
13
+ - MCP-compatible AI tool (Claude Code, GitHub Copilot, Cursor, Windsurf, ChatGPT Pro, etc.)
14
+ - Internet connection for OAuth authentication
15
+
16
+ ## Automatic Setup (Recommended)
17
+
18
+ This project includes a pre-configured MCP server setup in `.claude/settings.json`. If you're using Claude Code CLI, the MCP server should be automatically detected when you open this project.
19
+
20
+ ## Manual Setup by Platform
21
+
22
+ ### Claude Code (CLI)
23
+
24
+ If the MCP server is not automatically detected, you can add it manually:
25
+
26
+ ```bash
27
+ claude mcp add --transport http "Agility-CMS" https://mcp.agilitycms.com/api/mcp
28
+ ```
29
+
30
+ ### GitHub Copilot for VS Code
31
+
32
+ 1. Install the latest GitHub Copilot extension
33
+ 2. Open Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`)
34
+ 3. Search for "Copilot: Configure MCP Servers"
35
+ 4. Add the server URL: `https://mcp.agilitycms.com/api/mcp`
36
+ 5. Select "OAuth" as the authentication method
37
+ 6. Follow the OAuth flow to connect your Agility CMS account
38
+
39
+ ### Cursor
40
+
41
+ 1. Open Cursor settings
42
+ 2. Navigate to the MCP servers section
43
+ 3. Add a new server entry:
44
+ - Name: `Agility-CMS`
45
+ - URL: `https://mcp.agilitycms.com/api/mcp`
46
+ - Auth: OAuth
47
+ 4. Complete the OAuth authentication flow
48
+
49
+ ### Windsurf
50
+
51
+ 1. Access Windsurf settings/extensions
52
+ 2. Find the MCP servers configuration
53
+ 3. Add the Agility CMS server:
54
+ - Endpoint: `https://mcp.agilitycms.com/api/mcp`
55
+ - Authentication: OAuth
56
+ 4. Authenticate with your Agility CMS credentials
57
+
58
+ ### ChatGPT (Pro/Enterprise)
59
+
60
+ **Note:** Custom MCP connectors are only available for ChatGPT Pro users and Business/Enterprise/Education workspaces, and are currently only usable in Deep Research mode.
61
+
62
+ 1. Open your ChatGPT profile settings
63
+ 2. Navigate to "Custom Connectors" or "MCP Servers"
64
+ 3. Create a new custom connector:
65
+ - Name: `Agility CMS`
66
+ - URL: `https://mcp.agilitycms.com/api/mcp`
67
+ 4. Complete OAuth authentication
68
+ 5. Use the connector in Deep Research mode
69
+
70
+ ## Authentication
71
+
72
+ All platforms use OAuth authentication:
73
+
74
+ 1. When prompted, you'll be redirected to the Agility CMS login page
75
+ 2. Sign in with your Agility CMS credentials
76
+ 3. Grant the MCP server access to your instances
77
+ 4. You'll be redirected back to your AI tool
78
+
79
+ The authentication is persistent and you won't need to re-authenticate unless you explicitly disconnect.
80
+
81
+ ## Available MCP Tools
82
+
83
+ Once connected, the AI assistant will have access to these tools:
84
+
85
+ ### Content Management
86
+ - View and search content models
87
+ - Access content items
88
+ - Browse content containers
89
+ - Query content lists
90
+
91
+ ### Component Management
92
+ - List component models
93
+ - Access component instances
94
+ - View field types and configurations
95
+
96
+ ### Instance Information
97
+ - Get instance details
98
+ - Access API keys and configurations
99
+ - View available locales
100
+
101
+ ## Using the MCP Server
102
+
103
+ Once configured, you can ask your AI assistant questions like:
104
+
105
+ - "What content models are available in my Agility instance?"
106
+ - "Show me the fields for the BlogPost content model"
107
+ - "List all the components in this project"
108
+ - "What are the available locales in my instance?"
109
+ - "Help me create a new component that matches the Article content model"
110
+
111
+ The AI assistant will use the MCP server to fetch real-time data from your Agility CMS instance and provide accurate, context-aware responses.
112
+
113
+ ## Troubleshooting
114
+
115
+ ### MCP Server Not Detected
116
+
117
+ If the MCP server is not automatically detected:
118
+
119
+ 1. Ensure the `.claude/settings.json` file exists in your project root
120
+ 2. Check that your AI tool supports MCP servers
121
+ 3. Try manually adding the server using the platform-specific instructions above
122
+ 4. Restart your AI tool
123
+
124
+ ### Authentication Failures
125
+
126
+ If authentication fails:
127
+
128
+ 1. Verify you have an active Agility CMS account
129
+ 2. Check your internet connection
130
+ 3. Try clearing your OAuth tokens and re-authenticating
131
+ 4. Ensure your Agility CMS account has API access enabled
132
+
133
+ ### MCP Tools Not Working
134
+
135
+ If the MCP tools are not responding:
136
+
137
+ 1. Verify you've completed OAuth authentication
138
+ 2. Check that your Agility instance is active
139
+ 3. Ensure you have proper permissions in your Agility CMS account
140
+ 4. Try disconnecting and reconnecting the MCP server
141
+
142
+ ## More Information
143
+
144
+ - [Agility CMS MCP Server Documentation](https://mcp.agilitycms.com/instructions)
145
+ - [Model Context Protocol Specification](https://modelcontextprotocol.io/)
146
+ - [Agility CMS Documentation](https://help.agilitycms.com/)
147
+
148
+ ## Security Notes
149
+
150
+ - The MCP server uses OAuth 2.0 for secure authentication
151
+ - Your API keys and credentials are never stored by the MCP server
152
+ - All communication is over HTTPS
153
+ - You can revoke MCP server access at any time from your Agility CMS account settings