@axolot-ai/mcp-server 0.0.1 → 0.0.3
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.
- package/LICENSE +21 -0
- package/README.md +79 -21
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +43 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +613 -0
- package/dist/index.js.map +1 -0
- package/package.json +9 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Axolot Development
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,43 +1,101 @@
|
|
|
1
|
-
# Axolot MCP Server
|
|
1
|
+
# Axolot MCP Server — AI-Native Headless CMS Bridge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@axolot-ai/mcp-server)
|
|
4
|
+
[](https://modelcontextprotocol.io)
|
|
5
|
+
[](https://github.com/axolot-ai/Axolot-MCP/blob/main/LICENSE)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Axolot MCP Server** (`@axolot-ai/mcp-server`) implements Anthropic's **Model Context Protocol (MCP)** to expose your website's database schema, layouts, media library, design tokens, and module tools directly to local AI assistants (Cursor, Claude Desktop, Antigravity, VS Code, Zed).
|
|
6
8
|
|
|
7
|
-
-
|
|
8
|
-
- **Media Library Access**: Allow AI to browse and select assets for your site.
|
|
9
|
-
- **Design Token Awareness**: Give AI context about your brand's colors, typography, and spacing.
|
|
10
|
-
- **Zero-Effort Integration**: Works with Cursor, Claude Desktop, Zed, and any MCP-compatible client.
|
|
9
|
+
By running this server, you give your AI editor context-aware "hands" to fetch, build, and optimize pages, products, blog posts, and text slots within your exact design system constraints.
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
---
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
## ⚡ Key Capabilities
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
* **Surgical Content Orchestration**: The AI can query pages, read slots, and register new visual slots (`createSlot`) dynamically as it writes Astro components.
|
|
16
|
+
* **Media Library Access**: The AI browses available client assets, reading dimensions, file types, and vision-generated descriptions (`getMedia`) to select images automatically.
|
|
17
|
+
* **Brand Token Awareness**: Fetches active color schemes, font families, and spacing rules (`getDesignTokens`) to write style-compliant Tailwind or CSS code.
|
|
18
|
+
* **Module Management**: AI can query, create, or update articles in the **Blog Pro** module or products in the **Tienda Online (E-commerce)** module.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🔌 Setup & Configuration
|
|
23
|
+
|
|
24
|
+
Since the server is a Node.js CLI tool, the recommended way to run it is via **`npx`**, which requires zero local code installation or cloning.
|
|
25
|
+
|
|
26
|
+
### A. Claude Desktop Integration
|
|
27
|
+
|
|
28
|
+
Add this snippet to your Claude Desktop configuration file (located at `%APPDATA%\Claude\claude_desktop_config.json` on Windows or `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
17
29
|
|
|
18
30
|
```json
|
|
19
31
|
{
|
|
20
32
|
"mcpServers": {
|
|
21
|
-
"axolot": {
|
|
33
|
+
"axolot-cms": {
|
|
22
34
|
"command": "npx",
|
|
23
|
-
"args": ["-y", "@axolot-ai/mcp-server"]
|
|
35
|
+
"args": ["-y", "@axolot-ai/mcp-server"],
|
|
36
|
+
"env": {
|
|
37
|
+
"AXOLOT_API_URL": "https://api.axolotcms.com"
|
|
38
|
+
}
|
|
24
39
|
}
|
|
25
40
|
}
|
|
26
41
|
}
|
|
27
42
|
```
|
|
28
43
|
|
|
29
|
-
###
|
|
44
|
+
### B. Cursor Integration
|
|
45
|
+
|
|
46
|
+
1. Open Cursor and go to **Settings -> Features -> MCP**.
|
|
47
|
+
2. Click **"+ Add New MCP Server"**.
|
|
48
|
+
3. Configure it as:
|
|
49
|
+
* **Name**: `axolot-cms`
|
|
50
|
+
* **Type**: `command`
|
|
51
|
+
* **Command**: `npx -y @axolot-ai/mcp-server`
|
|
52
|
+
4. Add environment variables under settings if required, or log in interactively using the tools.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🛠️ Exposed AI Tools
|
|
57
|
+
|
|
58
|
+
Once connected, the AI will automatically invoke the following tools to fulfill your design prompts:
|
|
59
|
+
|
|
60
|
+
### 🔑 Authentication & Context
|
|
61
|
+
* `cms_auth_login`: Triggers a secure authorization handshake URL in your browser.
|
|
62
|
+
* `cms_auth_status`: Verifies connection status, user role, and active site.
|
|
63
|
+
* `cms_switch_site`: Switches the active site context (site ID) when managing multiple client sites.
|
|
64
|
+
|
|
65
|
+
### 🎨 Brand & Design
|
|
66
|
+
* `getDesignTokens`: Fetches active brand guidelines (colors, typography, spacing, border radius).
|
|
67
|
+
* `setDesignTokens`: Updates brand tokens in the database to establish brand styling.
|
|
68
|
+
* `getSiteSettings`: Fetches core business information (address, social links, email).
|
|
69
|
+
|
|
70
|
+
### 📝 Layouts & Visual Slots
|
|
71
|
+
* `getPages`: Lists all pages and their corresponding registered editable content slots.
|
|
72
|
+
* `getSlots`: Reads details and values of slots on a specific page.
|
|
73
|
+
* `createSlot`: Registers a new editable slot key (e.g. `home.hero.title`) in the database.
|
|
74
|
+
* `createPage`: Generates a new page slug in the CMS structure.
|
|
75
|
+
|
|
76
|
+
### 🛍️ Modules (Blog & Shop)
|
|
77
|
+
* `getBlogPosts` / `getBlogPost`: Queries post lists, drafts, and categories.
|
|
78
|
+
* `createBlogPost` / `updateBlogPost`: Creates and updates articles.
|
|
79
|
+
* `getProducts` / `getProduct` / `createProduct`: Manages product catalogs and attributes.
|
|
80
|
+
* `getMedia`: Lists media library files with WebP URLs and alt text descriptions.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🔒 Security & Sandboxing
|
|
85
|
+
|
|
86
|
+
The MCP server runs locally on your machine under your user context, connecting to the API via StdIO. It stores session authentication tokens securely in your user home directory at `~/.axolot/mcp-auth.json` (isolated by OS permissions). It never exposes public network ports or scans files outside your active development project directory.
|
|
30
87
|
|
|
31
|
-
|
|
88
|
+
---
|
|
32
89
|
|
|
33
|
-
|
|
34
|
-
2. `cms_auth_status`: To verify the connection.
|
|
35
|
-
3. `cms_switch_site`: To select the target site.
|
|
90
|
+
## 🔗 Useful Links
|
|
36
91
|
|
|
37
|
-
|
|
92
|
+
* **Official Website**: [axolotcms.com](https://axolotcms.com)
|
|
93
|
+
* **Client Dashboard**: [ai.axolotcms.com](https://ai.axolotcms.com)
|
|
94
|
+
* **Documentation & Guides**: [axolotcms.com/docs](https://axolotcms.com/docs)
|
|
95
|
+
* **Astro SDK Repository**: [github.com/AxolotDevelopment/Axolot-SDK](https://github.com/AxolotDevelopment/Axolot-SDK)
|
|
38
96
|
|
|
39
|
-
|
|
97
|
+
---
|
|
40
98
|
|
|
41
|
-
## License
|
|
99
|
+
## 📄 License
|
|
42
100
|
|
|
43
|
-
MIT
|
|
101
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface McpConfig {
|
|
2
|
+
apiToken?: string;
|
|
3
|
+
siteId?: string;
|
|
4
|
+
apiUrl?: string;
|
|
5
|
+
userEmail?: string;
|
|
6
|
+
pendingHandshakeId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class ConfigManager {
|
|
9
|
+
private config;
|
|
10
|
+
load(): Promise<McpConfig>;
|
|
11
|
+
save(newConfig: Partial<McpConfig>): Promise<void>;
|
|
12
|
+
get(): McpConfig;
|
|
13
|
+
clear(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare const configManager: ConfigManager;
|
|
16
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAKD,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAgB;IAExB,IAAI,IAAI,OAAO,CAAC,SAAS,CAAC;IAW1B,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUxD,GAAG,IAAI,SAAS;IAIV,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ7B;AAED,eAAO,MAAM,aAAa,eAAsB,CAAA"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
const CONFIG_DIR = join(homedir(), '.axolot');
|
|
5
|
+
const CONFIG_FILE = join(CONFIG_DIR, 'mcp-auth.json');
|
|
6
|
+
export class ConfigManager {
|
|
7
|
+
config = {};
|
|
8
|
+
async load() {
|
|
9
|
+
try {
|
|
10
|
+
const data = await readFile(CONFIG_FILE, 'utf-8');
|
|
11
|
+
this.config = JSON.parse(data);
|
|
12
|
+
return this.config;
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
// If file doesn't exist, return empty config
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
async save(newConfig) {
|
|
20
|
+
this.config = { ...this.config, ...newConfig };
|
|
21
|
+
try {
|
|
22
|
+
await mkdir(CONFIG_DIR, { recursive: true });
|
|
23
|
+
await writeFile(CONFIG_FILE, JSON.stringify(this.config, null, 2));
|
|
24
|
+
}
|
|
25
|
+
catch (e) {
|
|
26
|
+
console.error(' [MCP] Error saving config:', e);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
get() {
|
|
30
|
+
return this.config;
|
|
31
|
+
}
|
|
32
|
+
async clear() {
|
|
33
|
+
this.config = {};
|
|
34
|
+
try {
|
|
35
|
+
await writeFile(CONFIG_FILE, JSON.stringify({}, null, 2));
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error(' [MCP] Error clearing config:', e);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export const configManager = new ConfigManager();
|
|
43
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sour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AC,MAAM,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;QAChB,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;QAC3D,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,CAAC,CAAC,CAAA;QACpD,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* AxolotCMS MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Exposes the CMS as an MCP (Model Context Protocol) server.
|
|
6
|
+
*/
|
|
7
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
import { existsSync } from 'node:fs';
|
|
11
|
+
import { join, dirname } from 'node:path';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
import { configManager } from './config.js';
|
|
14
|
+
// ── Environment Setup ────────────────────────────────────────────────────────
|
|
15
|
+
// 1. Try to load .env from the MCP package directory itself
|
|
16
|
+
const mcpDir = dirname(fileURLToPath(import.meta.url));
|
|
17
|
+
const masterEnv = join(mcpDir, '../.env');
|
|
18
|
+
if (existsSync(masterEnv)) {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
process.loadEnvFile(masterEnv);
|
|
21
|
+
console.error(` [MCP] Loaded env from ${masterEnv}`);
|
|
22
|
+
}
|
|
23
|
+
// 2. Try to load .env from the current working directory
|
|
24
|
+
const localEnv = join(process.cwd(), '.env');
|
|
25
|
+
if (existsSync(localEnv)) {
|
|
26
|
+
try {
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
process.loadEnvFile(localEnv);
|
|
29
|
+
console.error(` [MCP] Loaded env from ${localEnv}`);
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
console.error(`Warning: Failed to load .env from ${localEnv}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// 3. Load Persistent Config
|
|
36
|
+
await configManager.load();
|
|
37
|
+
const API_URL = process.env.AXOLOT_API_URL || configManager.get().apiUrl || 'http://localhost:3001';
|
|
38
|
+
function getApiToken() {
|
|
39
|
+
return configManager.get().apiToken || process.env.AXOLOT_API_TOKEN;
|
|
40
|
+
}
|
|
41
|
+
function getSiteId() {
|
|
42
|
+
return configManager.get().siteId || process.env.AXOLOT_SITE_ID;
|
|
43
|
+
}
|
|
44
|
+
console.error(` [MCP] Active Site: ${getSiteId() || '(none)'}`);
|
|
45
|
+
console.error(` [MCP] API URL: ${API_URL}`);
|
|
46
|
+
// ── HTTP helper ─────────────────────────────────────────────────────────────
|
|
47
|
+
async function api(path, options) {
|
|
48
|
+
const token = getApiToken();
|
|
49
|
+
const siteId = getSiteId();
|
|
50
|
+
if (!token && !path.includes('/handshake/')) {
|
|
51
|
+
throw new Error(' [MCP] Authentication required. Please run the "cms_auth_login" tool.');
|
|
52
|
+
}
|
|
53
|
+
// Replace :siteId placeholder in paths if present
|
|
54
|
+
const finalPath = path.replace(':siteId', siteId || '');
|
|
55
|
+
const url = `${API_URL}${finalPath}`;
|
|
56
|
+
// Ensure POST/PATCH/PUT have a body if content-type is json
|
|
57
|
+
const fetchOptions = {
|
|
58
|
+
...options,
|
|
59
|
+
headers: {
|
|
60
|
+
'Content-Type': 'application/json',
|
|
61
|
+
...(token ? { 'Authorization': `Bearer ${token}` } : {}),
|
|
62
|
+
...options?.headers,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
if (['POST', 'PATCH', 'PUT'].includes(options?.method || '') && !fetchOptions.body) {
|
|
66
|
+
fetchOptions.body = JSON.stringify({});
|
|
67
|
+
}
|
|
68
|
+
const res = await fetch(url, fetchOptions);
|
|
69
|
+
if (!res.ok) {
|
|
70
|
+
let errorMessage = `API error ${res.status}`;
|
|
71
|
+
try {
|
|
72
|
+
const errorData = await res.json();
|
|
73
|
+
errorMessage += `: ${errorData.message || errorData.error || JSON.stringify(errorData)}`;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
errorMessage += `: ${await res.text()}`;
|
|
77
|
+
}
|
|
78
|
+
throw new Error(errorMessage);
|
|
79
|
+
}
|
|
80
|
+
return res.json();
|
|
81
|
+
}
|
|
82
|
+
// ── MCP Server setup ─────────────────────────────────────────────────────────
|
|
83
|
+
const server = new McpServer({
|
|
84
|
+
name: 'axolot-cms',
|
|
85
|
+
version: '0.1.0',
|
|
86
|
+
});
|
|
87
|
+
// ── AUTH TOOLS ───────────────────────────────────────────────────────────────
|
|
88
|
+
/**
|
|
89
|
+
* Check authentication status
|
|
90
|
+
*/
|
|
91
|
+
server.tool('cms_auth_status', 'Check if the AI is authenticated and which site is currently active.', {}, async () => {
|
|
92
|
+
const config = configManager.get();
|
|
93
|
+
let token = getApiToken();
|
|
94
|
+
const siteId = getSiteId();
|
|
95
|
+
// Si hay un handshake pendiente, intentamos completarlo para persistir la llave
|
|
96
|
+
if (config.pendingHandshakeId) {
|
|
97
|
+
try {
|
|
98
|
+
const pollUrl = `${API_URL}/api/v1/mcp/handshake/poll/${config.pendingHandshakeId}`;
|
|
99
|
+
const pollRes = await fetch(pollUrl);
|
|
100
|
+
if (pollRes.ok) {
|
|
101
|
+
const res = await pollRes.json();
|
|
102
|
+
if (res.status === 'authorized' && res.token) {
|
|
103
|
+
token = res.token;
|
|
104
|
+
await configManager.save({
|
|
105
|
+
apiToken: token,
|
|
106
|
+
siteId: res.siteId || config.siteId,
|
|
107
|
+
pendingHandshakeId: undefined
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
// Solo limpiamos si el error es de caducidad (404/410)
|
|
114
|
+
// await configManager.save({ pendingHandshakeId: undefined })
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!token) {
|
|
118
|
+
return {
|
|
119
|
+
content: [{ type: 'text', text: ' [Auth] Status: NOT LOGGED IN\n\nPlease run "cms_auth_login" to connect your account.' }],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
try {
|
|
123
|
+
const user = await api('/api/v1/auth/me');
|
|
124
|
+
return {
|
|
125
|
+
content: [{
|
|
126
|
+
type: 'text',
|
|
127
|
+
text: ` [Auth] Status: CONNECTED\nUser: ${user.name} (${user.email})\nRole: ${user.role}\n\nActive Site ID: ${siteId || 'None (Global Agency Access)'}\nAPI URL: ${API_URL}`,
|
|
128
|
+
}],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
return {
|
|
133
|
+
content: [{ type: 'text', text: ` [Auth] Status: ERROR\n${e.message}` }],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
/**
|
|
138
|
+
* Initiate Login Handshake
|
|
139
|
+
*/
|
|
140
|
+
server.tool('cms_auth_login', 'Connect your Axolot account to this AI session. This will provide a login URL.', {}, async () => {
|
|
141
|
+
try {
|
|
142
|
+
const handshake = await api('/api/v1/mcp/handshake/init', { method: 'POST' });
|
|
143
|
+
// Guardamos el ID del handshake para poder completarlo en el siguiente check de status
|
|
144
|
+
await configManager.save({ pendingHandshakeId: handshake.handshakeId });
|
|
145
|
+
return {
|
|
146
|
+
content: [{
|
|
147
|
+
type: 'text',
|
|
148
|
+
text: ` [Auth] Handshake Initiated!\n\n1. Please visit this URL to authorize the AI:\n${handshake.loginUrl}\n\n2. After authorizing in the browser, run "cms_auth_status" to complete the connection.\n\nNote: This link expires in 10 minutes.`,
|
|
149
|
+
}],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
catch (e) {
|
|
153
|
+
return {
|
|
154
|
+
content: [{ type: 'text', text: ` [Auth] Error initiating handshake: ${e.message}` }],
|
|
155
|
+
isError: true,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
/**
|
|
160
|
+
* Switch active site
|
|
161
|
+
*/
|
|
162
|
+
server.tool('cms_switch_site', 'Change the active site context for the AI. This will list available sites if no ID is provided.', { siteId: z.string().optional().describe('The UUID of the site to switch to') }, async ({ siteId }) => {
|
|
163
|
+
if (!siteId) {
|
|
164
|
+
const sites = await api('/api/v1/sites');
|
|
165
|
+
return {
|
|
166
|
+
content: [{
|
|
167
|
+
type: 'text',
|
|
168
|
+
text: ` [Auth] Please provide a Site ID to switch context.\n\nAvailable Sites:\n${sites.map(s => `- ${s.name} (ID: ${s.id})`).join('\n')}`,
|
|
169
|
+
}],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
await configManager.save({ siteId });
|
|
173
|
+
return {
|
|
174
|
+
content: [{ type: 'text', text: ` [Auth] Site context switched to: ${siteId}\nAll subsequent tool calls will target this site.` }],
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
// ── CMS TOOLS ────────────────────────────────────────────────────────────────
|
|
178
|
+
/**
|
|
179
|
+
* Get site design tokens (colors, fonts, spacing)
|
|
180
|
+
*/
|
|
181
|
+
server.tool('getDesignTokens', 'Get the design tokens (colors, typography, spacing) for the current site. Always call this first when building or modifying UI components.', {}, async () => {
|
|
182
|
+
const siteId = getSiteId();
|
|
183
|
+
if (!siteId)
|
|
184
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
185
|
+
const site = await api(`/api/v1/sites/${siteId}`);
|
|
186
|
+
return {
|
|
187
|
+
content: [{
|
|
188
|
+
type: 'text',
|
|
189
|
+
text: JSON.stringify({
|
|
190
|
+
siteName: site.name,
|
|
191
|
+
domain: site.domain,
|
|
192
|
+
tokens: site.designTokens ?? {},
|
|
193
|
+
}, null, 2),
|
|
194
|
+
}],
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
/**
|
|
198
|
+
* Get all media files available for the site
|
|
199
|
+
*/
|
|
200
|
+
server.tool('getMedia', 'List all media files uploaded for this client site. Returns URLs, dimensions, and AI-generated alt text.', { pageSlug: z.string().optional().describe('Filter by page usage (optional)') }, async () => {
|
|
201
|
+
const siteId = getSiteId();
|
|
202
|
+
if (!siteId)
|
|
203
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
204
|
+
const media = await api(`/api/v1/sites/${siteId}/media`);
|
|
205
|
+
return {
|
|
206
|
+
content: [{
|
|
207
|
+
type: 'text',
|
|
208
|
+
text: JSON.stringify(media.map(m => ({
|
|
209
|
+
id: m.id,
|
|
210
|
+
filename: m.filename,
|
|
211
|
+
url: m.webpUrl ?? m.url, // prefer WebP
|
|
212
|
+
originalUrl: m.url,
|
|
213
|
+
alt: m.altText,
|
|
214
|
+
dimensions: m.width && m.height ? `${m.width}×${m.height}` : null,
|
|
215
|
+
type: m.mimeType,
|
|
216
|
+
})), null, 2),
|
|
217
|
+
}],
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
/**
|
|
221
|
+
* Get all pages and their slot structure
|
|
222
|
+
*/
|
|
223
|
+
server.tool('getPages', 'Get all pages for the site and their editable slots. Use this to understand the current site structure before adding new sections.', {}, async () => {
|
|
224
|
+
const siteId = getSiteId();
|
|
225
|
+
if (!siteId)
|
|
226
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
227
|
+
const pages = await api(`/api/v1/sites/${siteId}/pages`);
|
|
228
|
+
return {
|
|
229
|
+
content: [{
|
|
230
|
+
type: 'text',
|
|
231
|
+
text: JSON.stringify(pages, null, 2),
|
|
232
|
+
}],
|
|
233
|
+
};
|
|
234
|
+
});
|
|
235
|
+
/**
|
|
236
|
+
* Get slots for a specific page
|
|
237
|
+
*/
|
|
238
|
+
server.tool('getSlots', 'Get all editable slots for a specific page. Slots are the content areas the client can edit via AI chat.', {
|
|
239
|
+
pageId: z.string().describe('The page ID to get slots for'),
|
|
240
|
+
}, async ({ pageId }) => {
|
|
241
|
+
const siteId = getSiteId();
|
|
242
|
+
if (!siteId)
|
|
243
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
244
|
+
const slots = await api(`/api/v1/sites/${siteId}/slots?pageId=${pageId}`);
|
|
245
|
+
return {
|
|
246
|
+
content: [{
|
|
247
|
+
type: 'text',
|
|
248
|
+
text: JSON.stringify(slots, null, 2),
|
|
249
|
+
}],
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
/**
|
|
253
|
+
* Register a new editable slot — called when designer creates a new component
|
|
254
|
+
*/
|
|
255
|
+
server.tool('createSlot', 'Register a new editable slot in the CMS. Call this every time you create a section with content that the client should be able to edit via AI chat. Use a dot-notation key like "hero.title" or "about.description".', {
|
|
256
|
+
pageId: z.string().describe('The page this slot belongs to'),
|
|
257
|
+
key: z.string().describe('Unique slot key in dot notation, e.g. "hero.title", "services.cta.label"'),
|
|
258
|
+
label: z.string().describe('Human-readable label shown to client, e.g. "Título principal del hero"'),
|
|
259
|
+
type: z.enum(['text', 'richtext', 'image', 'video', 'link', 'color', 'boolean', 'number', 'json']),
|
|
260
|
+
value: z.unknown().optional().describe('Initial content value'),
|
|
261
|
+
aiHint: z.string().optional().describe('Hint for the AI about constraints, e.g. "Keep under 8 words, brand voice is professional"'),
|
|
262
|
+
required: z.boolean().optional(),
|
|
263
|
+
}, async ({ pageId, key, label, type, value, aiHint, required }) => {
|
|
264
|
+
const siteId = getSiteId();
|
|
265
|
+
if (!siteId)
|
|
266
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
267
|
+
const slot = await api(`/api/v1/sites/${siteId}/slots`, {
|
|
268
|
+
method: 'POST',
|
|
269
|
+
body: JSON.stringify({ pageId, key, label, type, value, aiHint, required }),
|
|
270
|
+
});
|
|
271
|
+
return {
|
|
272
|
+
content: [{
|
|
273
|
+
type: 'text',
|
|
274
|
+
text: `✅ Slot registered: ${key}\n\nThe client can now edit "${label}" via the AI chat.\n\n${JSON.stringify(slot, null, 2)}`,
|
|
275
|
+
}],
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
/**
|
|
279
|
+
* Update design tokens for the site
|
|
280
|
+
*/
|
|
281
|
+
server.tool('setDesignTokens', 'Update the design tokens for the site (colors, fonts, spacing). Call this when establishing or refining the brand identity.', {
|
|
282
|
+
primaryColor: z.string().optional().describe('Main brand color, hex format e.g. #007AFF'),
|
|
283
|
+
secondaryColor: z.string().optional(),
|
|
284
|
+
accentColor: z.string().optional(),
|
|
285
|
+
backgroundColor: z.string().optional(),
|
|
286
|
+
textColor: z.string().optional(),
|
|
287
|
+
fontFamily: z.string().optional().describe('Body font family, e.g. "Inter"'),
|
|
288
|
+
fontFamilyHeading: z.string().optional().describe('Heading font family, e.g. "Playfair Display"'),
|
|
289
|
+
borderRadius: z.string().optional().describe('Global border radius, e.g. "8px" or "0px" for sharp'),
|
|
290
|
+
}, async (tokens) => {
|
|
291
|
+
const siteId = getSiteId();
|
|
292
|
+
if (!siteId)
|
|
293
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
294
|
+
// Remove undefined values
|
|
295
|
+
const cleanTokens = Object.fromEntries(Object.entries(tokens).filter(([, v]) => v !== undefined));
|
|
296
|
+
await api(`/api/v1/sites/${siteId}`, {
|
|
297
|
+
method: 'PATCH',
|
|
298
|
+
body: JSON.stringify({ designTokens: cleanTokens }),
|
|
299
|
+
});
|
|
300
|
+
return {
|
|
301
|
+
content: [{
|
|
302
|
+
type: 'text',
|
|
303
|
+
text: `✅ Design tokens updated:\n${JSON.stringify(cleanTokens, null, 2)}`,
|
|
304
|
+
}],
|
|
305
|
+
};
|
|
306
|
+
});
|
|
307
|
+
/**
|
|
308
|
+
* Get site settings (business name, contact, social links)
|
|
309
|
+
*/
|
|
310
|
+
server.tool('getSiteSettings', 'Get the site business settings — name, contact info, social links. Use this to pre-fill content in components like headers, footers, and contact sections.', {}, async () => {
|
|
311
|
+
const siteId = getSiteId();
|
|
312
|
+
if (!siteId)
|
|
313
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
314
|
+
const settings = await api(`/api/v1/sites/${siteId}/settings`);
|
|
315
|
+
return {
|
|
316
|
+
content: [{
|
|
317
|
+
type: 'text',
|
|
318
|
+
text: JSON.stringify(settings, null, 2),
|
|
319
|
+
}],
|
|
320
|
+
};
|
|
321
|
+
});
|
|
322
|
+
/**
|
|
323
|
+
* Get active modules for the site
|
|
324
|
+
*/
|
|
325
|
+
server.tool('getActiveModules', 'Get the list of active modules for this site (blog, shop, bookings, etc.). Use this to know which sections and pages you can add to the site.', {}, async () => {
|
|
326
|
+
const siteId = getSiteId();
|
|
327
|
+
if (!siteId)
|
|
328
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
329
|
+
const site = await api(`/api/v1/sites/${siteId}`);
|
|
330
|
+
const modules = (site.activeModules ?? []).map((m) => m.module?.name || 'unknown');
|
|
331
|
+
return {
|
|
332
|
+
content: [{
|
|
333
|
+
type: 'text',
|
|
334
|
+
text: `Active modules for this site: ${modules.join(', ')}`,
|
|
335
|
+
}],
|
|
336
|
+
};
|
|
337
|
+
});
|
|
338
|
+
/**
|
|
339
|
+
* Get technical blueprints and capabilities for a specific module.
|
|
340
|
+
*/
|
|
341
|
+
server.tool('getModuleCapabilities', 'Get the technical requirements and blueprints for implementing a specific module in the UI. Call this when you need to build a UI section that interacts with a module (like a form or a blog list).', {
|
|
342
|
+
moduleName: z.enum(['blog', 'shop', 'submissions']).describe('The name of the module'),
|
|
343
|
+
}, async ({ moduleName }) => {
|
|
344
|
+
const capabilities = {
|
|
345
|
+
blog: {
|
|
346
|
+
type: 'content_list',
|
|
347
|
+
recommended_components: ['PostCard', 'CategoryFilter'],
|
|
348
|
+
data_structure: {
|
|
349
|
+
title: 'string',
|
|
350
|
+
excerpt: 'string',
|
|
351
|
+
image: 'url (featuredImage)',
|
|
352
|
+
slug: 'string (link to /blog/[slug])',
|
|
353
|
+
date: 'ISO string'
|
|
354
|
+
},
|
|
355
|
+
endpoint: '/api/v1/blog/:siteId/posts',
|
|
356
|
+
auth_required: true,
|
|
357
|
+
ai_instructions: 'Use fetch with Authorization: Bearer <AXOLOT_API_TOKEN>. Posts are returned as an array.'
|
|
358
|
+
},
|
|
359
|
+
shop: {
|
|
360
|
+
type: 'product_catalog',
|
|
361
|
+
recommended_components: ['ProductCard', 'PriceTag', 'CartButton'],
|
|
362
|
+
data_structure: {
|
|
363
|
+
name: 'string',
|
|
364
|
+
price: 'number (cents)',
|
|
365
|
+
image: 'url',
|
|
366
|
+
slug: 'string (link to /escapada/[slug])'
|
|
367
|
+
},
|
|
368
|
+
endpoint: '/api/v1/shop/:siteId/products',
|
|
369
|
+
auth_required: true,
|
|
370
|
+
ai_instructions: 'Use fetch with Authorization: Bearer <AXOLOT_API_TOKEN>. Products are returned as an array. Price is in cents.'
|
|
371
|
+
},
|
|
372
|
+
submissions: {
|
|
373
|
+
type: 'form_capture',
|
|
374
|
+
implementation_blueprint: {
|
|
375
|
+
tag: 'form',
|
|
376
|
+
required_attribute: 'data-form="unique-id"',
|
|
377
|
+
required_fields: [
|
|
378
|
+
{ name: 'nombre', type: 'text', label: 'Nombre Completo' },
|
|
379
|
+
{ name: 'email', type: 'email', label: 'Email' }
|
|
380
|
+
],
|
|
381
|
+
client_bridge: 'initAxolotForms(siteId)',
|
|
382
|
+
feedback_states: ['loading', 'success', 'error']
|
|
383
|
+
},
|
|
384
|
+
ai_instructions: 'Design custom forms freely using Tailwind. Just ensure the "data-form" attribute is present and inputs have the correct "name" attributes. The layout must include the Axolot Forms Bridge script.'
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
const spec = capabilities[moduleName];
|
|
388
|
+
if (!spec) {
|
|
389
|
+
return {
|
|
390
|
+
content: [{ type: 'text', text: `❌ Module capabilities not found for: ${moduleName}` }],
|
|
391
|
+
isError: true
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
return {
|
|
395
|
+
content: [{
|
|
396
|
+
type: 'text',
|
|
397
|
+
text: `Technical Blueprint for ${moduleName.toUpperCase()} module:\n\n${JSON.stringify(spec, null, 2)}`
|
|
398
|
+
}]
|
|
399
|
+
};
|
|
400
|
+
});
|
|
401
|
+
/**
|
|
402
|
+
* Get all blog posts
|
|
403
|
+
*/
|
|
404
|
+
server.tool('getBlogPosts', 'List all blog posts for the site. Use this to build blog index pages or latest post widgets.', {
|
|
405
|
+
status: z.enum(['draft', 'published', 'archived']).optional().describe('Filter by status'),
|
|
406
|
+
}, async ({ status }) => {
|
|
407
|
+
const siteId = getSiteId();
|
|
408
|
+
if (!siteId)
|
|
409
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
410
|
+
const site = await api(`/api/v1/sites/${siteId}`);
|
|
411
|
+
const isBlogActive = (site.activeModules ?? []).some(m => m.module.name === 'blog');
|
|
412
|
+
if (!isBlogActive) {
|
|
413
|
+
return {
|
|
414
|
+
content: [{
|
|
415
|
+
type: 'text',
|
|
416
|
+
text: '❌ ERROR: El módulo de "Blog" no está activo para este sitio.',
|
|
417
|
+
}],
|
|
418
|
+
isError: true,
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
const posts = await api(`/api/v1/blog/${siteId}/posts`);
|
|
422
|
+
const filteredPosts = status ? posts.filter(p => p.status === status) : posts;
|
|
423
|
+
return {
|
|
424
|
+
content: [{
|
|
425
|
+
type: 'text',
|
|
426
|
+
text: JSON.stringify(filteredPosts.map(p => ({
|
|
427
|
+
id: p.id,
|
|
428
|
+
title: p.title,
|
|
429
|
+
slug: p.slug,
|
|
430
|
+
status: p.status,
|
|
431
|
+
date: p.publishedAt || p.createdAt,
|
|
432
|
+
image: p.featuredImage
|
|
433
|
+
})), null, 2),
|
|
434
|
+
}],
|
|
435
|
+
};
|
|
436
|
+
});
|
|
437
|
+
/**
|
|
438
|
+
* Get a specific blog post
|
|
439
|
+
*/
|
|
440
|
+
server.tool('getBlogPost', 'Get the full content and details of a specific blog post.', {
|
|
441
|
+
postId: z.string().optional().describe('The post ID'),
|
|
442
|
+
slug: z.string().optional().describe('The post slug'),
|
|
443
|
+
}, async ({ postId, slug }) => {
|
|
444
|
+
const siteId = getSiteId();
|
|
445
|
+
if (!siteId)
|
|
446
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
447
|
+
const site = await api(`/api/v1/sites/${siteId}`);
|
|
448
|
+
const isBlogActive = (site.activeModules ?? []).some(m => m.module.name === 'blog');
|
|
449
|
+
if (!isBlogActive) {
|
|
450
|
+
return {
|
|
451
|
+
content: [{ type: 'text', text: '❌ ERROR: El módulo de "Blog" no está activo.' }],
|
|
452
|
+
isError: true,
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
const posts = await api(`/api/v1/blog/${siteId}/posts`);
|
|
456
|
+
const post = postId
|
|
457
|
+
? posts.find(p => p.id === postId)
|
|
458
|
+
: posts.find(p => p.slug === slug);
|
|
459
|
+
if (!post) {
|
|
460
|
+
return { content: [{ type: 'text', text: `❌ Post not found` }], isError: true };
|
|
461
|
+
}
|
|
462
|
+
return { content: [{ type: 'text', text: JSON.stringify(post, null, 2) }] };
|
|
463
|
+
});
|
|
464
|
+
/**
|
|
465
|
+
* Create a new blog post
|
|
466
|
+
*/
|
|
467
|
+
server.tool('createBlogPost', 'Create a new blog post in the CMS.', {
|
|
468
|
+
title: z.string().describe('The post title'),
|
|
469
|
+
slug: z.string().describe('The post slug'),
|
|
470
|
+
excerpt: z.string().optional().describe('A short summary of the post'),
|
|
471
|
+
content: z.string().describe('The full content (HTML or Markdown)'),
|
|
472
|
+
featuredImage: z.string().optional().describe('URL of the featured image'),
|
|
473
|
+
status: z.enum(['draft', 'published', 'archived']).default('published'),
|
|
474
|
+
categoryId: z.string().optional().describe('UUID of the category'),
|
|
475
|
+
}, async (data) => {
|
|
476
|
+
const siteId = getSiteId();
|
|
477
|
+
if (!siteId)
|
|
478
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
479
|
+
const post = await api(`/api/v1/blog/${siteId}/posts`, {
|
|
480
|
+
method: 'POST',
|
|
481
|
+
body: JSON.stringify(data),
|
|
482
|
+
});
|
|
483
|
+
return {
|
|
484
|
+
content: [{
|
|
485
|
+
type: 'text',
|
|
486
|
+
text: `✅ Blog post created: ${data.title}\nURL: /blog/${data.slug}`,
|
|
487
|
+
}],
|
|
488
|
+
};
|
|
489
|
+
});
|
|
490
|
+
/**
|
|
491
|
+
* Update an existing blog post
|
|
492
|
+
*/
|
|
493
|
+
server.tool('updateBlogPost', 'Update an existing blog post.', {
|
|
494
|
+
postId: z.string().describe('The UUID of the post to update'),
|
|
495
|
+
title: z.string().optional(),
|
|
496
|
+
slug: z.string().optional(),
|
|
497
|
+
excerpt: z.string().optional(),
|
|
498
|
+
content: z.string().optional(),
|
|
499
|
+
featuredImage: z.string().optional(),
|
|
500
|
+
status: z.enum(['draft', 'published', 'archived']).optional(),
|
|
501
|
+
categoryId: z.string().optional(),
|
|
502
|
+
}, async ({ postId, ...data }) => {
|
|
503
|
+
const siteId = getSiteId();
|
|
504
|
+
if (!siteId)
|
|
505
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
506
|
+
await api(`/api/v1/blog/${siteId}/posts/${postId}`, {
|
|
507
|
+
method: 'PATCH',
|
|
508
|
+
body: JSON.stringify(data),
|
|
509
|
+
});
|
|
510
|
+
return {
|
|
511
|
+
content: [{ type: 'text', text: `✅ Blog post updated (ID: ${postId})` }],
|
|
512
|
+
};
|
|
513
|
+
});
|
|
514
|
+
/**
|
|
515
|
+
* Get all shop products
|
|
516
|
+
*/
|
|
517
|
+
server.tool('getProducts', 'List all products (escapadas) for the site.', { status: z.enum(['draft', 'published', 'archived']).optional() }, async ({ status }) => {
|
|
518
|
+
const siteId = getSiteId();
|
|
519
|
+
if (!siteId)
|
|
520
|
+
throw new Error('No active site.');
|
|
521
|
+
const products = await api(`/api/v1/shop/${siteId}/products`);
|
|
522
|
+
const filtered = status ? products.filter(p => p.status === status) : products;
|
|
523
|
+
return { content: [{ type: 'text', text: JSON.stringify(filtered, null, 2) }] };
|
|
524
|
+
});
|
|
525
|
+
/**
|
|
526
|
+
* Get a specific product
|
|
527
|
+
*/
|
|
528
|
+
server.tool('getProduct', 'Get details of a specific product by its slug.', { slug: z.string() }, async ({ slug }) => {
|
|
529
|
+
const siteId = getSiteId();
|
|
530
|
+
if (!siteId)
|
|
531
|
+
throw new Error('No active site.');
|
|
532
|
+
const product = await api(`/api/v1/shop/${siteId}/products/slug/${slug}`);
|
|
533
|
+
return { content: [{ type: 'text', text: JSON.stringify(product, null, 2) }] };
|
|
534
|
+
});
|
|
535
|
+
/**
|
|
536
|
+
* Create a new product
|
|
537
|
+
*/
|
|
538
|
+
server.tool('createProduct', 'Create a new product in the shop.', {
|
|
539
|
+
name: z.string(),
|
|
540
|
+
slug: z.string(),
|
|
541
|
+
description: z.string(),
|
|
542
|
+
shortDescription: z.string(),
|
|
543
|
+
price: z.number(),
|
|
544
|
+
featuredImage: z.string().optional(),
|
|
545
|
+
status: z.enum(['draft', 'published']).default('published'),
|
|
546
|
+
}, async (data) => {
|
|
547
|
+
const siteId = getSiteId();
|
|
548
|
+
if (!siteId)
|
|
549
|
+
throw new Error('No active site.');
|
|
550
|
+
const product = await api(`/api/v1/shop/${siteId}/products`, {
|
|
551
|
+
method: 'POST',
|
|
552
|
+
body: JSON.stringify(data),
|
|
553
|
+
});
|
|
554
|
+
return { content: [{ type: 'text', text: `✅ Product created: ${data.name}` }] };
|
|
555
|
+
});
|
|
556
|
+
/**
|
|
557
|
+
* Create a new page
|
|
558
|
+
*/
|
|
559
|
+
server.tool('createPage', 'Create a new page in the CMS. IMPORTANT: The slug MUST start with a slash (e.g. /my-page or /).', {
|
|
560
|
+
title: z.string(),
|
|
561
|
+
slug: z.string(),
|
|
562
|
+
metaTitle: z.string().optional(),
|
|
563
|
+
metaDescription: z.string().optional(),
|
|
564
|
+
}, async (data) => {
|
|
565
|
+
const siteId = getSiteId();
|
|
566
|
+
if (!siteId)
|
|
567
|
+
throw new Error('No active site.');
|
|
568
|
+
const page = await api(`/api/v1/sites/${siteId}/pages`, {
|
|
569
|
+
method: 'POST',
|
|
570
|
+
body: JSON.stringify(data),
|
|
571
|
+
});
|
|
572
|
+
return { content: [{ type: 'text', text: `✅ Page created: ${data.title}` }] };
|
|
573
|
+
});
|
|
574
|
+
// ── RESOURCES ─────────────────────────────────────────────────────────────────
|
|
575
|
+
server.resource('site-context', 'axolot://site/context', async () => {
|
|
576
|
+
const siteId = getSiteId();
|
|
577
|
+
if (!siteId)
|
|
578
|
+
throw new Error('No active site. Use cms_switch_site to select one.');
|
|
579
|
+
const [site, settings] = await Promise.all([
|
|
580
|
+
api(`/api/v1/sites/${siteId}`),
|
|
581
|
+
api(`/api/v1/sites/${siteId}/settings`),
|
|
582
|
+
]);
|
|
583
|
+
return {
|
|
584
|
+
contents: [{
|
|
585
|
+
uri: 'axolot://site/context',
|
|
586
|
+
mimeType: 'text/plain',
|
|
587
|
+
text: `
|
|
588
|
+
# Site Context: ${site.name}
|
|
589
|
+
|
|
590
|
+
## Domain
|
|
591
|
+
${site.domain ?? 'Not set'}
|
|
592
|
+
|
|
593
|
+
## Business
|
|
594
|
+
Name: ${settings.businessName ?? site.name}
|
|
595
|
+
Email: ${settings.businessEmail ?? 'Not set'}
|
|
596
|
+
|
|
597
|
+
## Design Tokens
|
|
598
|
+
${JSON.stringify(site.designTokens ?? {}, null, 2)}
|
|
599
|
+
|
|
600
|
+
## Active Modules
|
|
601
|
+
${JSON.stringify(site.activeModules ?? [], null, 2)}
|
|
602
|
+
|
|
603
|
+
---
|
|
604
|
+
Use the tools (getMedia, getSlots, createSlot, etc.) to interact with this site's content.
|
|
605
|
+
`.trim(),
|
|
606
|
+
}],
|
|
607
|
+
};
|
|
608
|
+
});
|
|
609
|
+
// ── Start ─────────────────────────────────────────────────────────────────────
|
|
610
|
+
const transport = new StdioServerTransport();
|
|
611
|
+
await server.connect(transport);
|
|
612
|
+
console.error('AxolotCMS MCP server running — site:', getSiteId() || '(no site set)');
|
|
613
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,gFAAgF;AAEhF,4DAA4D;AAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AACtD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACzC,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;IAC1B,aAAa;IACb,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;IAC9B,OAAO,CAAC,KAAK,CAAC,2BAA2B,SAAS,EAAE,CAAC,CAAA;AACvD,CAAC;AAED,yDAAyD;AACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAA;AAC5C,IAAI,UAAU,CAAC,Q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AAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;;;;CAIlD,CAAC,IAAI,EAAE;aACD,CAAC;KACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,iFAAiF;AAEjF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAA;AAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AAC/B,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,SAAS,EAAE,IAAI,eAAe,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axolot-ai/mcp-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/AxolotDevelopment/Axolot-MCP.git"
|
|
7
|
+
},
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/AxolotDevelopment/Axolot-MCP/issues"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/AxolotDevelopment/Axolot-MCP#readme",
|
|
4
12
|
"type": "module",
|
|
5
13
|
"description": "MCP server exposing AxolotCMS tools to AI designers",
|
|
6
14
|
"bin": {
|