We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/araxiaonline/mysql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
init.sh•1.12 kB
#!/bin/bash
# Initialize/test connection to the MySQL MCP server
CONTAINER_NAME="${MCP_CONTAINER:-mysql-mcp}"
echo "Checking MySQL MCP server status..."
# Check if container is running
if ! docker ps --format '{{.Names}}' | grep -q "^${CONTAINER_NAME}$"; then
echo "Error: Container '${CONTAINER_NAME}' is not running."
echo "Start it with: docker-compose up -d"
exit 1
fi
echo "Container '${CONTAINER_NAME}' is running."
# Test by listing connections
echo ""
echo "Testing MCP server by listing connections..."
docker exec -i "${CONTAINER_NAME}" python -c '
import asyncio
import sys
sys.path.insert(0, "/app/src")
from server import conn_manager
async def main():
connections = conn_manager.list_connections()
print(f"Found {len(connections)} connection(s)")
for conn in connections:
print(f" - {conn[\"name\"]}: {conn[\"user\"]}@{conn[\"host\"]}:{conn[\"port\"]}/{conn.get(\"database\", \"(no db)\")}")
asyncio.run(main())
'
if [ $? -eq 0 ]; then
echo ""
echo "MCP server is ready!"
else
echo ""
echo "Error: Failed to communicate with MCP server."
exit 1
fi