@shipstatic/mcp 0.1.7 → 0.1.8
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 +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -21
- package/dist/server.js +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,6 +48,12 @@ Get your API key at [my.shipstatic.com](https://my.shipstatic.com).
|
|
|
48
48
|
| `domains_verify` | Trigger DNS verification for external domain |
|
|
49
49
|
| `domains_remove` | Delete domain permanently |
|
|
50
50
|
|
|
51
|
+
### Debugging
|
|
52
|
+
|
|
53
|
+
| Tool | Description |
|
|
54
|
+
|------|-------------|
|
|
55
|
+
| `whoami` | Show current account information |
|
|
56
|
+
|
|
51
57
|
## Registry
|
|
52
58
|
|
|
53
59
|
Published to the [MCP Registry](https://modelcontextprotocol.io) as [`com.shipstatic/mcp`](https://registry.modelcontextprotocol.io/v0.1/servers?search=com.shipstatic/mcp).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export
|
|
2
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -2,29 +2,28 @@
|
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
3
|
import Ship from '@shipstatic/ship';
|
|
4
4
|
import { createServer } from './server.js';
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const apiKey = process.env.SHIP_API_KEY;
|
|
6
|
+
if (!apiKey) {
|
|
7
|
+
console.error('SHIP_API_KEY environment variable is required.');
|
|
8
|
+
console.error('Add to your MCP client config:\n');
|
|
9
|
+
console.error(JSON.stringify({
|
|
10
|
+
mcpServers: {
|
|
11
|
+
shipstatic: {
|
|
12
|
+
command: 'npx',
|
|
13
|
+
args: ['@shipstatic/mcp'],
|
|
14
|
+
env: { SHIP_API_KEY: 'ship-...' },
|
|
15
|
+
},
|
|
11
16
|
},
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
// Smithery sandbox: allows capability scanning without real credentials
|
|
15
|
-
export function createSandboxServer() {
|
|
16
|
-
return createServer(new Ship({ apiKey: 'sandbox' }));
|
|
17
|
+
}, null, 2));
|
|
18
|
+
process.exit(1);
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
if (apiKey) {
|
|
20
|
+
async function main() {
|
|
20
21
|
const server = createServer(new Ship({ apiKey }));
|
|
21
22
|
const transport = new StdioServerTransport();
|
|
22
|
-
server.connect(transport)
|
|
23
|
-
|
|
24
|
-
else {
|
|
25
|
-
console.error('Shipstatic MCP server v0.1.7');
|
|
26
|
-
console.error('This is a stdio server for MCP clients.\n');
|
|
27
|
-
console.error('SHIP_API_KEY environment variable is required.\n');
|
|
28
|
-
console.error('Add to your MCP client config:\n');
|
|
29
|
-
console.error(CONFIG_EXAMPLE);
|
|
23
|
+
await server.connect(transport);
|
|
24
|
+
console.error('Shipstatic MCP Server running on stdio');
|
|
30
25
|
}
|
|
26
|
+
main().catch((error) => {
|
|
27
|
+
console.error('Fatal error:', error);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
});
|
package/dist/server.js
CHANGED
|
@@ -8,7 +8,7 @@ const DESTRUCTIVE = { destructiveHint: true, idempotentHint: true, ...OPEN_WORLD
|
|
|
8
8
|
export function createServer(ship) {
|
|
9
9
|
const server = new McpServer({
|
|
10
10
|
name: 'shipstatic',
|
|
11
|
-
version: '0.1.
|
|
11
|
+
version: '0.1.8',
|
|
12
12
|
}, {
|
|
13
13
|
instructions: 'Deploy a static site to Shipstatic and link it to your domain. To deploy, call deployments_upload with the path to your build output directory. To set up a custom domain, first call domains_validate to check the name, then domains_set to link it to a deployment, then domains_records to get the required DNS records. After DNS is configured, call domains_verify to trigger verification.',
|
|
14
14
|
});
|
|
@@ -97,5 +97,10 @@ export function createServer(ship) {
|
|
|
97
97
|
domain: z.string().describe('Domain name to delete'),
|
|
98
98
|
},
|
|
99
99
|
}, ({ domain }) => call(() => ship.domains.remove(domain)));
|
|
100
|
+
// Debugging
|
|
101
|
+
server.registerTool('whoami', {
|
|
102
|
+
description: 'Show current account information',
|
|
103
|
+
annotations: READ,
|
|
104
|
+
}, () => call(() => ship.whoami()));
|
|
100
105
|
return server;
|
|
101
106
|
}
|