Steve White c16f82ea38 | ||
---|---|---|
src | ||
.clinerules | ||
.env.example | ||
.gitignore | ||
README.md | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Gitea MCP Server
An MCP server that provides tools for interacting with the Gitea API.
Setup
- Clone the repository
- Install dependencies:
npm install
- Copy the example environment file:
cp .env.example .env
- Configure your environment variables in
.env
:GITEA_API_URL
: Your Gitea API URL (e.g., https://gitea.example.com/api/v1)GITEA_TOKEN
: Your Gitea API token
Building
npm run build
Available Tools
list_repositories
: List repositories for the authenticated userget_repository
: Get details about a specific repositorylist_issues
: List issues in a repositorycreate_issue
: Create a new issue in a repositorylist_pull_requests
: List pull requests in a repositorycreate_repository
: Create a new repositoryget_contents
: Get contents of a file or directory in a repositoryadd_file_to_repo
: Add a new file to a repositorycreate_branch
: Create a new branch in a repository
Tool Usage Examples
Adding a File to a Repository
{
"owner": "username",
"repo": "repository-name",
"path": "path/to/file.txt",
"content": "File content here", // or use file_text
"message": "Commit message",
"branch": "main" // optional
}
Creating a Repository
{
"name": "repository-name",
"description": "Repository description",
"private": false,
"autoInit": true
}
Error Handling
The server will throw appropriate errors if:
- Required environment variables are missing
- API requests fail
- Invalid parameters are provided
- Tool names are incorrect