Add official Gitea MCP server to base image
Install gitea-mcp v1.1.0 (Go binary from gitea.com/gitea/gitea-mcp)
using the same multi-arch pattern as gosu/fzf/bat. Provides 50+ MCP
tools for Gitea API — repos, issues, PRs, releases, branches, wiki,
and Actions.
Disabled by default in auto-generated opencode.json (requires
GITEA_ACCESS_TOKEN and GITEA_HOST to be useful). Users enable it by
setting those env vars in .env and flipping enabled to true in their
opencode.json.
Env vars forwarded into the container via docker-compose.yml and
docker-compose.shared.yml environment blocks. Same {env:VAR} pattern
as the GitHub MCP server.
Docs updated: README.md (new Gitea MCP section with setup steps),
DOCKER_HUB.md (tools list), CHANGELOG.md (v1.14.28b entry).
This commit is contained in:
+21
-9
@@ -93,21 +93,33 @@ EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add MemPalace MCP server if mempalace is installed
|
||||
if command -v mempalace &>/dev/null && command -v python3 &>/dev/null; then
|
||||
# Use python3 to merge the mcp block into the existing JSON
|
||||
# Add MCP servers for installed tools
|
||||
if command -v python3 &>/dev/null; then
|
||||
python3 -c "
|
||||
import json, sys
|
||||
import json, shutil
|
||||
with open('$CONFIG_FILE') as f:
|
||||
config = json.load(f)
|
||||
config.setdefault('mcp', {})['mempalace'] = {
|
||||
'type': 'local',
|
||||
'command': ['python3', '-m', 'mempalace.mcp_server']
|
||||
}
|
||||
mcp = config.setdefault('mcp', {})
|
||||
|
||||
# MemPalace — local AI memory (if installed)
|
||||
if shutil.which('mempalace'):
|
||||
mcp['mempalace'] = {
|
||||
'type': 'local',
|
||||
'command': ['python3', '-m', 'mempalace.mcp_server']
|
||||
}
|
||||
|
||||
# Gitea — self-hosted Git forge API (if installed)
|
||||
if shutil.which('gitea-mcp'):
|
||||
mcp['gitea'] = {
|
||||
'type': 'local',
|
||||
'command': ['gitea-mcp', '-t', 'stdio'],
|
||||
'enabled': False
|
||||
}
|
||||
|
||||
with open('$CONFIG_FILE', 'w') as f:
|
||||
json.dump(config, f, indent=2)
|
||||
f.write('\n')
|
||||
" 2>/dev/null && echo "MemPalace MCP server added to opencode config."
|
||||
" 2>/dev/null && echo "MCP servers registered in opencode config."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user