Skip to main content
Glama

GitHub MCP Server

by renantrendt
pulls.ts1.37 kB
import { z } from 'zod'; import { githubPost } from '../common/api.js'; // Schema for creating a pull request export const CreatePullRequestSchema = z.object({ owner: z.string().describe('Repository owner (username or organization)'), repo: z.string().describe('Repository name'), title: z.string().describe('Pull request title'), body: z.string().describe('Pull request body/description'), head: z.string().describe('The name of the branch where your changes are implemented'), base: z.string().describe('The name of the branch you want the changes pulled into'), draft: z.boolean().optional().describe('Whether to create the pull request as a draft'), maintainer_can_modify: z.boolean().optional().describe('Whether maintainers can modify the pull request'), }); // Create a new pull request export async function createPullRequest( owner: string, repo: string, title: string, body: string, head: string, base: string, draft?: boolean, maintainer_can_modify?: boolean ) { const endpoint = `/repos/${owner}/${repo}/pulls`; const data: any = { title, body, head, base, }; if (draft !== undefined) data.draft = draft; if (maintainer_can_modify !== undefined) data.maintainer_can_modify = maintainer_can_modify; const response = await githubPost(endpoint, data); return await response.json(); }

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/renantrendt/mcp-github'

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