|
|
8 ay önce | |
|---|---|---|
| docs-api @ 9740f402bd | 9 ay önce | |
| scripts | 9 ay önce | |
| src | 8 ay önce | |
| .dockerignore | 9 ay önce | |
| .env.example | 8 ay önce | |
| .gitignore | 9 ay önce | |
| .gitmodules | 9 ay önce | |
| .mcp-gogs.json | 8 ay önce | |
| CHANGELOG_LABELS.md | 9 ay önce | |
| CLAUDE.md | 8 ay önce | |
| Dockerfile | 9 ay önce | |
| LABEL_IMPLEMENTATION_SUMMARY.md | 9 ay önce | |
| LICENSE | 9 ay önce | |
| README.md | 8 ay önce | |
| SERVICE.md | 9 ay önce | |
| USAGE_EXAMPLES.md | 9 ay önce | |
| docker-compose.yml | 9 ay önce | |
| gogs-mcp-server.service | 9 ay önce | |
| install-service.sh | 9 ay önce | |
| package-lock.json | 9 ay önce | |
| package.json | 9 ay önce | |
| tsconfig.json | 9 ay önce | |
| uninstall-service.sh | 9 ay önce |
A Model Context Protocol (MCP) server that provides access to Gogs git hosting APIs. This server enables AI assistants like Claude to interact with Gogs repositories, users, and other resources.
This MCP server provides tools to:
User Management
Repository Management
Content Access
Issue Management
Label Management
Milestone Management
Organization Management
Team Management
Release Management
Public Key Management
Deploy Key Management
User Followers
Markdown Rendering
OR
Clone this repository:
git clone ssh://git@207.154.220.231:10022/claude/gogs-mcp.git
cd gogs-mcp
Install dependencies:
npm install
Build the project:
npm run build
Clone this repository:
git clone ssh://git@207.154.220.231:10022/claude/gogs-mcp.git
cd gogs-mcp
Create a .env file from the example:
cp .env.example .env
Edit .env and configure your Gogs server URL and access token:
GOGS_SERVER_URL=https://your-gogs-server.com
GOGS_ACCESS_TOKEN=your-access-token-here
Build and run with Docker Compose:
docker-compose up -d
Or build the Docker image manually:
docker build -t gogs-mcp-server .
docker run --env-file .env gogs-mcp-server
Create a .env file or set environment variables:
GOGS_SERVER_URL=https://your-gogs-server.com
GOGS_ACCESS_TOKEN=your-access-token-here
# Transport mode (optional, default: stdio)
TRANSPORT_MODE=stdio # or 'http' for HTTP/SSE transport
# HTTP server configuration (only used when TRANSPORT_MODE=http)
HTTP_PORT=3000
HTTP_HOST=0.0.0.0
The access token is optional but recommended. Without it:
The server supports two transport modes:
stdio (default): For use with MCP clients like Claude Desktop
http: For HTTP-based access with Server-Sent Events (SSE)
Add the server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"gogs": {
"command": "node",
"args": ["/absolute/path/to/gogs-mcp-server/dist/index.js"],
"env": {
"GOGS_SERVER_URL": "https://your-gogs-server.com",
"GOGS_ACCESS_TOKEN": "your-access-token-here",
"TRANSPORT_MODE": "stdio"
}
}
}
}
To run the server in HTTP mode for web applications:
Set the transport mode to HTTP in your .env file:
TRANSPORT_MODE=http
HTTP_PORT=3000
HTTP_HOST=0.0.0.0
Start the server:
npm start
The server will be available at:
http://localhost:3000/ssehttp://localhost:3000/messagehttp://localhost:3000/healthConnect your MCP client to the SSE endpoint to establish a persistent connection.
# Set environment variables in .env
TRANSPORT_MODE=http
HTTP_PORT=3000
# Run with docker-compose
docker-compose up -d
# Or run with Docker directly
docker run -p 3000:3000 \
-e GOGS_SERVER_URL=https://your-gogs-server.com \
-e GOGS_ACCESS_TOKEN=your-access-token-here \
-e TRANSPORT_MODE=http \
-e HTTP_PORT=3000 \
gogs-mcp-server:latest
The server uses stdio transport and can be integrated with any MCP-compatible client:
# Set environment variables
export GOGS_SERVER_URL=https://your-gogs-server.com
export GOGS_ACCESS_TOKEN=your-access-token-here
export TRANSPORT_MODE=stdio
# Run the server
npm start
You can use the Docker image with MCP clients by mounting it as a command:
{
"mcpServers": {
"gogs": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "GOGS_SERVER_URL=https://your-gogs-server.com",
"-e", "GOGS_ACCESS_TOKEN=your-access-token-here",
"gogs-mcp-server:latest"
]
}
}
}
Or using docker-compose:
{
"mcpServers": {
"gogs": {
"command": "docker-compose",
"args": [
"-f", "/absolute/path/to/gogs-mcp-server/docker-compose.yml",
"run",
"--rm",
"gogs-mcp-server"
]
}
}
}
get_current_userGet information about the authenticated user.
get_userGet information about a specific user.
username (string, required): Username to look upsearch_usersSearch for users by username.
query (string, required): Search querylimit (number, optional): Maximum results (default: 10)list_user_emailsList email addresses for the authenticated user. Returns all email addresses associated with your account, including their verification status and whether they are set as primary.
add_user_emailsAdd new email address(es) to the authenticated user's account.
emails (array of strings, required): Array of email addresses to adddelete_user_emailsDelete email address(es) from the authenticated user's account.
emails (array of strings, required): Array of email addresses to deletelist_user_repositoriesList repositories for a user.
username (string, optional): Username (omit for authenticated user)search_repositoriesSearch for repositories.
query (string, required): Search queryuid (number, optional): User ID to filter bylimit (number, optional): Maximum results (default: 10)page (number, optional): Page number (default: 1)get_repositoryGet information about a specific repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namecreate_repositoryCreate a new repository.
name (string, required): Repository namedescription (string, optional): Repository descriptionprivate (boolean, optional): Create as private (default: false)auto_init (boolean, optional): Initialize with README (default: false)gitignores (string, optional): Gitignore templates (e.g., "Go,VisualStudioCode")license (string, optional): License template (e.g., "MIT License")readme (string, optional): README template (default: "Default")delete_repositoryDelete a repository (requires admin access).
owner (string, required): Repository owner usernamerepo (string, required): Repository namelist_branchesList all branches in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameget_commitsGet commit history from a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namesha (string, optional): Branch name or commit SHApage (number, optional): Page number (default: 1)get_treeGet a git tree by SHA - provides low-level access to repository structure at a specific commit or tree SHA. Returns tree entries including files (blobs), directories (trees), and submodules (commits) with their modes and permissions.
owner (string, required): Repository owner usernamerepo (string, required): Repository namesha (string, required): Git tree SHA or commit SHAlist_issuesList issues in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namestate (string, optional): Filter by state - 'open', 'closed', or 'all' (default: 'open')labels (string, optional): Comma-separated list of label namespage (number, optional): Page number (default: 1)per_page (number, optional): Results per page (default: 30)get_issueGet a specific issue by number.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numbercreate_issueCreate a new issue in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository nametitle (string, required): Issue titlebody (string, optional): Issue descriptionassignee (string, optional): Username to assign the issue tomilestone (number, optional): Milestone IDlabels (array of numbers, optional): Array of label IDsupdate_issueUpdate an existing issue (including closing or reopening).
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numbertitle (string, optional): Issue titlebody (string, optional): Issue descriptionassignee (string, optional): Username to assign the issue tomilestone (number, optional): Milestone IDstate (string, optional): Issue state - 'open' or 'closed'labels (array of numbers, optional): Array of label IDslist_issue_commentsList all comments on an issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numbercreate_issue_commentAdd a comment to an issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numberbody (string, required): Comment textupdate_issue_commentEdit an existing comment on an issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namecommentId (number, required): Comment IDbody (string, required): Updated comment textlist_labelsList all labels in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameget_labelGet a specific label by ID.
owner (string, required): Repository owner usernamerepo (string, required): Repository namelabelId (number, required): Label IDcreate_labelCreate a new label in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namename (string, required): Label namecolor (string, required): 7-character hex color code with leading # (e.g., #ff0000)update_labelUpdate an existing label.
owner (string, required): Repository owner usernamerepo (string, required): Repository namelabelId (number, required): Label IDname (string, optional): Label namecolor (string, optional): 7-character hex color code with leading # (e.g., #ff0000)delete_labelDelete a label from a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namelabelId (number, required): Label IDlist_issue_labelsList all labels on a specific issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numberadd_issue_labelsAdd labels to an issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numberlabels (array of numbers, required): Array of label IDs to addremove_issue_labelRemove a specific label from an issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numberlabelId (number, required): Label ID to removereplace_issue_labelsReplace all labels on an issue with a new set.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numberlabels (array of numbers, required): Array of label IDs to set (replaces all existing labels)remove_all_issue_labelsRemove all labels from an issue.
owner (string, required): Repository owner usernamerepo (string, required): Repository namenumber (number, required): Issue numberlist_milestonesList all milestones in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameget_milestoneGet a specific milestone by ID.
owner (string, required): Repository owner usernamerepo (string, required): Repository namemilestoneId (number, required): Milestone IDcreate_milestoneCreate a new milestone in a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository nametitle (string, required): Milestone titledescription (string, optional): Milestone descriptiondue_on (string, optional): Due date in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)update_milestoneUpdate an existing milestone.
owner (string, required): Repository owner usernamerepo (string, required): Repository namemilestoneId (number, required): Milestone IDtitle (string, optional): Milestone titledescription (string, optional): Milestone descriptiondue_on (string, optional): Due date in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ)state (string, optional): Milestone state - 'open' or 'closed'delete_milestoneDelete a milestone from a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namemilestoneId (number, required): Milestone IDlist_user_organizationsList organizations for the authenticated user.
create_organizationCreate a new organization.
username (string, required): Organization username (alphanumeric, dashes, underscores)full_name (string, optional): Organization full namedescription (string, optional): Organization descriptionwebsite (string, optional): Organization websitelocation (string, optional): Organization locationlist_public_organizationsList public organizations for a specific user.
username (string, required): Username to get public organizations forget_organizationGet information about a specific organization.
orgname (string, required): Organization nameupdate_organizationUpdate an organization (requires owner permissions).
orgname (string, required): Organization namefull_name (string, optional): Organization full namedescription (string, optional): Organization descriptionwebsite (string, optional): Organization websitelocation (string, optional): Organization locationadd_organization_memberAdd or update organization membership (requires owner permissions).
orgname (string, required): Organization nameusername (string, required): Username to add as memberrole (string, required): Member role - 'admin' or 'member'list_organization_teamsList teams in an organization.
orgname (string, required): Organization namecreate_teamCreate a new team in an organization (requires admin permissions).
orgname (string, required): Organization namename (string, required): Team name (max 30 characters, alphanumeric with dashes and dots)description (string, optional): Team description (max 255 characters)permission (string, optional): Team permission level - 'read', 'write', or 'admin' (default: 'read')get_teamGet information about a specific team.
teamId (number, required): Team IDadd_team_memberAdd a user to a team (requires admin permissions).
teamId (number, required): Team IDusername (string, required): Username to add to the teamremove_team_memberRemove a user from a team (requires admin permissions).
teamId (number, required): Team IDusername (string, required): Username to remove from the teamlist_releasesList all releases for a repository. Returns release information including tag name, name, description, author, timestamps, and downloadable assets (attachments).
owner (string, required): Repository owner usernamerepo (string, required): Repository nameNote: Currently only read-only access to releases is supported. Create, update, and delete operations are not available in the Gogs API v1.
list_collaboratorsList all collaborators for a repository. Returns user information including username, full name, email, avatar URL, and their permission levels (admin, push, pull).
owner (string, required): Repository owner usernamerepo (string, required): Repository namecheck_collaboratorCheck if a user is a collaborator on a repository. Returns a boolean indicating whether the specified user has collaborator access.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameusername (string, required): Username to check for collaborator statusadd_collaboratorAdd a user as a collaborator to a repository with specified permissions.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameusername (string, required): Username to add as collaboratorpermission (string, optional): Permission level - 'read', 'write', or 'admin' (default: 'write')remove_collaboratorRemove a user's collaborator access from a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameusername (string, required): Username to remove as collaboratorlist_user_keysList all public SSH keys for a specific user. Returns key information including ID, title, key content, URL, and creation timestamp.
username (string, required): Username to list public keys forlist_my_keysList all public SSH keys for the authenticated user. Returns key information including ID, title, key content, URL, and creation timestamp.
Example response:
[
{
"id": 2,
"title": "my-laptop-key",
"key": "ssh-ed25519 AAAAC3Nza...",
"url": "https://gogs.example.com/api/v1/user/keys/2",
"created_at": "2025-10-28T11:09:29Z"
}
]
get_public_keyGet details of a specific public SSH key by ID. Returns full key information.
keyId (number, required): Public key IDcreate_public_keyCreate a new public SSH key for the authenticated user. Returns the created key with its assigned ID.
title (string, required): Key title/name for identificationkey (string, required): The public key content in SSH public key format (e.g., "ssh-ed25519 AAAA...")Example:
{
"title": "My Development Key",
"key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBf... user@hostname"
}
delete_public_keyDelete a public SSH key by ID. Only the authenticated user can delete their own keys.
keyId (number, required): Public key ID to deleteDeploy keys provide secure, repository-specific SSH access for automated deployments and CI/CD workflows. Unlike user keys, deploy keys are attached to specific repositories and can be configured as read-only or read-write.
list_deploy_keysList all deploy keys configured for a repository. Returns key information including ID, title, key content, URL, read-only status, and creation timestamp.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameExample response:
[
{
"id": 1,
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAA...",
"url": "http://gogs.example.com/api/v1/repos/myuser/myrepo/keys/1",
"title": "production-deploy",
"created_at": "2024-01-15T10:30:00Z",
"read_only": true
}
]
get_deploy_keyGet details of a specific deploy key by ID. Returns full key information for the specified deploy key.
owner (string, required): Repository owner usernamerepo (string, required): Repository namekeyId (number, required): Deploy key IDcreate_deploy_keyAdd a new deploy key to a repository. Deploy keys can be configured as read-only (default) for secure deployments or read-write for automated commits.
owner (string, required): Repository owner usernamerepo (string, required): Repository nametitle (string, required): Deploy key title/name for identificationkey (string, required): The public key content in SSH public key format (e.g., "ssh-rsa AAAA...")read_only (boolean, optional): Whether the key is read-only. Default: true. Set to false for read-write access.Example:
{
"owner": "myuser",
"repo": "myrepo",
"title": "CI/CD Pipeline",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUbm... ci-server@example.com",
"read_only": true
}
delete_deploy_keyRemove a deploy key from a repository. Requires admin access to the repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namekeyId (number, required): Deploy key ID to deletelist_hooksList all webhooks configured for a repository. Returns webhook information including ID, type, events, active status, and configuration.
owner (string, required): Repository owner usernamerepo (string, required): Repository nameExample response:
[
{
"id": 2,
"type": "gogs",
"events": ["create", "delete", "fork", "push", "issues", "pull_request", "issue_comment", "release"],
"active": true,
"config": {
"content_type": "json",
"url": "http://example.com/webhook"
},
"updated_at": "2025-10-30T20:50:16Z",
"created_at": "2025-10-28T14:45:17Z"
}
]
create_hookCreate a new webhook for a repository. Supports both Gogs and Slack webhook types with customizable event triggers.
owner (string, required): Repository owner usernamerepo (string, required): Repository nametype (string, required): Webhook type - either "gogs" or "slack"config (object, required): Webhook configuration
url (string, required): URL to send webhook payloads tocontent_type (string, required): Content type for payload - either "json" or "form"secret (string, optional): Optional secret for webhook validationchannel (string, optional): Slack channel (for slack webhooks)username (string, optional): Slack username (for slack webhooks)icon_url (string, optional): Slack icon URL (for slack webhooks)color (string, optional): Slack color (for slack webhooks)events (array, optional): Array of events that trigger the webhook. Available events: "create", "delete", "fork", "push", "issues", "issue_comment", "pull_request", "release". Default: ["push"]active (boolean, optional): Whether the webhook is active (default: false)Example:
{
"owner": "myuser",
"repo": "myrepo",
"type": "gogs",
"config": {
"url": "https://example.com/webhook",
"content_type": "json",
"secret": "mysecret"
},
"events": ["push", "issues", "pull_request"],
"active": true
}
update_hookUpdate an existing webhook's configuration, events, or active status.
owner (string, required): Repository owner usernamerepo (string, required): Repository namehookId (number, required): Webhook ID to updateconfig (object, required): Webhook configuration (same structure as create_hook)events (array, optional): Array of events that trigger the webhookactive (boolean, optional): Whether the webhook is activedelete_hookDelete a webhook from a repository.
owner (string, required): Repository owner usernamerepo (string, required): Repository namehookId (number, required): Webhook ID to deletelist_followersList all followers of a specific user. Returns an array of user objects representing followers.
username (string, required): Username to list followers forExample response:
[
{
"id": 1,
"username": "john",
"full_name": "John Doe",
"email": "john@example.com",
"avatar_url": "https://example.com/avatars/john"
}
]
list_followingList all users that a specific user is following. Returns an array of user objects.
username (string, required): Username to list following forExample response:
[
{
"id": 2,
"username": "jane",
"full_name": "Jane Smith",
"email": "jane@example.com",
"avatar_url": "https://example.com/avatars/jane"
}
]
check_followingCheck if the authenticated user is following a target user. Returns a boolean result.
username (string, required): Username to check if authenticated user is followingExample response:
{
"isFollowing": true,
"username": "john",
"message": "You are following john"
}
follow_userFollow a user. The authenticated user will follow the target user.
username (string, required): Username to followExample response:
{
"success": true,
"message": "Successfully followed user john",
"username": "john"
}
unfollow_userUnfollow a user. The authenticated user will unfollow the target user.
username (string, required): Username to unfollowExample response:
{
"success": true,
"message": "Successfully unfollowed user john",
"username": "john"
}
⚠️ WARNING: These tools require administrator privileges on the Gogs instance.
These tools provide administrative capabilities for managing users, organizations, and repositories. They can only be used with an access token that has admin permissions. Unauthorized access attempts will result in 403 Forbidden errors.
Security Considerations:
admin_create_userCreate a new user account (admin only).
source_id (number, required): Authentication source ID (use 0 for local authentication)login_name (string, required): Login name for authenticationusername (string, required): Username for the accountemail (string, required): Email addresspassword (string, required): Password for the userfull_name (string, optional): Full name of the usersend_notify (boolean, optional): Send notification email to user (default: false)Example:
{
"source_id": 0,
"login_name": "newuser",
"username": "newuser",
"email": "newuser@example.com",
"password": "securePassword123",
"full_name": "New User",
"send_notify": false
}
admin_edit_userEdit an existing user's properties (admin only).
username (string, required): Username of the user to editsource_id (number, optional): Authentication source IDlogin_name (string, optional): Login name for authenticationfull_name (string, optional): Full name of the useremail (string, optional): Email addresspassword (string, optional): New passwordwebsite (string, optional): Website URLlocation (string, optional): Locationactive (boolean, optional): Whether the account is activeadmin (boolean, optional): Whether the user is an adminallow_git_hook (boolean, optional): Allow git hooksallow_import_local (boolean, optional): Allow importing local repositoriesmax_repo_creation (number, optional): Maximum number of repositoriesprohibit_login (boolean, optional): Prohibit user loginallow_create_organization (boolean, optional): Allow creating organizationsExample:
{
"username": "existinguser",
"email": "newemail@example.com",
"active": true,
"admin": false
}
admin_delete_userDelete a user account (admin only). This is a destructive operation.
username (string, required): Username of the user to deleteExample:
{
"username": "userToDelete"
}
admin_create_user_public_keyCreate a public SSH key for a user (admin only).
username (string, required): Username to add the key totitle (string, required): Title/name for the keykey (string, required): Public key content (SSH public key)Example:
{
"username": "john",
"title": "Work Laptop",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."
}
admin_delete_user_public_keyDelete a public SSH key for a user (admin only).
username (string, required): Username to remove the key fromkey_id (number, required): ID of the public key to deleteExample:
{
"username": "john",
"key_id": 5
}
admin_create_orgCreate an organization (admin only).
username (string, required): Organization usernamefull_name (string, optional): Full name of the organizationdescription (string, optional): Organization descriptionwebsite (string, optional): Organization websitelocation (string, optional): Organization locationExample:
{
"username": "engineering-team",
"full_name": "Engineering Team",
"description": "Core engineering organization",
"website": "https://engineering.example.com",
"location": "San Francisco, CA"
}
admin_list_org_teamsList all teams in an organization (admin only).
orgname (string, required): Organization nameExample:
{
"orgname": "engineering-team"
}
admin_create_user_orgCreate an organization owned by a specific user (admin only).
username (string, required): Username who will own the organizationorg_username (string, required): Organization usernamefull_name (string, optional): Full name of the organizationdescription (string, optional): Organization descriptionwebsite (string, optional): Organization websitelocation (string, optional): Organization locationExample:
{
"username": "john",
"org_username": "johns-org",
"full_name": "John's Organization",
"description": "Personal organization for projects"
}
admin_create_user_repoCreate a repository for a specific user (admin only).
username (string, required): Username who will own the repositoryname (string, required): Repository namedescription (string, optional): Repository descriptionprivate (boolean, optional): Create as private repository (default: false)auto_init (boolean, optional): Initialize with README (default: false)gitignores (string, optional): Gitignore templates (e.g., "Go,VisualStudioCode")license (string, optional): License template (e.g., "MIT License")readme (string, optional): README template (default: "Default")Example:
{
"username": "john",
"name": "new-project",
"description": "A new project repository",
"private": false,
"auto_init": true,
"gitignores": "Go,VisualStudioCode",
"license": "MIT License",
"readme": "Default"
}
These tools allow rendering markdown text to HTML without committing files, useful for previewing documentation, issue/comment content, and building custom markdown editors.
render_markdownRender markdown text to HTML with support for GitHub Flavored Markdown (GFM) and repository context. This is the full-featured markdown rendering endpoint.
text (string, required): Markdown text to rendermode (string, optional): Rendering mode - either "gfm" (GitHub Flavored Markdown, default) or "markdown" (standard Markdown)context (string, optional): Repository context in the format "owner/repo" for repository-aware rendering (e.g., for resolving issue references like #123)Example:
{
"text": "# Hello World\n\nThis is **bold** and this is *italic*.\n\n- Item 1\n- Item 2\n\nSee issue #42 for details.",
"mode": "gfm",
"context": "myuser/myrepo"
}
Response: Returns the rendered HTML as plain text.
Use cases:
render_markdown_rawRender raw markdown text to HTML using a simpler endpoint. This is a streamlined version that takes plain text input and returns HTML.
text (string, required): Raw markdown text to render to HTMLExample:
{
"text": "# Simple Heading\n\n**Bold text** and *italic text*."
}
Response: Returns the rendered HTML as plain text.
Use cases:
The following Gogs API v1 endpoints are officially documented but not yet implemented in this MCP server. These represent potential features for future development:
| Category | Endpoint | Method | Description | Documentation |
|---|---|---|---|---|
| Team Administration | /admin/teams/:teamid/members |
GET | List all members of a team | Link |
| Team Administration | /admin/teams/:teamid/repos/:reponame |
PUT | Add or update team repository | Link |
| Team Administration | /admin/teams/:teamid/repos/:reponame |
DELETE | Remove team repository | Link |
If you'd like to help implement any of these endpoints:
src/gogs-client.ts with proper TypeScript typessrc/server.tsnpm run dev
npm run build
npm run watch
The Gogs API documentation is included in the docs-api submodule. For more information about the Gogs REST API, see:
docs-api/README.mdMake sure you've set the GOGS_SERVER_URL environment variable or included it in your MCP client configuration.
This can indicate:
MIT
Contributions are welcome! Please feel free to submit a Pull Request.