@xano/developer-mcp 1.0.1 → 1.0.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 (42) hide show
  1. package/README.md +96 -31
  2. package/dist/index.js +248 -180
  3. package/package.json +4 -2
  4. package/xanoscript_docs/README.md +107 -1
  5. package/xanoscript_docs/agents.md +329 -0
  6. package/xanoscript_docs/apis.md +343 -0
  7. package/xanoscript_docs/database.md +417 -0
  8. package/xanoscript_docs/ephemeral.md +333 -0
  9. package/xanoscript_docs/frontend.md +291 -0
  10. package/xanoscript_docs/functions.md +232 -2035
  11. package/xanoscript_docs/integrations.md +439 -0
  12. package/xanoscript_docs/mcp-servers.md +190 -0
  13. package/xanoscript_docs/plan.md +192 -0
  14. package/xanoscript_docs/syntax.md +314 -0
  15. package/xanoscript_docs/tables.md +270 -0
  16. package/xanoscript_docs/tasks.md +254 -0
  17. package/xanoscript_docs/testing.md +335 -0
  18. package/xanoscript_docs/tools.md +305 -0
  19. package/xanoscript_docs/types.md +297 -0
  20. package/xanoscript_docs/version.json +2 -1
  21. package/xanoscript_docs/api_query_examples.md +0 -1255
  22. package/xanoscript_docs/api_query_guideline.md +0 -129
  23. package/xanoscript_docs/build_from_lovable.md +0 -715
  24. package/xanoscript_docs/db_query_guideline.md +0 -427
  25. package/xanoscript_docs/ephemeral_environment_guideline.md +0 -529
  26. package/xanoscript_docs/expression_guideline.md +0 -1086
  27. package/xanoscript_docs/frontend_guideline.md +0 -67
  28. package/xanoscript_docs/function_examples.md +0 -1406
  29. package/xanoscript_docs/function_guideline.md +0 -130
  30. package/xanoscript_docs/input_guideline.md +0 -227
  31. package/xanoscript_docs/mcp_server_examples.md +0 -36
  32. package/xanoscript_docs/mcp_server_guideline.md +0 -69
  33. package/xanoscript_docs/query_filter.md +0 -489
  34. package/xanoscript_docs/table_examples.md +0 -586
  35. package/xanoscript_docs/table_guideline.md +0 -137
  36. package/xanoscript_docs/task_examples.md +0 -511
  37. package/xanoscript_docs/task_guideline.md +0 -103
  38. package/xanoscript_docs/tips_and_tricks.md +0 -144
  39. package/xanoscript_docs/tool_examples.md +0 -69
  40. package/xanoscript_docs/tool_guideline.md +0 -139
  41. package/xanoscript_docs/unit_testing_guideline.md +0 -328
  42. package/xanoscript_docs/workspace.md +0 -17
