@vineethnkrishnan/vercel-mcp 0.1.1
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/build/common/types.d.ts +11 -0
- package/build/common/types.js +3 -0
- package/build/common/types.js.map +1 -0
- package/build/common/utils.d.ts +27 -0
- package/build/common/utils.js +84 -0
- package/build/common/utils.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +89 -0
- package/build/index.js.map +1 -0
- package/build/services/vercel.service.d.ts +14 -0
- package/build/services/vercel.service.js +80 -0
- package/build/services/vercel.service.js.map +1 -0
- package/build/tools/deployment.tools.d.ts +31 -0
- package/build/tools/deployment.tools.js +65 -0
- package/build/tools/deployment.tools.js.map +1 -0
- package/build/tools/project.tools.d.ts +22 -0
- package/build/tools/project.tools.js +40 -0
- package/build/tools/project.tools.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { McpToolResponse } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Recursively removes specified keys from an object.
|
|
4
|
+
*/
|
|
5
|
+
export declare function stripVercelMetadata(obj: unknown, keys?: string[]): unknown;
|
|
6
|
+
/**
|
|
7
|
+
* Strips ANSI escape codes from a string.
|
|
8
|
+
*/
|
|
9
|
+
export declare function stripAnsiCodes(text: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Truncates build log lines to the last MAX_BUILD_LOG_LINES lines.
|
|
12
|
+
* Returns the truncated string with a marker if truncation occurred.
|
|
13
|
+
*/
|
|
14
|
+
export declare function truncateBuildLogs(lines: string[], maxLines?: number): string;
|
|
15
|
+
/**
|
|
16
|
+
* Composes all Vercel-specific transformations for LLM optimization.
|
|
17
|
+
* Strips internal metadata keys from the response data.
|
|
18
|
+
*/
|
|
19
|
+
export declare function transformVercelResponse(data: unknown): unknown;
|
|
20
|
+
/**
|
|
21
|
+
* Transforms Vercel data and wraps it in the MCP tool response format.
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatMcpResponse(data: unknown): McpToolResponse;
|
|
24
|
+
/**
|
|
25
|
+
* Wraps an error in the MCP tool error response format.
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatMcpError(error: unknown): McpToolResponse;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripVercelMetadata = stripVercelMetadata;
|
|
4
|
+
exports.stripAnsiCodes = stripAnsiCodes;
|
|
5
|
+
exports.truncateBuildLogs = truncateBuildLogs;
|
|
6
|
+
exports.transformVercelResponse = transformVercelResponse;
|
|
7
|
+
exports.formatMcpResponse = formatMcpResponse;
|
|
8
|
+
exports.formatMcpError = formatMcpError;
|
|
9
|
+
const VERCEL_STRIP_KEYS = [
|
|
10
|
+
"ownerId",
|
|
11
|
+
"accountId",
|
|
12
|
+
"plan",
|
|
13
|
+
"analytics",
|
|
14
|
+
"speedInsights",
|
|
15
|
+
"autoExposeSystemEnvs",
|
|
16
|
+
"directoryListing",
|
|
17
|
+
"skewProtection",
|
|
18
|
+
];
|
|
19
|
+
const MAX_BUILD_LOG_LINES = 150;
|
|
20
|
+
/**
|
|
21
|
+
* Recursively removes specified keys from an object.
|
|
22
|
+
*/
|
|
23
|
+
function stripVercelMetadata(obj, keys = VERCEL_STRIP_KEYS) {
|
|
24
|
+
if (obj === null || obj === undefined)
|
|
25
|
+
return obj;
|
|
26
|
+
if (Array.isArray(obj))
|
|
27
|
+
return obj.map((item) => stripVercelMetadata(item, keys));
|
|
28
|
+
if (typeof obj !== "object")
|
|
29
|
+
return obj;
|
|
30
|
+
const result = {};
|
|
31
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
32
|
+
if (keys.includes(key))
|
|
33
|
+
continue;
|
|
34
|
+
result[key] = stripVercelMetadata(value, keys);
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Strips ANSI escape codes from a string.
|
|
40
|
+
*/
|
|
41
|
+
function stripAnsiCodes(text) {
|
|
42
|
+
// eslint-disable-next-line no-control-regex
|
|
43
|
+
return text.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "");
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Truncates build log lines to the last MAX_BUILD_LOG_LINES lines.
|
|
47
|
+
* Returns the truncated string with a marker if truncation occurred.
|
|
48
|
+
*/
|
|
49
|
+
function truncateBuildLogs(lines, maxLines = MAX_BUILD_LOG_LINES) {
|
|
50
|
+
if (lines.length <= maxLines) {
|
|
51
|
+
return lines.join("\n");
|
|
52
|
+
}
|
|
53
|
+
const totalLines = lines.length;
|
|
54
|
+
const truncatedLines = lines.slice(-maxLines);
|
|
55
|
+
const marker = `[truncated — showing last ${maxLines} of ${totalLines} lines]`;
|
|
56
|
+
return [marker, ...truncatedLines].join("\n");
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Composes all Vercel-specific transformations for LLM optimization.
|
|
60
|
+
* Strips internal metadata keys from the response data.
|
|
61
|
+
*/
|
|
62
|
+
function transformVercelResponse(data) {
|
|
63
|
+
return stripVercelMetadata(data);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Transforms Vercel data and wraps it in the MCP tool response format.
|
|
67
|
+
*/
|
|
68
|
+
function formatMcpResponse(data) {
|
|
69
|
+
const transformed = transformVercelResponse(data);
|
|
70
|
+
return {
|
|
71
|
+
content: [{ type: "text", text: JSON.stringify(transformed, null, 2) }],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Wraps an error in the MCP tool error response format.
|
|
76
|
+
*/
|
|
77
|
+
function formatMcpError(error) {
|
|
78
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
79
|
+
return {
|
|
80
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
81
|
+
isError: true,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/common/utils.ts"],"names":[],"mappings":";;AAkBA,kDAWC;AAKD,wCAGC;AAMD,8CASC;AAMD,0DAEC;AAKD,8CAKC;AAKD,wCAMC;AA/ED,MAAM,iBAAiB,GAAG;IACxB,SAAS;IACT,WAAW;IACX,MAAM;IACN,WAAW;IACX,eAAe;IACf,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;CACjB,CAAC;AAEF,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC;;GAEG;AACH,SAAgB,mBAAmB,CAAC,GAAY,EAAE,OAAiB,iBAAiB;IAClF,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,GAAG,CAAC;IAClD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAClF,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IAExC,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAA8B,CAAC,EAAE,CAAC;QAC1E,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,SAAS;QACjC,MAAM,CAAC,GAAG,CAAC,GAAG,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,4CAA4C;IAC5C,OAA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C;AACJ,CAAC"}
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
5
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const vercel_service_1 = require("./services/vercel.service");
|
|
9
|
+
const project_tools_1 = require("./tools/project.tools");
|
|
10
|
+
const deployment_tools_1 = require("./tools/deployment.tools");
|
|
11
|
+
// Validate required config
|
|
12
|
+
const VERCEL_TOKEN = process.env.VERCEL_TOKEN;
|
|
13
|
+
if (!VERCEL_TOKEN) {
|
|
14
|
+
console.error("VERCEL_TOKEN environment variable is required.");
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
const vercelService = new vercel_service_1.VercelService({
|
|
18
|
+
token: VERCEL_TOKEN,
|
|
19
|
+
teamId: process.env.VERCEL_TEAM_ID,
|
|
20
|
+
});
|
|
21
|
+
// Initialize tool classes
|
|
22
|
+
const tools = {
|
|
23
|
+
projects: new project_tools_1.ProjectTools(vercelService),
|
|
24
|
+
deployments: new deployment_tools_1.DeploymentTools(vercelService),
|
|
25
|
+
};
|
|
26
|
+
// Combine all schemas
|
|
27
|
+
const AllToolSchemas = {
|
|
28
|
+
...project_tools_1.ProjectToolSchemas,
|
|
29
|
+
...deployment_tools_1.DeploymentToolSchemas,
|
|
30
|
+
};
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
32
|
+
const { version } = require("../package.json");
|
|
33
|
+
const server = new index_js_1.Server({
|
|
34
|
+
name: "vercel-mcp",
|
|
35
|
+
version,
|
|
36
|
+
}, {
|
|
37
|
+
capabilities: {
|
|
38
|
+
tools: {},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Handler for listing available tools.
|
|
43
|
+
*/
|
|
44
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
45
|
+
return {
|
|
46
|
+
tools: Object.entries(AllToolSchemas).map(([name, config]) => ({
|
|
47
|
+
name,
|
|
48
|
+
description: config.description,
|
|
49
|
+
inputSchema: zod_1.z.toJSONSchema(config.schema),
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const toolRegistry = {};
|
|
54
|
+
for (const name of Object.keys(project_tools_1.ProjectToolSchemas)) {
|
|
55
|
+
toolRegistry[name] = (args) => tools.projects[name](args);
|
|
56
|
+
}
|
|
57
|
+
for (const name of Object.keys(deployment_tools_1.DeploymentToolSchemas)) {
|
|
58
|
+
toolRegistry[name] = (args) => tools.deployments[name](args);
|
|
59
|
+
}
|
|
60
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
61
|
+
try {
|
|
62
|
+
const { name, arguments: args } = request.params;
|
|
63
|
+
const handler = toolRegistry[name];
|
|
64
|
+
if (!handler) {
|
|
65
|
+
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Tool not found: ${name}`);
|
|
66
|
+
}
|
|
67
|
+
return await handler(args ?? {});
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
71
|
+
return {
|
|
72
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
73
|
+
isError: true,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* Start the server using Stdio transport.
|
|
79
|
+
*/
|
|
80
|
+
async function main() {
|
|
81
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
82
|
+
await server.connect(transport);
|
|
83
|
+
console.error("Vercel MCP Server running on stdio");
|
|
84
|
+
}
|
|
85
|
+
main().catch((error) => {
|
|
86
|
+
console.error("Server error:", error);
|
|
87
|
+
process.exit(1);
|
|
88
|
+
});
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,wEAAmE;AACnE,wEAAiF;AACjF,iEAK4C;AAC5C,6BAAwB;AACxB,8DAA0D;AAC1D,yDAAyE;AACzE,+DAAkF;AAElF,2BAA2B;AAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;AAE9C,IAAI,CAAC,YAAY,EAAE,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,aAAa,GAAG,IAAI,8BAAa,CAAC;IACtC,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;CACnC,CAAC,CAAC;AAEH,0BAA0B;AAC1B,MAAM,KAAK,GAAG;IACZ,QAAQ,EAAE,IAAI,4BAAY,CAAC,aAAa,CAAC;IACzC,WAAW,EAAE,IAAI,kCAAe,CAAC,aAAa,CAAC;CAChD,CAAC;AAEF,sBAAsB;AACtB,MAAM,cAAc,GAAG;IACrB,GAAG,kCAAkB;IACrB,GAAG,wCAAqB;CAChB,CAAC;AAEX,iEAAiE;AACjE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,MAAM,MAAM,GAAG,IAAI,iBAAM,CACvB;IACE,IAAI,EAAE,YAAY;IAClB,OAAO;CACR,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,iBAAiB,CAAC,iCAAsB,EAAE,KAAK,IAAI,EAAE;IAC1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AC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC;YACtD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;AACtD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VercelConfig } from "../common/types";
|
|
2
|
+
export declare class VercelService {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private token;
|
|
5
|
+
private teamId?;
|
|
6
|
+
constructor(config: VercelConfig);
|
|
7
|
+
private buildUrl;
|
|
8
|
+
private request;
|
|
9
|
+
listProjects(limit?: number): Promise<unknown>;
|
|
10
|
+
getProject(projectId: string): Promise<unknown>;
|
|
11
|
+
listDeployments(projectId?: string, limit?: number): Promise<unknown>;
|
|
12
|
+
getDeployment(deploymentId: string): Promise<unknown>;
|
|
13
|
+
getDeploymentBuildLogs(deploymentId: string): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VercelService = void 0;
|
|
4
|
+
class VercelService {
|
|
5
|
+
baseUrl = "https://api.vercel.com";
|
|
6
|
+
token;
|
|
7
|
+
teamId;
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.token = config.token;
|
|
10
|
+
this.teamId = config.teamId;
|
|
11
|
+
}
|
|
12
|
+
buildUrl(path, params) {
|
|
13
|
+
const url = new URL(path, this.baseUrl);
|
|
14
|
+
if (this.teamId) {
|
|
15
|
+
url.searchParams.set("teamId", this.teamId);
|
|
16
|
+
}
|
|
17
|
+
if (params) {
|
|
18
|
+
for (const [key, value] of Object.entries(params)) {
|
|
19
|
+
if (value !== undefined && value !== null && value !== "") {
|
|
20
|
+
url.searchParams.set(key, String(value));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return url.toString();
|
|
25
|
+
}
|
|
26
|
+
async request(path, params) {
|
|
27
|
+
const url = this.buildUrl(path, params);
|
|
28
|
+
const response = await fetch(url, {
|
|
29
|
+
headers: {
|
|
30
|
+
Authorization: `Bearer ${this.token}`,
|
|
31
|
+
"Content-Type": "application/json",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
if (!response.ok) {
|
|
35
|
+
const errorBody = await response.text().catch(() => "");
|
|
36
|
+
switch (response.status) {
|
|
37
|
+
case 401:
|
|
38
|
+
throw new Error("Authentication failed. Check your VERCEL_TOKEN.");
|
|
39
|
+
case 403:
|
|
40
|
+
throw new Error("Access denied. Token may lack required scopes, or you may not have access to this team.");
|
|
41
|
+
case 404:
|
|
42
|
+
throw new Error("Not found. Check the ID and ensure you have access.");
|
|
43
|
+
case 429: {
|
|
44
|
+
const retryAfter = response.headers.get("Retry-After") ?? "unknown";
|
|
45
|
+
throw new Error(`Rate limited by Vercel. Retry after ${retryAfter} seconds.`);
|
|
46
|
+
}
|
|
47
|
+
default:
|
|
48
|
+
throw new Error(`Vercel API error (${response.status}): ${errorBody || response.statusText}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return response.json();
|
|
52
|
+
}
|
|
53
|
+
// ===========================================================================
|
|
54
|
+
// Projects
|
|
55
|
+
// ===========================================================================
|
|
56
|
+
async listProjects(limit = 20) {
|
|
57
|
+
return this.request("/v9/projects", { limit });
|
|
58
|
+
}
|
|
59
|
+
async getProject(projectId) {
|
|
60
|
+
return this.request(`/v9/projects/${projectId}`);
|
|
61
|
+
}
|
|
62
|
+
// ===========================================================================
|
|
63
|
+
// Deployments
|
|
64
|
+
// ===========================================================================
|
|
65
|
+
async listDeployments(projectId, limit = 20) {
|
|
66
|
+
const params = { limit };
|
|
67
|
+
if (projectId) {
|
|
68
|
+
params.projectId = projectId;
|
|
69
|
+
}
|
|
70
|
+
return this.request("/v6/deployments", params);
|
|
71
|
+
}
|
|
72
|
+
async getDeployment(deploymentId) {
|
|
73
|
+
return this.request(`/v13/deployments/${deploymentId}`);
|
|
74
|
+
}
|
|
75
|
+
async getDeploymentBuildLogs(deploymentId) {
|
|
76
|
+
return this.request(`/v2/deployments/${deploymentId}/events`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.VercelService = VercelService;
|
|
80
|
+
//# sourceMappingURL=vercel.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel.service.js","sourceRoot":"","sources":["../../src/services/vercel.service.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IAChB,OAAO,GAAG,wBAAwB,CAAC;IACnC,KAAK,CAAS;IACd,MAAM,CAAU;IAExB,YAAY,MAAoB;QAC9B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAEO,QAAQ,CAAC,IAAY,EAAE,MAAwC;QACrE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,C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U,mBAAmB,YAAY,SAAS,CAAC,CAAC;IACzE,CAAC;CACF;AA3FD,sCA2FC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { VercelService } from "../services/vercel.service";
|
|
3
|
+
import { McpToolResponse } from "../common/types";
|
|
4
|
+
export declare const DeploymentToolSchemas: {
|
|
5
|
+
list_deployments: {
|
|
6
|
+
description: string;
|
|
7
|
+
schema: z.ZodObject<{
|
|
8
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
};
|
|
12
|
+
get_deployment: {
|
|
13
|
+
description: string;
|
|
14
|
+
schema: z.ZodObject<{
|
|
15
|
+
deployment_id: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
};
|
|
18
|
+
get_deployment_build_logs: {
|
|
19
|
+
description: string;
|
|
20
|
+
schema: z.ZodObject<{
|
|
21
|
+
deployment_id: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare class DeploymentTools {
|
|
26
|
+
private vercelService;
|
|
27
|
+
constructor(vercelService: VercelService);
|
|
28
|
+
list_deployments(args: z.infer<typeof DeploymentToolSchemas.list_deployments.schema>): Promise<McpToolResponse>;
|
|
29
|
+
get_deployment(args: z.infer<typeof DeploymentToolSchemas.get_deployment.schema>): Promise<McpToolResponse>;
|
|
30
|
+
get_deployment_build_logs(args: z.infer<typeof DeploymentToolSchemas.get_deployment_build_logs.schema>): Promise<McpToolResponse>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeploymentTools = exports.DeploymentToolSchemas = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../common/utils");
|
|
6
|
+
const utils_2 = require("../common/utils");
|
|
7
|
+
exports.DeploymentToolSchemas = {
|
|
8
|
+
list_deployments: {
|
|
9
|
+
description: "Lists Vercel deployments. Optionally filter by project. Returns deployment status, URL, git commit info, and timestamps. Set VERCEL_TEAM_ID for team-scoped results.",
|
|
10
|
+
schema: zod_1.z.object({
|
|
11
|
+
project_id: zod_1.z.string().optional().describe("Filter deployments by project ID or name."),
|
|
12
|
+
limit: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.min(1)
|
|
15
|
+
.max(100)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Maximum number of deployments to return (default 20, max 100)."),
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
get_deployment: {
|
|
21
|
+
description: "Retrieves full details for a specific deployment including status, URL, git commit info, build timings, and error messages.",
|
|
22
|
+
schema: zod_1.z.object({
|
|
23
|
+
deployment_id: zod_1.z.string().describe("The deployment ID (e.g., 'dpl_abc123') or URL."),
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
get_deployment_build_logs: {
|
|
27
|
+
description: "Retrieves build output logs for a deployment. Logs are cleaned (ANSI codes stripped) and truncated to the last 150 lines for LLM consumption. Errors typically appear at the end.",
|
|
28
|
+
schema: zod_1.z.object({
|
|
29
|
+
deployment_id: zod_1.z
|
|
30
|
+
.string()
|
|
31
|
+
.describe("The deployment ID (e.g., 'dpl_abc123') to fetch build logs for."),
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
class DeploymentTools {
|
|
36
|
+
vercelService;
|
|
37
|
+
constructor(vercelService) {
|
|
38
|
+
this.vercelService = vercelService;
|
|
39
|
+
}
|
|
40
|
+
async list_deployments(args) {
|
|
41
|
+
const deployments = await this.vercelService.listDeployments(args.project_id, args.limit);
|
|
42
|
+
return (0, utils_1.formatMcpResponse)(deployments);
|
|
43
|
+
}
|
|
44
|
+
async get_deployment(args) {
|
|
45
|
+
const deployment = await this.vercelService.getDeployment(args.deployment_id);
|
|
46
|
+
return (0, utils_1.formatMcpResponse)(deployment);
|
|
47
|
+
}
|
|
48
|
+
async get_deployment_build_logs(args) {
|
|
49
|
+
const events = (await this.vercelService.getDeploymentBuildLogs(args.deployment_id));
|
|
50
|
+
// Extract text from build events, strip ANSI codes, and truncate
|
|
51
|
+
const logLines = events
|
|
52
|
+
.filter((event) => event.text || event.payload?.text)
|
|
53
|
+
.map((event) => {
|
|
54
|
+
const text = event.text ?? event.payload?.text ?? "";
|
|
55
|
+
return (0, utils_2.stripAnsiCodes)(text);
|
|
56
|
+
})
|
|
57
|
+
.filter((line) => line.trim() !== "");
|
|
58
|
+
const processedLogs = (0, utils_2.truncateBuildLogs)(logLines);
|
|
59
|
+
return {
|
|
60
|
+
content: [{ type: "text", text: processedLogs }],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.DeploymentTools = DeploymentTools;
|
|
65
|
+
//# sourceMappingURL=deployment.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.tools.js","sourceRoot":"","sources":["../../src/tools/deployment.tools.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,2CAAoD;AACpD,2CAAoE;AAGvD,QAAA,qBAAqB,GAAG;IACnC,gBAAgB,EAAE;QAChB,WAAW,EACT,sKAAsK;QACxK,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;YACvF,KAAK,EAAE,OAAC;iBACL,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,gEAAgE,CAAC;SAC9E,CAAC;KACH;IACD,cAAc,EAAE;QACd,WAAW,EACT,6HAA6H;QAC/H,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC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AC;YACrD,OAAO,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAExC,MAAM,aAAa,GAAG,IAAA,yBAAiB,EAAC,QAAQ,CAAC,CAAC;QAElD,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;SACjD,CAAC;IACJ,CAAC;CACF;AArCD,0CAqCC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { VercelService } from "../services/vercel.service";
|
|
3
|
+
export declare const ProjectToolSchemas: {
|
|
4
|
+
list_projects: {
|
|
5
|
+
description: string;
|
|
6
|
+
schema: z.ZodObject<{
|
|
7
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
};
|
|
10
|
+
get_project: {
|
|
11
|
+
description: string;
|
|
12
|
+
schema: z.ZodObject<{
|
|
13
|
+
project_id: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare class ProjectTools {
|
|
18
|
+
private vercelService;
|
|
19
|
+
constructor(vercelService: VercelService);
|
|
20
|
+
list_projects(args: z.infer<typeof ProjectToolSchemas.list_projects.schema>): Promise<import("../common/types").McpToolResponse>;
|
|
21
|
+
get_project(args: z.infer<typeof ProjectToolSchemas.get_project.schema>): Promise<import("../common/types").McpToolResponse>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProjectTools = exports.ProjectToolSchemas = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const utils_1 = require("../common/utils");
|
|
6
|
+
exports.ProjectToolSchemas = {
|
|
7
|
+
list_projects: {
|
|
8
|
+
description: "Lists all Vercel projects. Returns project names, frameworks, and latest deployment info. Set VERCEL_TEAM_ID for team-scoped results.",
|
|
9
|
+
schema: zod_1.z.object({
|
|
10
|
+
limit: zod_1.z
|
|
11
|
+
.number()
|
|
12
|
+
.min(1)
|
|
13
|
+
.max(100)
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("Maximum number of projects to return (default 20, max 100)."),
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
get_project: {
|
|
19
|
+
description: "Retrieves full details for a specific Vercel project including framework, build settings, git repository link, and latest deployment info.",
|
|
20
|
+
schema: zod_1.z.object({
|
|
21
|
+
project_id: zod_1.z.string().describe("The project ID or name (e.g., 'prj_abc123' or 'my-app')."),
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
class ProjectTools {
|
|
26
|
+
vercelService;
|
|
27
|
+
constructor(vercelService) {
|
|
28
|
+
this.vercelService = vercelService;
|
|
29
|
+
}
|
|
30
|
+
async list_projects(args) {
|
|
31
|
+
const projects = await this.vercelService.listProjects(args.limit);
|
|
32
|
+
return (0, utils_1.formatMcpResponse)(projects);
|
|
33
|
+
}
|
|
34
|
+
async get_project(args) {
|
|
35
|
+
const project = await this.vercelService.getProject(args.project_id);
|
|
36
|
+
return (0, utils_1.formatMcpResponse)(project);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ProjectTools = ProjectTools;
|
|
40
|
+
//# sourceMappingURL=project.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.tools.js","sourceRoot":"","sources":["../../src/tools/project.tools.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,2CAAoD;AAEvC,QAAA,kBAAkB,GAAG;IAChC,aAAa,EAAE;QACb,WAAW,EACT,uIAAuI;QACzI,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,KAAK,EAAE,OAAC;iBACL,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,6DAA6D,CAAC;SAC3E,CAAC;KACH;IACD,WAAW,EAAE;QACX,WAAW,EACT,4IAA4I;QAC9I,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;SAC5F,CAAC;KACH;CACF,CAAC;AAEF,MAAa,YAAY;IACH;IAApB,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAEpD,KAAK,CAAC,aAAa,CAAC,IAA6D;QAC/E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnE,OAAO,IAAA,yBAAiB,EAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAA2D;QAC3E,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,OAAO,IAAA,yBAAiB,EAAC,OAAO,CAAC,CAAC;IACpC,CAAC;CACF;AAZD,oCAYC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vineethnkrishnan/vercel-mcp",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "A read-only MCP server for Vercel API, enabling AI assistants to query deployments, projects, and build logs. Supports team-scoped access.",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"vercel-mcp": "build/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"build/"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc",
|
|
14
|
+
"start": "node build/index.js",
|
|
15
|
+
"test": "jest --coverage"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"vercel",
|
|
23
|
+
"ai",
|
|
24
|
+
"model-context-protocol",
|
|
25
|
+
"deployments",
|
|
26
|
+
"build-logs",
|
|
27
|
+
"team-scoped"
|
|
28
|
+
],
|
|
29
|
+
"author": "Vineeth Krishnan",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"type": "commonjs",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=20"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
37
|
+
"zod": "^4.3.6"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/jest": "^30.0.0",
|
|
41
|
+
"@types/node": "^25.5.0",
|
|
42
|
+
"jest": "^30.3.0",
|
|
43
|
+
"ts-jest": "^29.4.6",
|
|
44
|
+
"typescript": "^5.7.0"
|
|
45
|
+
}
|
|
46
|
+
}
|