Files
shockbot/mcp/config.ts
T
David Blass 87d32763e9 fix
2025-10-08 15:19:02 -04:00

29 lines
642 B
TypeScript

/**
* Simple MCP configuration helper for adding our minimal GitHub comment server
*/
const actionPath = process.env.GITHUB_ACTION_PATH || process.cwd();
export function createMcpConfig(
githubInstallationToken: string,
repoOwner: string,
repoName: string
) {
return JSON.stringify(
{
mcpServers: {
minimal_github_comment: {
command: "node",
args: [`${actionPath}/mcp/server.ts`],
env: {
GITHUB_INSTALLATION_TOKEN: githubInstallationToken,
REPO_OWNER: repoOwner,
REPO_NAME: repoName,
},
},
},
},
null,
2
);
}