package/README.md CHANGED
@@ -148,32 +148,89 @@ validate_xanoscript({
148
148
 
149
149
  ### 3. `xanoscript_docs`
150
150
 
151
- Retrieves XanoScript programming language documentation.
151
+ Retrieves XanoScript programming language documentation with context-aware support.
152
152
 
153
153
  **Parameters:**
154
154
  | Parameter | Type | Required | Description |
155
155
  |-----------|------|----------|-------------|
156
- | `keyword` | string | No | Documentation topic to retrieve |
156
+ | `topic` | string | No | Specific documentation topic to retrieve |
157
+ | `file_path` | string | No | File path being edited for context-aware docs (e.g., `apis/users/create.xs`) |
158
+ | `mode` | string | No | `full` (default) or `quick_reference` for compact syntax cheatsheet |
159
+
160
+ **Available Topics:**
161
+
162
+ | Topic | Description |
163
+ |-------|-------------|
164
+ | `readme` | XanoScript overview, workspace structure, and quick reference |
165
+ | `syntax` | Expressions, operators, and filters for all XanoScript code |
166
+ | `types` | Data types, input blocks, and validation |
167
+ | `tables` | Database schema definitions with indexes and relationships |
168
+ | `functions` | Reusable function stacks with inputs and responses |
169
+ | `apis` | HTTP endpoint definitions with authentication and CRUD patterns |
170
+ | `tasks` | Scheduled and cron jobs |
171
+ | `database` | All db.* operations: query, get, add, edit, patch, delete |
172
+ | `agents` | AI agent configuration with LLM providers and tools |
173
+ | `tools` | AI tools for agents and MCP servers |
174
+ | `mcp-servers` | MCP server definitions exposing tools |
175
+ | `testing` | Unit tests, mocks, and assertions |
176
+ | `integrations` | Cloud storage, Redis, security, and external APIs |
177
+ | `frontend` | Static frontend development and deployment |
178
+ | `ephemeral` | Temporary test environments |
179
+
180
+ **Examples:**
181
+ ```
182
+ // Get overview
183
+ xanoscript_docs()
184
+
185
+ // Get specific topic
186
+ xanoscript_docs({ topic: "functions" })
187
+
188
+ // Context-aware: get all docs relevant to file being edited
189
+ xanoscript_docs({ file_path: "apis/users/create.xs" })
190
+
191
+ // Compact quick reference (uses less context)
192
+ xanoscript_docs({ topic: "database", mode: "quick_reference" })
193
+ ```
157
194
 
158
- **Supported Keywords:**
195
+ ### 4. `init_workspace`
159
196
 
160
- | Category | Keywords |
161
- |----------|----------|
162
- | Core Concepts | `function`, `api_query`, `table`, `task`, `tool`, `agent`, `mcp_server` |
163
- | Language Reference | `syntax`, `expressions`, `input`, `db_query`, `query_filter` |
164
- | Workflows | `workflow`, `function_workflow`, `api_workflow`, `table_workflow`, `task_workflow` |
165
- | Special Topics | `frontend`, `lovable`, `testing`, `tips`, `ephemeral` |
197
+ Get comprehensive instructions for initializing a local Xano development workspace.
166
198
 
167
- **Aliases:** The tool supports keyword aliases for convenience:
168
- - `api`, `apis`, `query`, `endpoint` → `api_query`
169
- - `func` → `function`
170
- - `db` `db_query`
199
+ **Parameters:** None
200
+
201
+ **Returns:** Documentation on:
202
+ - Directory structure for local development
203
+ - File naming conventions
204
+ - Registry format for tracking changes
205
+ - Workflows for pulling/pushing XanoScript files via the Headless API
171
206
 
172
207
  **Example:**
173
208
  ```
174
- xanoscript_docs({ keyword: "function" })
209
+ init_workspace()
175
210
  ```
176
211
 
212
+ ## MCP Resources
213
+
214
+ The server also exposes XanoScript documentation as MCP resources for direct access:
215
+
216
+ | Resource URI | Description |
217
+ |--------------|-------------|
218
+ | `xanoscript://docs/readme` | Overview and quick reference |
219
+ | `xanoscript://docs/syntax` | Expressions, operators, and filters |
220
+ | `xanoscript://docs/types` | Data types and validation |
221
+ | `xanoscript://docs/tables` | Database schema definitions |
222
+ | `xanoscript://docs/functions` | Reusable function stacks |
223
+ | `xanoscript://docs/apis` | HTTP endpoint definitions |
224
+ | `xanoscript://docs/tasks` | Scheduled and cron jobs |
225
+ | `xanoscript://docs/database` | Database operations |
226
+ | `xanoscript://docs/agents` | AI agent configuration |
227
+ | `xanoscript://docs/tools` | AI tools for agents |
228
+ | `xanoscript://docs/mcp-servers` | MCP server definitions |
229
+ | `xanoscript://docs/testing` | Unit tests and mocks |
230
+ | `xanoscript://docs/integrations` | External service integrations |
231
+ | `xanoscript://docs/frontend` | Static frontend development |
232
+ | `xanoscript://docs/ephemeral` | Temporary test environments |
233
+
177
234
  ## npm Scripts
178
235
 
179
236
  | Script | Command | Description |
@@ -189,19 +246,24 @@ xanoscript_docs({ keyword: "function" })
189
246
  xano-developer-mcp/
190
247
  ├── src/
191
248
  │ ├── index.ts # Main MCP server implementation
192
- └── xanoscript.d.ts # TypeScript declarations
249
+ ├── xanoscript.d.ts # TypeScript declarations
250
+ │ └── templates/
251
+ │ ├── init-workspace.ts # Workspace initialization template
252
+ │ └── xanoscript-index.ts
193
253
  ├── dist/ # Compiled JavaScript output
194
254
  ├── scripts/
195
255
  │ └── sync-xanoscript-docs.ts # Documentation sync script
196
- ├── api_docs/ # Xano API documentation (16 markdown files)
256
+ ├── api_docs/ # Xano Headless API documentation (16 markdown files)
197
257
  │ ├── index.md
198
258
  │ ├── workspace.md
199
259
  │ ├── table.md
200
260
  │ └── ...
201
261
  ├── xanoscript_docs/ # XanoScript language documentation
202
262
  │ ├── version.json
203
- │ ├── function_guideline.md
204
- │ ├── function_examples.md
263
+ │ ├── README.md
264
+ │ ├── syntax.md
265
+ │ ├── functions.md
266
+ │ ├── apis.md
205
267
  │ └── ...
206
268
  ├── package.json
207
269
  └── tsconfig.json
@@ -211,8 +273,9 @@ xano-developer-mcp/
211
273
 
212
274
  | Package | Version | Purpose |
213
275
  |---------|---------|---------|
214
- | `@modelcontextprotocol/sdk` | 1.26.0 | Official MCP SDK |
215
- | `@xano/xanoscript-language-server` | 11.6.3 | XanoScript parser and validation |
276
+ | `@modelcontextprotocol/sdk` | ^1.26.0 | Official MCP SDK |
277
+ | `@xano/xanoscript-language-server` | ^11.6.3 | XanoScript parser and validation |
278
+ | `minimatch` | ^10.1.2 | Glob pattern matching for context-aware docs |
216
279
 
217
280
  ## How It Works
218
281
 
@@ -229,7 +292,11 @@ Xano Developer MCP Server
229
292
 
230
293
  ├─► validate_xanoscript → Parses code with XanoScript language server
231
294
 
232
- └─► xanoscript_docs → Reads external XanoScript documentation
295
+ ├─► xanoscript_docs → Context-aware docs from /xanoscript_docs/*.md
296
+
297
+ ├─► init_workspace → Returns workspace setup instructions
298
+
299
+ └─► MCP Resources → Direct access to documentation files
233
300
  ```
234
301
 
235
302
  ## Authentication
@@ -238,16 +305,6 @@ The MCP server itself does not require authentication. However, when using the d
238
305
 
239
306
  ## Development
240
307
 
241
- ### Syncing Documentation
242
-
243
- If the XanoScript documentation source changes, regenerate the mapping:
244
-
245
- ```bash
246
- npm run sync-docs
247
- ```
248
-
249
- This scans the xanoscript-ai-documentation directory and updates the documentation mapping in the server.
250
-
251
308
  ### Building
252
309
 
253
310
  ```bash
@@ -256,6 +313,14 @@ npm run build
256
313
 
257
314
  Compiles TypeScript to JavaScript in the `dist/` directory.
258
315
 
316
+ ### Documentation Structure
317
+
318
+ The XanoScript documentation uses a file-based structure in `xanoscript_docs/`. The documentation mapping is configured in `src/index.ts` via the `XANOSCRIPT_DOCS_V2` constant, which defines:
319
+
320
+ - **file**: The markdown file containing the documentation
321
+ - **applyTo**: Glob patterns for context-aware matching (e.g., `apis/**/*.xs`)
322
+ - **description**: Human-readable description of the topic
323
+
259
324
  ## License
260
325
 
261
326
  See [LICENSE](LICENSE) for details.