Skip to main content
Glama
ddukbg

GitHub Enterprise MCP Server

create-issue

Create GitHub Enterprise issues directly with detailed specifications, including title, labels, assignees, and milestones, through the GitHub Enterprise MCP Server integration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneesNoAssignee list
bodyNoIssue content
labelsNoLabel list
milestoneNoMilestone ID
ownerYesRepository owner (user or organization)
repoYesRepository name
titleYesIssue title

Implementation Reference

  • MCP tool registration, input schema (Zod), and handler function for 'create-issue'. Validates parameters, calls underlying createIssue API, formats response.
    server.tool( "create-issue", { owner: z.string().describe(i18n.t('issues', 'param_owner')), repo: z.string().describe(i18n.t('issues', 'param_repo')), title: z.string().describe(i18n.t('issues', 'param_title')), body: z.string().optional().describe(i18n.t('issues', 'param_body')), labels: z.array(z.string()).optional().describe(i18n.t('issues', 'param_labels')), assignees: z.array(z.string()).optional().describe(i18n.t('issues', 'param_assignees')), milestone: z.number().optional().describe(i18n.t('issues', 'param_milestone')) }, async ({ owner, repo, title, body, labels, assignees, milestone }) => { try { // Parameter validation if (!owner || typeof owner !== 'string' || owner.trim() === '') { return { content: [ { type: "text", text: i18n.t('common', 'error_required', { field: i18n.t('issues', 'param_owner') }) } ], isError: true }; } if (!repo || typeof repo !== 'string' || repo.trim() === '') { return { content: [ { type: "text", text: i18n.t('common', 'error_required', { field: i18n.t('issues', 'param_repo') }) } ], isError: true }; } if (!title || typeof title !== 'string' || title.trim() === '') { return { content: [ { type: "text", text: i18n.t('common', 'error_required', { field: i18n.t('issues', 'param_title') }) } ], isError: true }; } const issue = await context.issues.createIssue(context.client, { owner, repo, title, body, labels, assignees, milestone }); // Format created issue info const formattedIssue = { number: issue.number, title: issue.title, body: issue.body, state: issue.state, user: issue.user.login, created_at: issue.created_at, updated_at: issue.updated_at, labels: issue.labels.map((label: any) => label.name), assignees: issue.assignees?.map((assignee: any) => assignee.login) || [] }; return { content: [ { type: "text", text: i18n.t('issues', 'issue_create_success', { number: issue.number, title: issue.title }) + `\n\n${JSON.stringify(formattedIssue, null, 2)}` } ] }; } catch (error: any) { console.error(i18n.t('common', 'error_generic', { message: error.message })); return { content: [ { type: "text", text: i18n.t('common', 'error_generic', { message: error.message }) } ], isError: true }; } } );
  • Helper function that performs the actual GitHub API POST request to create an issue.
    export async function createIssue( client: GitHubClient, params: CreateIssueParams ): Promise<Issue> { const { owner, repo, ...data } = params; return client.post<Issue>(`/repos/${owner}/${repo}/issues`, data); }
  • TypeScript interface defining the parameters for creating an issue, matching the MCP tool schema.
    export interface CreateIssueParams { owner: string; repo: string; title: string; body?: string; assignees?: string[]; labels?: string[]; milestone?: number; }

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

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