@impetik/xeer-mcp 0.2.1 → 0.2.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/README.md +13 -10
- package/dist/server.js +34 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@impetik/xeer-mcp`
|
|
2
2
|
|
|
3
|
-
Model Context Protocol server for [Xeer](https://
|
|
4
|
-
scaffold → check →
|
|
5
|
-
`xeer.command.v0` JSON envelope the `xeer` CLI already prints.
|
|
3
|
+
Model Context Protocol server for [Xeer](https://docs.xeer.run), the framework for building and shipping
|
|
4
|
+
full-stack apps. It exposes the scaffold → check → test → build → deploy loop as MCP tools, each
|
|
5
|
+
returning the `xeer.command.v0` JSON envelope the `xeer` CLI already prints.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[
|
|
10
|
-
|
|
7
|
+
📖 **Documentation: [docs.xeer.run](https://docs.xeer.run)** · **Building with AI agents:
|
|
8
|
+
[docs.xeer.run/guides/agents](https://docs.xeer.run/guides/agents)** · **Diagnostics:
|
|
9
|
+
[docs.xeer.run/reference/diagnostics](https://docs.xeer.run/reference/diagnostics)**
|
|
10
|
+
|
|
11
|
+
The [repository](https://github.com/impetik/xeer) also ships the same protocol as a Claude Code skill
|
|
12
|
+
under `.claude/skills/xeer/`, which you can copy into your own project.
|
|
11
13
|
|
|
12
14
|
## Run it
|
|
13
15
|
|
|
@@ -37,9 +39,10 @@ node packages/mcp/dist/main.js # stdio; or `pnpm mcp` from the workspace root
|
|
|
37
39
|
| `xeer_check` | `xeer check <dir> --json` | Manifest + analysis diagnostics; `result.manifest` when clean |
|
|
38
40
|
| `xeer_test` | `xeer test <dir> --json` | `{ ok, total, passed, failed, cases, diagnostics, events }` |
|
|
39
41
|
| `xeer_build` | `xeer build <dir> --json` | `result.artifactId`, modules, assets, operations |
|
|
40
|
-
| `xeer_new` | `xeer new <dir> --json` | `result.files` |
|
|
42
|
+
| `xeer_new` | `xeer new <dir> [--template <name>] --json` | `result.template`, `result.files` |
|
|
41
43
|
| `xeer_doctor` | `xeer doctor <dir> --json` | `result.checks`, `result.summary` |
|
|
42
|
-
| `xeer_deploy` | `xeer deploy <dir> --json` | `result.url` |
|
|
44
|
+
| `xeer_deploy` | `xeer deploy <dir> --json` | `result.url` (`environment: "preview"` deploys to the side-by-side preview URL) |
|
|
45
|
+
| `xeer_promote` | `xeer promote <dir> --json` | `result.artifactId`, `result.replaced`, `result.url` |
|
|
43
46
|
| `xeer_auth_status` | `xeer auth status --json` | Builder identity and credential expiry |
|
|
44
47
|
| `xeer_inspect` | `xeer inspect`/`state`/`logs` | Inspector response for a running preview |
|
|
45
48
|
| `xeer_dev_start` | `xeer dev <dir> --json --port 0` | Session handle, cursor, and the events up to `preview.ready` |
|
package/dist/server.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { DEFAULT_TEMPLATE, TEMPLATES } from '@impetik/xeer';
|
|
4
5
|
import { DIAGNOSTICS, DIAGNOSTIC_CODES, DIAGNOSTIC_FAMILIES, diagnosticDefinition, renderDiagnosticsReference, } from '@impetik/xeer-spec/diagnostics';
|
|
5
6
|
import { DevSessionRegistry } from './dev-session.js';
|
|
6
7
|
import { runXeerTests } from './test-run.js';
|
|
@@ -168,14 +169,21 @@ export function createXeerMcpServer() {
|
|
|
168
169
|
server.registerTool('xeer_new', {
|
|
169
170
|
title: 'Scaffold a Xeer project',
|
|
170
171
|
description: 'Create a new Xeer project in an empty or non-existent directory. '
|
|
171
|
-
+ '
|
|
172
|
-
+ 'a manifest by hand.
|
|
172
|
+
+ 'Every template checks, tests, and builds clean, so use one as the starting point rather '
|
|
173
|
+
+ 'than writing a manifest by hand. "notes" (the default) and "todo" are per-user apps, "blog" '
|
|
174
|
+
+ 'is public to read and private to write, and "personal-site" has no database at all. None of '
|
|
175
|
+
+ 'them scaffolds sign-in UI. result is { directory, name, template, files }; an unknown '
|
|
176
|
+
+ 'template is XE3002 and writes nothing.',
|
|
173
177
|
inputSchema: {
|
|
174
178
|
directory: z.string().describe('Target directory, relative to the server root. Must be empty or absent.'),
|
|
179
|
+
// The names come from the CLI itself, so this schema cannot advertise a template the
|
|
180
|
+
// installed CLI does not have — or omit one it does.
|
|
181
|
+
template: z.enum(TEMPLATES).optional()
|
|
182
|
+
.describe(`Which scaffold to write. Defaults to ${DEFAULT_TEMPLATE}.`),
|
|
175
183
|
},
|
|
176
184
|
outputSchema: envelopeOutput,
|
|
177
185
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
178
|
-
}, async ({ directory }) => withDirectory(directory, (resolved) => commandTool(['new', resolved], projectRoot())));
|
|
186
|
+
}, async ({ directory, template }) => withDirectory(directory, (resolved) => commandTool(['new', resolved, ...(template === undefined ? [] : ['--template', template])], projectRoot())));
|
|
179
187
|
server.registerTool('xeer_doctor', {
|
|
180
188
|
title: 'Diagnose the Xeer toolchain',
|
|
181
189
|
description: 'Check the local toolchain and generated-file state. Use it when a command fails for '
|
|
@@ -189,14 +197,35 @@ export function createXeerMcpServer() {
|
|
|
189
197
|
title: 'Deploy a Xeer project',
|
|
190
198
|
description: 'Build, verify, and upload the artifact to the control plane. Requires a builder '
|
|
191
199
|
+ 'credential: XE5002 means a human must run `xeer auth login` first. result is '
|
|
192
|
-
+ '{ application, url, ... }.'
|
|
200
|
+
+ '{ application, url, ... }. Defaults to production; pass environment "preview" to deploy to the '
|
|
201
|
+
+ 'app\'s side-by-side preview URL instead, which is what to iterate against — production keeps '
|
|
202
|
+
+ 'serving, and preview has its own disposable state. Make a preview live with xeer_promote.',
|
|
193
203
|
inputSchema: {
|
|
194
204
|
directory: directoryArgument,
|
|
205
|
+
environment: z.enum(['production', 'preview']).optional()
|
|
206
|
+
.describe('Deployment target. Omit for production; "preview" leaves production untouched.'),
|
|
195
207
|
controlUrl: z.string().optional().describe('Control-plane origin override, e.g. https://control.example.com.'),
|
|
196
208
|
},
|
|
197
209
|
outputSchema: envelopeOutput,
|
|
198
210
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
199
|
-
}, async ({ directory, controlUrl }) => withDirectory(directory, (resolved) => commandTool(['deploy', resolved, ...(
|
|
211
|
+
}, async ({ directory, environment, controlUrl }) => withDirectory(directory, (resolved) => commandTool(['deploy', resolved, ...(environment ? ['--environment', environment] : []),
|
|
212
|
+
...(controlUrl ? ['--control-url', controlUrl] : [])], resolved)));
|
|
213
|
+
server.registerTool('xeer_promote', {
|
|
214
|
+
title: 'Promote a Xeer preview to production',
|
|
215
|
+
description: 'Make the version currently on the app\'s preview URL live on production — the same '
|
|
216
|
+
+ 'bundle, not a rebuild, with production\'s own environment values. The second half of the '
|
|
217
|
+
+ '"deploy to preview, look at it, then ship it" loop. XE5175 means nothing has been deployed to '
|
|
218
|
+
+ 'preview yet. result is { artifactId, replaced, url, ... }.',
|
|
219
|
+
inputSchema: {
|
|
220
|
+
directory: directoryArgument,
|
|
221
|
+
fromArtifact: z.string().optional()
|
|
222
|
+
.describe('Promote this artifact id instead of whatever preview is serving, e.g. sha256:….'),
|
|
223
|
+
controlUrl: z.string().optional().describe('Control-plane origin override.'),
|
|
224
|
+
},
|
|
225
|
+
outputSchema: envelopeOutput,
|
|
226
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
227
|
+
}, async ({ directory, fromArtifact, controlUrl }) => withDirectory(directory, (resolved) => commandTool(['promote', resolved, ...(fromArtifact ? ['--from-artifact', fromArtifact] : []),
|
|
228
|
+
...(controlUrl ? ['--control-url', controlUrl] : [])], resolved)));
|
|
200
229
|
server.registerTool('xeer_auth_status', {
|
|
201
230
|
title: 'Report builder sign-in status',
|
|
202
231
|
description: 'Report whether a builder credential is available for deployment. Sign-in itself is '
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impetik/xeer-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Model Context Protocol server for Xeer: the scaffold, check, dev, build, and deploy loop as agent tools.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/impetik/xeer.git",
|
|
10
10
|
"directory": "packages/mcp"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://
|
|
12
|
+
"homepage": "https://xeer.run",
|
|
13
13
|
"bugs": "https://github.com/impetik/xeer/issues",
|
|
14
14
|
"keywords": [
|
|
15
15
|
"xeer",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
45
45
|
"zod": "^4.0.10",
|
|
46
|
-
"@impetik/xeer": "0.2.
|
|
47
|
-
"@impetik/xeer-spec": "0.2.
|
|
46
|
+
"@impetik/xeer": "0.2.3",
|
|
47
|
+
"@impetik/xeer-spec": "0.2.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^24.1.0"
|