# MCP Gitea Search A Model Context Protocol (MCP) server for searching files and content across Gitea repositories. ## Installation ```bash npm install ``` ## Configuration Set environment variables: ```bash export GITEA_URL="http://your-gitea-server:3000" export GITEA_TOKEN="your-api-token" ``` Or configure in Claude Code's `~/.claude/settings.json`: ```json { "mcpServers": { "gitea": { "command": "node", "args": ["/path/to/mcp-gitea-search/index.js"], "env": { "GITEA_URL": "http://your-gitea-server:3000", "GITEA_TOKEN": "your-api-token" } } } } ``` ## Available Tools | Tool | Description | |------|-------------| | `gitea_list_repos` | List all accessible repositories | | `gitea_search_files` | Search files by name pattern (regex) | | `gitea_search_content` | Search within file contents | | `gitea_get_file` | Get contents of a specific file | | `gitea_repo_info` | Get repository details | | `gitea_list_files` | List all files in a repo | ## Usage Examples After configuring in Claude Code: - "Search my Gitea for all .csproj files" - "Find files containing 'ConnectionString' across all repos" - "Get the contents of peter/myrepo/appsettings.json" ## Creating a Gitea API Token 1. Go to Settings → Applications in your Gitea instance 2. Generate a new token with `read:repository` scope 3. Copy the token (shown only once)