BREAKING CHANGE: All binary paths must now be explicitly configured. Changes to code: - Added docker_binary_path setting to GiteaContextServerSettings - Updated find_docker_binary() to require explicit docker path - Clear error messages with platform-specific examples - Consistent approach: no auto-detection for any binaries Changes to documentation: - Updated README.md with docker_binary_path requirement - Rewrote default_settings.jsonc with explicit configuration examples - Shortened installation_instructions.md to fit Zed UI - Added 'which' command instructions to find binary paths - Documented common paths for macOS, Linux, Windows - Explained WASM limitations clearly Why this approach: - WASM cannot access PATH reliably (especially on macOS) - WASM cannot detect host OS - WASM cannot check file existence - Explicit configuration is reliable and works everywhere - Users have full control over which binaries are used - Configuration is done once and works consistently This completes the simplification: ✅ No auto-detection attempts ✅ Clear, actionable error messages ✅ Comprehensive documentation ✅ Works reliably on Linux, macOS, and Windows ✅ Tested on Linux x86_64 and macOS M4
105 lines
3.9 KiB
JSON
105 lines
3.9 KiB
JSON
{
|
|
// ============================================================================
|
|
// REQUIRED SETTINGS
|
|
// ============================================================================
|
|
|
|
// Required: Your Gitea personal access token
|
|
// Generated in Gitea at: Settings > Applications > Generate New Token
|
|
// This token is used to authenticate with your Gitea instance
|
|
"gitea_access_token": "YOUR_GITEA_TOKEN",
|
|
|
|
// ============================================================================
|
|
// BINARY CONFIGURATION (Choose ONE option)
|
|
// ============================================================================
|
|
|
|
// Option 1: Local Binary Path
|
|
// Required if not using Docker
|
|
// Specify the full path to the gitea-mcp binary on your system
|
|
//
|
|
// Find your binary path with:
|
|
// macOS/Linux: which gitea-mcp-server (or: which gitea-mcp)
|
|
// Windows: where gitea-mcp.exe
|
|
//
|
|
// Common paths:
|
|
// macOS (Homebrew): "/opt/homebrew/bin/gitea-mcp-server"
|
|
// macOS (Intel): "/usr/local/bin/gitea-mcp-server"
|
|
// Linux: "/usr/local/bin/gitea-mcp"
|
|
// Windows: "C:\\Program Files\\gitea-mcp\\gitea-mcp.exe"
|
|
//
|
|
"gitea_mcp_binary_path": "/opt/homebrew/bin/gitea-mcp-server",
|
|
|
|
// Option 2: Docker Mode
|
|
// Use Docker to run gitea-mcp in a container
|
|
// Requires Docker to be installed and running
|
|
//
|
|
// When using Docker, you must also specify docker_binary_path below
|
|
//
|
|
// "use_docker": true,
|
|
|
|
// ============================================================================
|
|
// DOCKER CONFIGURATION (Only if use_docker is true)
|
|
// ============================================================================
|
|
|
|
// Required when use_docker is true
|
|
// Full path to the docker binary
|
|
//
|
|
// Find your docker path with:
|
|
// macOS/Linux: which docker
|
|
//
|
|
// Common paths:
|
|
// Linux: "/usr/bin/docker"
|
|
// macOS: "/usr/local/bin/docker"
|
|
// "/Applications/Docker.app/Contents/Resources/bin/docker"
|
|
//
|
|
// "docker_binary_path": "/usr/bin/docker",
|
|
|
|
// Optional: Docker image to use for gitea-mcp
|
|
// Only used if use_docker is true
|
|
// Default: "gitea/gitea-mcp-server:latest"
|
|
//
|
|
// Examples:
|
|
// - "gitea/gitea-mcp-server:v1.0.0" (specific version)
|
|
// - "my-registry.com/gitea-mcp-server:custom" (custom registry)
|
|
//
|
|
// "docker_image": "gitea/gitea-mcp-server:latest",
|
|
|
|
// ============================================================================
|
|
// GITEA INSTANCE CONFIGURATION
|
|
// ============================================================================
|
|
|
|
// Optional: URL of your Gitea instance (for self-hosted Gitea)
|
|
// Leave commented out to use the default public Gitea instance
|
|
//
|
|
// Examples:
|
|
// - "https://git.example.com"
|
|
// - "https://gitea.internal.company.com"
|
|
// - "http://localhost:3000" (for local development)
|
|
//
|
|
// "gitea_host": "https://your-gitea-instance.com",
|
|
|
|
// Optional: Allow insecure/self-signed certificates
|
|
// Set to true ONLY if using self-signed certificates
|
|
//
|
|
// Security warning: This disables certificate verification
|
|
// Only use this for trusted internal servers
|
|
//
|
|
// "gitea_insecure": false
|
|
|
|
// ============================================================================
|
|
// IMPORTANT NOTES
|
|
// ============================================================================
|
|
//
|
|
// Why explicit paths are required:
|
|
// This extension runs in a WebAssembly (WASM) sandbox which cannot:
|
|
// - Access PATH environment variable reliably
|
|
// - Detect the host operating system
|
|
// - Check if files exist on the filesystem
|
|
// - Auto-discover binary locations
|
|
//
|
|
// Therefore, you MUST explicitly configure either:
|
|
// 1. gitea_mcp_binary_path (for local binary), OR
|
|
// 2. use_docker: true + docker_binary_path (for Docker mode)
|
|
//
|
|
// ============================================================================
|
|
}
|