在Termux中运行完整的模型上下文协议(MCP)服务器,暴露Read、Bash、Grep、glob工具,供本地Ollama模型使用。隐私优先,支持离线,体积约10MB。
Run a full MCP server in Termux that exposes the same tools as Amp but for local AI models via Ollama.
The Model Context Protocol is the standard for AI tool integration. This server implements it locally, so your Ollama models can:
bash
# Install dependencies
pnpm install
# Setup server
bash scripts/setup.sh
# Start MCP server
mcp-start
# Verify health
mcp-health
# Connect Ollama model
ollama run llama3.2 --mcp-server http://localhost:8080
json
{
"server": {
"port": 8080,
"transport": "http",
"sandbox": "~/.openclaw/mcp-sandbox"
},
"tools": {
"read": true,
"bash": true,
"grep": true,
"glob": true
},
"security": {
"allowedPaths": ["~/projects", "~/.openclaw"],
"forbiddenCommands": ["rm -rf", "dd", "mkfs"]
}
}
Email: support@cod3black.agency