@daileyos/mcp-server 1.0.1 → 1.1.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 (74) hide show
  1. package/.github/workflows/publish.yml +93 -0
  2. package/LICENSE +21 -0
  3. package/README.md +130 -0
  4. package/dist/index.js +28 -7
  5. package/dist/index.js.map +1 -1
  6. package/dist/tools/analyze.d.ts +3 -0
  7. package/dist/tools/analyze.d.ts.map +1 -0
  8. package/dist/tools/analyze.js +67 -0
  9. package/dist/tools/analyze.js.map +1 -0
  10. package/dist/tools/backups.d.ts +3 -0
  11. package/dist/tools/backups.d.ts.map +1 -0
  12. package/dist/tools/backups.js +55 -0
  13. package/dist/tools/backups.js.map +1 -0
  14. package/dist/tools/build-logs.d.ts +3 -0
  15. package/dist/tools/build-logs.d.ts.map +1 -0
  16. package/dist/tools/build-logs.js +39 -0
  17. package/dist/tools/build-logs.js.map +1 -0
  18. package/dist/tools/credentials-reveal.d.ts +3 -0
  19. package/dist/tools/credentials-reveal.d.ts.map +1 -0
  20. package/dist/tools/credentials-reveal.js +19 -0
  21. package/dist/tools/credentials-reveal.js.map +1 -0
  22. package/dist/tools/db.d.ts.map +1 -1
  23. package/dist/tools/db.js +92 -0
  24. package/dist/tools/db.js.map +1 -1
  25. package/dist/tools/deploy-status.d.ts +3 -0
  26. package/dist/tools/deploy-status.d.ts.map +1 -0
  27. package/dist/tools/deploy-status.js +109 -0
  28. package/dist/tools/deploy-status.js.map +1 -0
  29. package/dist/tools/domains.d.ts.map +1 -1
  30. package/dist/tools/domains.js +81 -17
  31. package/dist/tools/domains.js.map +1 -1
  32. package/dist/tools/images.d.ts.map +1 -1
  33. package/dist/tools/images.js +5 -2
  34. package/dist/tools/images.js.map +1 -1
  35. package/dist/tools/lifecycle.d.ts +3 -0
  36. package/dist/tools/lifecycle.d.ts.map +1 -0
  37. package/dist/tools/lifecycle.js +53 -0
  38. package/dist/tools/lifecycle.js.map +1 -0
  39. package/dist/tools/links.d.ts +3 -0
  40. package/dist/tools/links.d.ts.map +1 -0
  41. package/dist/tools/links.js +55 -0
  42. package/dist/tools/links.js.map +1 -0
  43. package/dist/tools/processes.d.ts +3 -0
  44. package/dist/tools/processes.d.ts.map +1 -0
  45. package/dist/tools/processes.js +98 -0
  46. package/dist/tools/processes.js.map +1 -0
  47. package/dist/tools/projects.d.ts.map +1 -1
  48. package/dist/tools/projects.js +13 -0
  49. package/dist/tools/projects.js.map +1 -1
  50. package/dist/tools/resource-config.d.ts +3 -0
  51. package/dist/tools/resource-config.d.ts.map +1 -0
  52. package/dist/tools/resource-config.js +56 -0
  53. package/dist/tools/resource-config.js.map +1 -0
  54. package/dist/tools/scale.d.ts.map +1 -1
  55. package/dist/tools/scale.js +9 -2
  56. package/dist/tools/scale.js.map +1 -1
  57. package/package.json +1 -1
  58. package/src/index.ts +32 -7
  59. package/src/tools/analyze.ts +98 -0
  60. package/src/tools/backups.ts +84 -0
  61. package/src/tools/build-logs.ts +65 -0
  62. package/src/tools/credentials-reveal.ts +31 -0
  63. package/src/tools/db.ts +104 -0
  64. package/src/tools/deploy-status.ts +149 -0
  65. package/src/tools/domains.ts +116 -21
  66. package/src/tools/images.ts +5 -2
  67. package/src/tools/lifecycle.ts +75 -0
  68. package/src/tools/links.ts +69 -0
  69. package/src/tools/processes.ts +172 -0
  70. package/src/tools/projects.ts +14 -0
  71. package/src/tools/resource-config.ts +84 -0
  72. package/src/tools/scale.ts +17 -3
  73. package/tests/mcp-protocol-smoke.mjs +149 -0
  74. package/tests/new-tools-smoke.mjs +211 -0
