api-explorer.html•18.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitHub Project Manager API Explorer</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@4/swagger-ui.css">
<style>
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.header {
background-color: #24292e;
color: white;
padding: 20px;
text-align: center;
}
.header h1 {
margin: 0;
font-size: 24px;
}
.header p {
margin: 10px 0 0 0;
font-size: 16px;
opacity: 0.8;
}
.content {
padding: 20px;
}
.footer {
text-align: center;
padding: 20px;
font-size: 14px;
color: #586069;
border-top: 1px solid #e1e4e8;
margin-top: 40px;
}
.note {
background-color: #f6f8fa;
border-left: 4px solid #0366d6;
padding: 15px;
margin-bottom: 20px;
border-radius: 3px;
}
</style>
</head>
<body>
<div class="header">
<h1>GitHub Project Manager API Explorer</h1>
<p>Interactive documentation for the GitHub Project Manager MCP API</p>
</div>
<div class="content">
<div class="note">
<strong>Note:</strong> This API explorer provides an interactive way to explore the GitHub Project Manager MCP API.
You can see the available tools, their parameters, and response formats. To make actual API calls, you'll need to use the MCP server directly.
</div>
<div id="swagger-ui"></div>
</div>
<div class="footer">
<p>GitHub Project Manager MCP Server © 2023</p>
<p>
<a href="https://github.com/your-org/github-project-manager-mcp" target="_blank">GitHub Repository</a> |
<a href="./api-reference/index.md">API Reference</a> |
<a href="./user-guide.md">User Guide</a>
</p>
</div>
<script src="https://unpkg.com/swagger-ui-dist@4/swagger-ui-bundle.js"></script>
<script>
window.onload = function() {
// Define the OpenAPI specification inline
const spec = {
openapi: "3.0.0",
info: {
title: "GitHub Project Manager MCP API",
version: "1.0.0",
description: "API for managing GitHub Projects through the Model Context Protocol"
},
servers: [
{
url: "/",
description: "MCP Server"
}
],
paths: {
"/tools/create_roadmap": {
post: {
summary: "Create a project roadmap with milestones and tasks",
requestBody: {
content: {
"application/json": {
schema: {
type: "object",
required: ["project", "milestones"],
properties: {
project: {
type: "object",
required: ["title", "owner"],
properties: {
title: {
type: "string",
description: "Project title"
},
shortDescription: {
type: "string",
description: "Project short description (optional)"
},
owner: {
type: "string",
description: "Repository owner"
},
visibility: {
type: "string",
enum: ["private", "public"],
description: "Project visibility"
}
}
},
milestones: {
type: "array",
items: {
type: "object",
required: ["milestone"],
properties: {
milestone: {
type: "object",
required: ["title", "description"],
properties: {
title: {
type: "string",
description: "Milestone title"
},
description: {
type: "string",
description: "Milestone description"
},
dueDate: {
type: "string",
format: "date-time",
description: "Milestone due date"
}
}
},
issues: {
type: "array",
items: {
type: "object",
required: ["title", "description"],
properties: {
title: {
type: "string",
description: "Issue title"
},
description: {
type: "string",
description: "Issue description"
},
priority: {
type: "string",
enum: ["high", "medium", "low"],
default: "medium",
description: "Issue priority"
},
type: {
type: "string",
enum: ["bug", "feature", "enhancement", "documentation"],
default: "feature",
description: "Issue type"
},
assignees: {
type: "array",
items: {
type: "string"
},
description: "List of assignee usernames"
},
labels: {
type: "array",
items: {
type: "string"
},
description: "List of label names"
}
}
}
}
}
}
}
}
}
}
}
},
responses: {
"200": {
description: "Successful operation",
content: {
"application/json": {
schema: {
type: "object",
properties: {
project: {
type: "object",
properties: {
id: { type: "string" },
title: { type: "string" },
description: { type: "string" },
visibility: { type: "string" },
status: { type: "string" },
createdAt: { type: "string", format: "date-time" },
updatedAt: { type: "string", format: "date-time" }
}
},
milestones: {
type: "array",
items: {
type: "object",
properties: {
id: { type: "string" },
title: { type: "string" },
description: { type: "string" },
dueDate: { type: "string", format: "date-time" },
status: { type: "string" },
progress: {
type: "object",
properties: {
openIssues: { type: "integer" },
closedIssues: { type: "integer" },
completionPercentage: { type: "integer" }
}
},
issues: {
type: "array",
items: {
type: "object",
properties: {
id: { type: "string" },
title: { type: "string" },
description: { type: "string" },
priority: { type: "string" },
type: { type: "string" },
status: { type: "string" }
}
}
}
}
}
}
}
}
}
}
},
"400": {
description: "Validation error"
},
"401": {
description: "Unauthorized"
},
"429": {
description: "Rate limited"
}
}
}
},
"/tools/plan_sprint": {
post: {
summary: "Plan a new sprint with selected issues",
requestBody: {
content: {
"application/json": {
schema: {
type: "object",
required: ["sprint", "issueIds"],
properties: {
sprint: {
type: "object",
required: ["title", "startDate", "endDate"],
properties: {
title: {
type: "string",
description: "Sprint title"
},
startDate: {
type: "string",
format: "date-time",
description: "Sprint start date"
},
endDate: {
type: "string",
format: "date-time",
description: "Sprint end date"
},
goals: {
type: "array",
items: {
type: "string"
},
description: "List of sprint goals"
}
}
},
issueIds: {
type: "array",
items: {
type: "integer"
},
description: "List of issue IDs to include in the sprint"
}
}
}
}
}
},
responses: {
"200": {
description: "Successful operation",
content: {
"application/json": {
schema: {
type: "object",
properties: {
id: { type: "string" },
title: { type: "string" },
startDate: { type: "string", format: "date-time" },
endDate: { type: "string", format: "date-time" },
status: { type: "string" },
goals: {
type: "array",
items: { type: "string" }
},
issues: {
type: "array",
items: { type: "integer" }
},
createdAt: { type: "string", format: "date-time" },
updatedAt: { type: "string", format: "date-time" }
}
}
}
}
},
"400": {
description: "Validation error"
},
"404": {
description: "Resource not found"
}
}
}
},
"/tools/get_milestone_metrics": {
post: {
summary: "Get progress metrics for a specific milestone",
requestBody: {
content: {
"application/json": {
schema: {
type: "object",
required: ["milestoneId"],
properties: {
milestoneId: {
type: "integer",
description: "ID of the milestone to retrieve metrics for"
},
includeIssues: {
type: "boolean",
description: "Whether to include detailed issue information",
default: false
}
}
}
}
}
},
responses: {
"200": {
description: "Successful operation",
content: {
"application/json": {
schema: {
type: "object",
properties: {
milestone: {
type: "object",
properties: {
id: { type: "string" },
title: { type: "string" },
description: { type: "string" },
dueDate: { type: "string", format: "date-time" },
status: { type: "string" }
}
},
progress: {
type: "object",
properties: {
openIssues: { type: "integer" },
closedIssues: { type: "integer" },
completionPercentage: { type: "integer" },
daysRemaining: { type: "integer" },
isOverdue: { type: "boolean" }
}
},
issueBreakdown: {
type: "object",
properties: {
byType: {
type: "object",
additionalProperties: { type: "integer" }
},
byPriority: {
type: "object",
additionalProperties: { type: "integer" }
}
}
},
issues: {
type: "array",
items: {
type: "object",
properties: {
id: { type: "string" },
title: { type: "string" },
status: { type: "string" },
priority: { type: "string" },
type: { type: "string" }
}
}
}
}
}
}
}
},
"404": {
description: "Resource not found"
}
}
}
}
},
components: {
schemas: {
Error: {
type: "object",
properties: {
code: {
type: "string",
description: "Error code"
},
message: {
type: "string",
description: "Error message"
},
details: {
type: "array",
items: {
type: "object",
properties: {
code: { type: "string" },
message: { type: "string" }
}
}
}
}
}
}
}
};
SwaggerUIBundle({
spec: spec,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
],
layout: "BaseLayout",
syntaxHighlight: {
activated: true,
theme: "agate"
}
});
}
</script>
</body>
</html>