fix(agent-zero): export mcp servers without python indent errors
This commit is contained in:
@@ -276,24 +276,7 @@ spec:
|
||||
fi
|
||||
|
||||
export A0_SET_mcp_servers="$(
|
||||
python3 -c 'import json, os
|
||||
servers = {}
|
||||
chat_key = os.getenv("CHAT_MCP_API_KEY")
|
||||
if chat_key:
|
||||
servers["fc_chat"] = {
|
||||
"type": "streamable-http",
|
||||
"url": "http://chat-web.fc-chat.svc/mcp",
|
||||
"headers": {"X-Api-Key": chat_key},
|
||||
}
|
||||
if os.getenv("KNOWLEDGE_MCP_ENABLED", "false").lower() == "true":
|
||||
token = os.getenv("KNOWLEDGE_MCP_BEARER_TOKEN", "")
|
||||
if token:
|
||||
servers["fc_knowledge"] = {
|
||||
"type": "streamable-http",
|
||||
"url": os.getenv("KNOWLEDGE_MCP_URL", "http://knowledge-web.knowledge.svc/mcp"),
|
||||
"headers": {"Authorization": f"Bearer {token}"},
|
||||
}
|
||||
print(json.dumps({"mcpServers": servers}, separators=(",", ":")))'
|
||||
python3 -c 'import json, os; servers = {}; chat_key = os.getenv("CHAT_MCP_API_KEY"); knowledge_enabled = os.getenv("KNOWLEDGE_MCP_ENABLED", "false").lower() == "true"; token = os.getenv("KNOWLEDGE_MCP_BEARER_TOKEN", "") if knowledge_enabled else ""; chat_key and servers.setdefault("fc_chat", {"type": "streamable-http", "url": "http://chat-web.fc-chat.svc/mcp", "headers": {"X-Api-Key": chat_key}}); token and servers.setdefault("fc_knowledge", {"type": "streamable-http", "url": os.getenv("KNOWLEDGE_MCP_URL", "http://knowledge-web.knowledge.svc/mcp"), "headers": {"Authorization": f"Bearer {token}"}}); print(json.dumps({"mcpServers": servers}, separators=(",", ":")))'
|
||||
)"
|
||||
# Run the original entrypoint
|
||||
exec /exe/initialize.sh $BRANCH
|
||||
|
||||
Reference in New Issue
Block a user