Skip to main content
Glama
add-graphql.js1.15 kB
#!/usr/bin/env node import fs from 'fs'; // Read the current file const filePath = 'C:\\tmp\\github-project-manager-mcp-local\\src\\index.ts'; let content = fs.readFileSync(filePath, 'utf8'); // Add graphqlWithAuth property after the octokit property content = content.replace( 'private octokit: Octokit;\n private owner: string;', 'private octokit: Octokit;\n private graphqlWithAuth: any;\n private owner: string;' ); // Add GraphQL initialization after Octokit initialization content = content.replace( 'this.octokit = new Octokit({ auth: token });\n this.owner = process.env.GITHUB_OWNER || \'\';\n this.repo = process.env.GITHUB_REPO || \'\';', `this.octokit = new Octokit({ auth: token }); // Initialize GraphQL client with authentication this.graphqlWithAuth = graphql.defaults({ headers: { authorization: \`token \${token}\`, }, }); this.owner = process.env.GITHUB_OWNER || ''; this.repo = process.env.GITHUB_REPO || '';` ); // Write the updated content back fs.writeFileSync(filePath, content); console.log('✅ Successfully added GraphQL client setup to index.ts');

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Faresabdelghany/github-project-manager-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server