@@ -0,0 +1,93 @@
1
+ name: Build and publish
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ['v*']
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: '20'
19
+ registry-url: 'https://registry.npmjs.org'
20
+ - run: npm ci
21
+ - run: npm run build
22
+ - name: Smoke-test MCP server
23
+ run: |
24
+ # Launch the server with fake creds and check it responds to
25
+ # `initialize` + `tools/list`. The server refuses to start if
26
+ # neither DAILEY_API_TOKEN nor DAILEY_EMAIL is set, so we pass
27
+ # a throwaway email+password. We never hit the Dailey OS API
28
+ # during this probe — tools/list is pure schema.
29
+ node -e '
30
+ const { spawn } = require("child_process");
31
+ const proc = spawn("node", ["dist/index.js"], {
32
+ env: { ...process.env, DAILEY_EMAIL: "ci@test.invalid", DAILEY_PASSWORD: "ci" },
33
+ stdio: ["pipe", "pipe", "pipe"],
34
+ });
35
+ let buf = ""; const got = [];
36
+ proc.stdout.on("data", c => {
37
+ buf += c.toString();
38
+ let i;
39
+ while ((i = buf.indexOf("\n")) !== -1) {
40
+ const line = buf.slice(0, i).trim(); buf = buf.slice(i + 1);
41
+ if (line) try { got.push(JSON.parse(line)); } catch {}
42
+ }
43
+ });
44
+ const send = (m) => proc.stdin.write(JSON.stringify(m) + "\n");
45
+ send({ jsonrpc: "2.0", id: 1, method: "initialize", params: {
46
+ protocolVersion: "2024-11-05", capabilities: {},
47
+ clientInfo: { name: "ci", version: "0.1" },
48
+ }});
49
+ setTimeout(() => {
50
+ send({ jsonrpc: "2.0", method: "notifications/initialized" });
51
+ send({ jsonrpc: "2.0", id: 2, method: "tools/list", params: {} });
52
+ }, 500);
53
+ setTimeout(() => {
54
+ proc.kill("SIGTERM");
55
+ const init = got.find(m => m.id === 1);
56
+ const tools = got.find(m => m.id === 2);
57
+ if (!init || init.error) { console.error("initialize failed:", init); process.exit(1); }
58
+ if (!tools || !tools.result?.tools) { console.error("tools/list failed:", tools); process.exit(1); }
59
+ const n = tools.result.tools.length;
60
+ console.log(`✓ initialize handshake ok`);
61
+ console.log(`✓ tools/list returned ${n} tools`);
62
+ if (n < 25) { console.error(`expected at least 25 tools, got ${n}`); process.exit(1); }
63
+ process.exit(0);
64
+ }, 2500);
65
+ '
66
+
67
+ publish:
68
+ needs: build
69
+ if: startsWith(github.ref, 'refs/tags/v')
70
+ runs-on: ubuntu-latest
71
+ permissions:
72
+ contents: read
73
+ id-token: write
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - uses: actions/setup-node@v4
77
+ with:
78
+ node-version: '20'
79
+ registry-url: 'https://registry.npmjs.org'
80
+ - run: npm ci
81
+ - run: npm run build
82
+ - name: Verify tag matches package.json version
83
+ run: |
84
+ TAG_VERSION="${GITHUB_REF#refs/tags/v}"
85
+ PKG_VERSION=$(node -p "require('./package.json').version")
86
+ if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
87
+ echo "Tag v$TAG_VERSION does not match package.json version $PKG_VERSION" >&2
88
+ exit 1
89
+ fi
90
+ echo "Publishing v$PKG_VERSION"
91
+ - run: npm publish --access public
92
+ env:
93
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dailey LLC
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 ADDED
@@ -0,0 +1,130 @@
1
+ # @daileyos/mcp-server
2
+
3
+ Official [Model Context Protocol](https://modelcontextprotocol.io) server for [Dailey OS](https://os.dailey.cloud).
4
+
5
+ Connect any MCP-compliant AI coding agent — Claude Code, OpenCode, Cursor, Windsurf, Continue, Cline, Zed — to your Dailey OS account so it can deploy projects, query logs, run SQL against your databases, inspect storage, manage env vars, and more. The server speaks standard MCP over stdio, so any client that supports launching a local MCP server can use it.
6
+
7
+ ## Install
8
+
9
+ The server is published to npm as [`@daileyos/mcp-server`](https://www.npmjs.com/package/@daileyos/mcp-server). You don't need to install it manually — your MCP client will `npx` it on demand the first time you use it.
10
+
11
+ ### Quick start — Claude Code
12
+
13
+ Add to `~/.claude/settings.json` (or project settings):
14
+
15
+ ```json
16
+ {
17
+ "mcpServers": {
18
+ "dailey-os": {
19
+ "command": "npx",
20
+ "args": ["-y", "@daileyos/mcp-server"],
21
+ "env": {
22
+ "DAILEY_EMAIL": "you@example.com",
23
+ "DAILEY_PASSWORD": "your-password"
24
+ }
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ ### Quick start — OpenCode (free)
31
+
32
+ Add to `~/.config/opencode/opencode.json`:
33
+
34
+ ```json
35
+ {
36
+ "mcp": {
37
+ "dailey-os": {
38
+ "type": "local",
39
+ "command": ["npx", "-y", "@daileyos/mcp-server"],
40
+ "enabled": true,
41
+ "environment": {
42
+ "DAILEY_EMAIL": "you@example.com",
43
+ "DAILEY_PASSWORD": "your-password"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ OpenCode namespaces MCP tools with the server id, so tools are exposed as `dailey-os_dailey_whoami`, `dailey-os_dailey_list_projects`, etc.
51
+
52
+ **Full setup guide, model recommendations, and performance tuning:** https://docs.dailey.cloud/docs/mcp
53
+
54
+ ## Authentication
55
+
56
+ Two modes, in priority order:
57
+
58
+ - **`DAILEY_API_TOKEN`** (preferred) — long-lived token, rotatable from the Dailey OS dashboard, can't leak your account password
59
+ - **`DAILEY_EMAIL` + `DAILEY_PASSWORD`** — falls back to logging in on startup
60
+
61
+ Set either via the `env` / `environment` block of your client's MCP config. If both are present, the token is used.
62
+
63
+ ## Available tools
64
+
65
+ 30 tools across 7 categories: projects & deployment, Docker images & marketplace, database, storage, env & domains, billing & usage, and platform info. See the [full list in the docs](https://docs.dailey.cloud/docs/mcp#available-tools).
66
+
67
+ Highlights:
68
+ - `dailey_list_projects` — list all your projects
69
+ - `dailey_app_logs` — tail pod logs
70
+ - `dailey_db_recall` — **read-only** SQL queries against your project database (INSERT/UPDATE/DELETE are blocked at the server)
71
+ - `dailey_project_credentials` — reveal auto-generated DB passwords, JWT secrets, etc.
72
+ - `dailey_deploy_multi` — trigger a multi-process deploy
73
+ - `dailey_run_image` — deploy any Docker Hub image as a new project
74
+
75
+ ## Development
76
+
77
+ ```bash
78
+ git clone git@github.com:jonndailey/dailey-mcp.git
79
+ cd dailey-mcp
80
+ npm install
81
+ npm run build
82
+
83
+ # Test locally against your Dailey OS account
84
+ export DAILEY_EMAIL=you@example.com
85
+ export DAILEY_PASSWORD=...
86
+ node dist/index.js
87
+ ```
88
+
89
+ The server talks MCP over stdio — stdin/stdout. To test it directly without going through an MCP client, send JSON-RPC messages like:
90
+
91
+ ```json
92
+ {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}
93
+ {"jsonrpc":"2.0","method":"notifications/initialized"}
94
+ {"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
95
+ ```
96
+
97
+ ### Project layout
98
+
99
+ ```
100
+ src/
101
+ ├── index.ts # stdio entry point + tool registration
102
+ ├── api.ts # REST client with token refresh
103
+ └── tools/
104
+ ├── auth.ts # dailey_whoami
105
+ ├── projects.ts # list, info, create, delete, services, resources, credentials
106
+ ├── deploy.ts # deploy_multi, deploy_history, rollback, app_logs
107
+ ├── scale.ts # scale replicas
108
+ ├── env.ts # env_vars list/set/delete
109
+ ├── domains.ts # domains list/add/remove
110
+ ├── db.ts # db_info, db_schema, db_recall, db_migrations
111
+ ├── storage.ts # storage_info, list_objects, presign_upload/download
112
+ ├── images.ts # run_image, inspect_image, marketplace_catalog
113
+ ├── platform.ts # platform_info
114
+ ├── billing.ts # billing, billing_estimate
115
+ └── usage.ts # resource usage
116
+ ```
117
+
118
+ ## Versioning
119
+
120
+ This git history begins at `1.0.2`. Versions `1.0.0` and `1.0.1` were published to npm from a pre-git working directory; their source corresponds to the state of the package.json metadata on npm but isn't tagged in this repo.
121
+
122
+ From `1.0.2` onward, every release is tagged and publishes via GitHub Actions on push of a `v*` tag.
123
+
124
+ ## Contributing
125
+
126
+ Bug reports, PRs, and new tool suggestions welcome. File an issue before starting a large change so we can discuss the tool's scope and schema.
127
+
128
+ ## License
129
+
130
+ MIT — see [LICENSE](LICENSE).
package/dist/index.js CHANGED
@@ -4,6 +4,8 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
4
4
  import { registerAuthTools } from './tools/auth.js';
5
5
  import { registerProjectTools } from './tools/projects.js';
6
6
  import { registerDeployTools } from './tools/deploy.js';
7
+ import { registerDeployStatusTools } from './tools/deploy-status.js';
8
+ import { registerBuildLogsTools } from './tools/build-logs.js';
7
9
  import { registerScaleTools } from './tools/scale.js';
8
10
  import { registerEnvTools } from './tools/env.js';
9
11
  import { registerDomainTools } from './tools/domains.js';
@@ -13,24 +15,43 @@ import { registerBillingTools } from './tools/billing.js';
13
15
  import { registerPlatformTools } from './tools/platform.js';
14
16
  import { registerStorageTools } from './tools/storage.js';
15
17
  import { registerImageTools } from './tools/images.js';
18
+ import { registerProcessTools } from './tools/processes.js';
19
+ import { registerLifecycleTools } from './tools/lifecycle.js';
20
+ import { registerBackupTools } from './tools/backups.js';
21
+ import { registerResourceConfigTools } from './tools/resource-config.js';
22
+ import { registerLinkTools } from './tools/links.js';
23
+ import { registerCredentialRevealTools } from './tools/credentials-reveal.js';
24
+ import { registerAnalyzeTools } from './tools/analyze.js';
16
25
  const server = new McpServer({
17
26
  name: 'dailey-os',
18
- version: '1.0.0',
27
+ version: '1.1.0',
19
28
  });
20
- // Register all tools
29
+ // Core + identity
21
30
  registerAuthTools(server);
31
+ registerPlatformTools(server);
32
+ registerUsageTools(server);
33
+ registerBillingTools(server);
34
+ // Projects + deploys
22
35
  registerProjectTools(server);
36
+ registerAnalyzeTools(server);
23
37
  registerDeployTools(server);
38
+ registerDeployStatusTools(server);
39
+ registerBuildLogsTools(server);
40
+ registerImageTools(server);
41
+ // Lifecycle + scaling
24
42
  registerScaleTools(server);
43
+ registerLifecycleTools(server);
44
+ registerResourceConfigTools(server);
45
+ registerProcessTools(server);
46
+ // Config
25
47
  registerEnvTools(server);
26
48
  registerDomainTools(server);
49
+ registerLinkTools(server);
50
+ registerCredentialRevealTools(server);
51
+ // Data
27
52
  registerDbTools(server);
28
- registerUsageTools(server);
29
- registerBillingTools(server);
30
- registerPlatformTools(server);
31
53
  registerStorageTools(server);
32
- registerImageTools(server);
33
- // Start stdio transport
54
+ registerBackupTools(server);
34
55
  const transport = new StdioServerTransport();
35
56
  await server.connect(transport);
36
57
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB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AAS,CAAC;IAC3B,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,kBAAkB;AAClB,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC1B,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC9B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3B,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAE7B,qBAAqB;AACrB,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC7B,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC7B,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC5B,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAClC,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC/B,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE3B,sBAAsB;AACtB,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC3B,sBAAsB,CAAC,MAAM,CAAC,CAAC;AAC/B,2BAA2B,CAAC,MAAM,CAAC,CAAC;AACpC,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAE7B,SAAS;AACT,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACzB,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC5B,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC1B,6BAA6B,CAAC,MAAM,CAAC,CAAC;AAEtC,OAAO;AACP,eAAe,CAAC,MAAM,CAAC,CAAC;AACxB,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC7B,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE5B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerAnalyzeTools(server: McpServer): void;
3
+ //# sourceMappingURL=analyze.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze.d.ts","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA6BpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,QAoErD"}
@@ -0,0 +1,67 @@
1
+ import { z } from 'zod';
2
+ import { apiRequest, formatError, textResult } from '../api.js';
3
+ export function registerAnalyzeTools(server) {
4
+ server.tool('dailey_analyze_repo', 'Analyze a Git repo or Docker image BEFORE creating a project — detects stack, Dockerfile, database needs, and multi-service manifest (dailey.yaml). Use this to preview what a deploy would do.', {
5
+ repo_url: z.string().describe('Git repo URL or Docker image (e.g., github.com/user/repo, wordpress:6-apache)'),
6
+ branch: z.string().optional().describe('Branch to analyze (default: main)'),
7
+ }, async ({ repo_url, branch }) => {
8
+ const res = await apiRequest('POST', '/projects/analyze', {
9
+ repo_url,
10
+ branch: branch || 'main',
11
+ });
12
+ if (!res.ok)
13
+ return textResult(formatError(res));
14
+ const d = res.data;
15
+ const lines = [`Analysis: ${repo_url}`, '─'.repeat(50)];
16
+ if (d._isDockerImage) {
17
+ lines.push(`Type: Docker image`);
18
+ lines.push(`Registry: ${d.image?.registry || 'Docker Hub'}`);
19
+ lines.push(`Size: ${d.image?.size_mb ?? '?'} MB`);
20
+ lines.push(`Port: ${d.image?.port ?? 3000}`);
21
+ lines.push(`DB needed: ${d.database?.needed ? 'yes' : 'no'}`);
22
+ if (d.image?.catalog_match)
23
+ lines.push(`Catalog: ✓ ${d.image.catalog_match}`);
24
+ if (d.image?.description)
25
+ lines.push(`Description: ${d.image.description}`);
26
+ }
27
+ else {
28
+ lines.push(`Type: Git repo`);
29
+ lines.push(`Branch: ${branch || 'main'}`);
30
+ if (d.stack?.name) {
31
+ lines.push(`Stack: ${d.stack.name}${d.stack.version ? ` ${d.stack.version}` : ''}`);
32
+ }
33
+ lines.push(`DB needed: ${d.database?.needed ? 'yes' : 'no'}`);
34
+ }
35
+ if (d.services_manifest?.entries?.length) {
36
+ lines.push('');
37
+ lines.push(`Multi-service manifest found (${d.services_manifest.entries.length} services):`);
38
+ for (const e of d.services_manifest.entries) {
39
+ lines.push(` • ${e.name} [${e.type}]${e.provider ? ` provider=${e.provider}` : ''}${e.dockerfile ? ` dockerfile=${e.dockerfile}` : ''}`);
40
+ }
41
+ lines.push('');
42
+ lines.push('Tip: this project will be deployed via dailey_deploy_multi.');
43
+ }
44
+ if (d.estimates) {
45
+ lines.push('');
46
+ lines.push(`Estimates: pull ~${d.estimates.pull_time_seconds}s, deploy ~${d.estimates.deploy_time_seconds}s`);
47
+ }
48
+ if (d.recommendations?.length) {
49
+ lines.push('');
50
+ lines.push('Recommendations:');
51
+ for (const r of d.recommendations)
52
+ lines.push(` • ${r}`);
53
+ }
54
+ if (d.issues?.length) {
55
+ lines.push('');
56
+ lines.push('❌ Blocking issues:');
57
+ for (const issue of d.issues)
58
+ lines.push(` ✗ ${issue}`);
59
+ }
60
+ else {
61
+ lines.push('');
62
+ lines.push('✓ Ready to deploy via dailey_create_project + dailey_deploy_multi, or dailey_run_image.');
63
+ }
64
+ return textResult(lines.join('\n'));
65
+ });
66
+ }
67
+ //# sourceMappingURL=analyze.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AA2BhE,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,iMAAiM,EACjM;QACE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;QAC9G,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAA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I,CAAC,6DAA6D,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,SAAS,CAAC,iBAAiB,cAAc,CAAC,CAAC,SAAS,CAAC,mBAAmB,GAAG,CAAC,CAAC;QACjH,CAAC;QAED,IAAI,CAAC,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAC/B,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe;gBAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;YACrB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;YACjC,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,yFAAyF,CAAC,CAAC;QACxG,CAAC;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerBackupTools(server: McpServer): void;
3
+ //# sourceMappingURL=backups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backups.d.ts","sourceRoot":"","sources":["../../src/tools/backups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiBpE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,QAkEpD"}
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ import { apiRequest, formatError, textResult } from '../api.js';
3
+ export function registerBackupTools(server) {
4
+ server.tool('dailey_backups', 'List, create, or restore backups for a project. Use before risky changes (schema migrations, major redeploys).', {
5
+ project_id: z.string().describe('The project ID'),
6
+ action: z.enum(['list', 'create', 'restore', 'download']).describe('list | create | restore | download'),
7
+ backup_key: z.string().optional().describe('Backup key (required for restore/download)'),
8
+ }, async ({ project_id, action, backup_key }) => {
9
+ if (action === 'list') {
10
+ const res = await apiRequest('GET', `/projects/${project_id}/backups`);
11
+ if (!res.ok)
12
+ return textResult(formatError(res));
13
+ const backups = res.data.backups || [];
14
+ if (backups.length === 0) {
15
+ const err = res.data.error ? `\n\nNote: ${res.data.error}` : '';
16
+ return textResult(`No backups found for this project.${err}`);
17
+ }
18
+ const lines = [
19
+ `Backups (${backups.length})`,
20
+ `${'Timestamp'.padEnd(24)} ${'Size'.padEnd(10)} Key`,
21
+ '─'.repeat(90),
22
+ ];
23
+ for (const b of backups) {
24
+ lines.push(`${(b.timestamp || '-').padEnd(24)} ${String((b.size_mb ?? 0) + ' MB').padEnd(10)} ${b.key}`);
25
+ }
26
+ lines.push('');
27
+ lines.push('Restore with: dailey_backups action=restore backup_key=<key>');
28
+ return textResult(lines.join('\n'));
29
+ }
30
+ if (action === 'create') {
31
+ const res = await apiRequest('POST', `/projects/${project_id}/backups`);
32
+ if (!res.ok)
33
+ return textResult(formatError(res));
34
+ return textResult(res.data.message || 'Backup triggered.');
35
+ }
36
+ if (action === 'restore') {
37
+ if (!backup_key)
38
+ return textResult('Error: backup_key is required for restore.');
39
+ const res = await apiRequest('POST', `/projects/${project_id}/backups/restore`, { backup_key });
40
+ if (!res.ok)
41
+ return textResult(formatError(res));
42
+ return textResult(res.data.message || `Restored from ${backup_key}.`);
43
+ }
44
+ if (action === 'download') {
45
+ if (!backup_key)
46
+ return textResult('Error: backup_key is required for download.');
47
+ const res = await apiRequest('GET', `/projects/${project_id}/backups/download?key=${encodeURIComponent(backup_key)}`);
48
+ if (!res.ok)
49
+ return textResult(formatError(res));
50
+ return textResult(`Download URL (expires in ${res.data.expires_in || 3600}s):\n${res.data.url}`);
51
+ }
52
+ return textResult('Invalid action. Use list, create, restore, or download.');
53
+ });
54
+ }
55
+ //# sourceMappingURL=backups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backups.js","sourceRoot":"","sources":["../../src/tools/backups.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAehE,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,gHAAgH,EAChH;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACjD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;QACxG,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;KACzF,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE;QAC3C,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YACtB,MAAM,GAAG,GAAG,MAAM,UAAU,CAAkB,KAAK,EAAE,aAAa,UAAU,UAAU,CAAC,CAAC;YACxF,IAAI,CAAC,GAAG,CAAC,EAAE;gBAAE,OAAO,UAAU,CAAC,WAAW,CA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pServer): void;
3
+ //# sourceMappingURL=build-logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-logs.d.ts","sourceRoot":"","sources":["../../src/tools/build-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAqBpE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,QA2CvD"}
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ import { apiRequest, formatError, textResult } from '../api.js';
3
+ export function registerBuildLogsTools(server) {
4
+ server.tool('dailey_build_logs', 'Fetch the full build log for a specific build (or the most recent build if build_id is omitted). Use this after a deploy fails to see the actual compiler/Docker output.', {
5
+ project_id: z.string().describe('The project ID'),
6
+ build_id: z.string().optional().describe('Specific build ID (defaults to the most recent build for the project)'),
7
+ tail: z.number().int().min(1).max(5000).optional().describe('Return only the last N lines (default: full log)'),
8
+ }, async ({ project_id, build_id, tail }) => {
9
+ let targetBuildId = build_id;
10
+ if (!targetBuildId) {
11
+ const historyRes = await apiRequest('GET', `/projects/${project_id}/deploys`);
12
+ if (!historyRes.ok)
13
+ return textResult(formatError(historyRes));
14
+ const builds = historyRes.data.builds || [];
15
+ if (builds.length === 0) {
16
+ return textResult('No builds found for this project.');
17
+ }
18
+ targetBuildId = builds[0].id;
19
+ }
20
+ const buildRes = await apiRequest('GET', `/builds/${targetBuildId}`);
21
+ if (!buildRes.ok)
22
+ return textResult(formatError(buildRes));
23
+ const build = buildRes.data;
24
+ const log = build.log || '';
25
+ const allLines = log.split('\n');
26
+ const shown = tail ? allLines.slice(-tail) : allLines;
27
+ const header = [
28
+ `Build ${build.id}`,
29
+ `Status: ${build.status || 'unknown'}`,
30
+ `Commit: ${build.commit_sha || '-'}`,
31
+ `Started: ${build.started_at || '-'}`,
32
+ `Finished: ${build.finished_at || '-'}`,
33
+ `Lines: ${allLines.length}${tail ? ` (showing last ${Math.min(tail, allLines.length)})` : ''}`,
34
+ '─'.repeat(60),
35
+ ];
36
+ return textResult([...header, ...shown].join('\n'));
37
+ });
38
+ }
39
+ //# sourceMappingURL=build-logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-logs.js","sourceRoot":"","sources":["../../src/tools/build-logs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAmBhE,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,0KAA0K,EAC1K;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;QACjH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;KAChH,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE;QACvC,IAAI,aAAa,GAAG,QAAQ,CAAC;QAE7B,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,UAAU,GAAG,MAAM,UAAU,CAAsB,KAAK,EAAE,aAAa,UAAU,UAAU,CAAC,CAAC;YACnG,IAAI,CAAC,UAAU,CAAC,EAAE;gBAAE,OAAO,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;YAC/D,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;YAC5C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACxB,OAAO,UAAU,CAAC,mCAAmC,C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} from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerCredentialRevealTools(server: McpServer): void;
3
+ //# sourceMappingURL=credentials-reveal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials-reveal.d.ts","sourceRoot":"","sources":["../../src/tools/credentials-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,QA0B9D"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { apiRequest, formatError, textResult } from '../api.js';
3
+ export function registerCredentialRevealTools(server) {
4
+ server.tool('dailey_reveal_credential', 'Reveal the actual value of a single project credential (e.g., DB_PASSWORD). Requires password re-auth for audit. Uses DAILEY_PASSWORD env var if set, otherwise provide password argument. Every reveal is logged.', {
5
+ project_id: z.string().describe('The project ID'),
6
+ key: z.string().describe('Credential key (e.g., DB_PASSWORD, WORDPRESS_ADMIN_PASSWORD)'),
7
+ password: z.string().optional().describe('Account password for re-auth (falls back to DAILEY_PASSWORD env var)'),
8
+ }, async ({ project_id, key, password }) => {
9
+ const pw = password || process.env.DAILEY_PASSWORD;
10
+ if (!pw) {
11
+ return textResult('Error: re-auth password required. Set DAILEY_PASSWORD env var or pass password argument. Every reveal is audited.');
12
+ }
13
+ const res = await apiRequest('POST', `/projects/${project_id}/credentials/reveal`, { key, password: pw });
14
+ if (!res.ok)
15
+ return textResult(formatError(res));
16
+ return textResult(`${res.data.key}: ${res.data.value}`);
17
+ });
18
+ }
19
+ //# sourceMappingURL=credentials-reveal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials-reveal.js","sourceRoot":"","sources":["../../src/tools/credentials-reveal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,UAAU,6BAA6B,CAAC,MAAiB;IAC7D,MAAM,CAAC,IAAI,CACT,0BAA0B,EAC1B,oNAAoN,EACpN;QACE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACjD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8DAA8D,CAAC;QACxF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sEAAsE,CAAC;KACjH,EACD,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE;QACtC,MAAM,EAAE,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;QACnD,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO,UAAU,CACf,mHAAmH,CACpH,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,MAAM,UAAU,CAC1B,MAAM,EACN,aAAa,UAAU,qBAAqB,EAC5C,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CACtB,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAC1D,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/tools/db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAgDpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,QAwHhD"}
1
+ {"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/tools/db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAgDpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,QAgOhD"}