Skip to main content
Glama

MCP Platform

by jck411
dev.shโ€ข3.94 kB
#!/bin/bash # Development helper script set -e cd "$(dirname "$0")" # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color show_help() { echo -e "${BLUE}MCP Platform Development Helper${NC}" echo "" echo "Usage: ./dev.sh [command]" echo "" echo "Commands:" echo " check - Check environment and dependencies" echo " lint - Run linting with ruff" echo " format - Format code with ruff" echo " server - Run a demo FastMCP server" echo " test - Run tests (if any)" echo " shell - Open a shell with the virtual environment" echo " clean - Clean up cache and temporary files" echo " install - Install/update dependencies" echo " vscode - Configure VS Code settings" echo "" } check_env() { echo -e "${BLUE}๐Ÿ” Checking environment...${NC}" if [ ! -d ".venv" ]; then echo -e "${RED}โŒ Virtual environment not found${NC}" return 1 fi echo -e "${GREEN}โœ… Virtual environment found${NC}" echo "Python version:" uv run python --version echo "" echo "Key dependencies:" uv run python -c " try: import fastmcp print(f'โœ… FastMCP: {fastmcp.__version__}') except ImportError: print('โŒ FastMCP not found') try: import mcp print('โœ… MCP SDK: installed') except ImportError: print('โŒ MCP SDK not found') try: import pydantic print(f'โœ… Pydantic: {pydantic.__version__}') except ImportError: print('โŒ Pydantic not found') " } run_lint() { echo -e "${BLUE}๐Ÿ” Running linter...${NC}" uv run ruff check . } run_format() { echo -e "${BLUE}๐ŸŽจ Formatting code...${NC}" uv run ruff format . uv run ruff check --fix . } run_config_server() { echo -e "${BLUE}๐Ÿš€ Starting config FastMCP server...${NC}" echo "Press Ctrl+C to stop" uv run python Servers/config_server.py } run_shell() { echo -e "${BLUE}๐Ÿš Opening shell with virtual environment...${NC}" echo "Virtual environment will be activated" echo "Type 'exit' to return" source .venv/bin/activate exec bash } clean_up() { echo -e "${BLUE}๐Ÿงน Cleaning up...${NC}" find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true find . -type f -name "*.pyc" -delete 2>/dev/null || true rm -rf .pytest_cache/ 2>/dev/null || true echo -e "${GREEN}โœ… Cleanup complete${NC}" } install_deps() { echo -e "${BLUE}๐Ÿ“ฆ Installing/updating dependencies...${NC}" uv sync --extra dev } configure_vscode() { echo -e "${BLUE}๐Ÿ”ง Configuring VS Code...${NC}" mkdir -p .vscode cat > .vscode/settings.json << 'EOF' { "python.defaultInterpreterPath": "./.venv/bin/python", "python.terminal.activateEnvironment": true, "python.linting.enabled": true, "python.linting.pylintEnabled": false, "python.linting.ruffEnabled": true, "python.formatting.provider": "none", "[python]": { "editor.defaultFormatter": "charliermarsh.ruff", "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll.ruff": "explicit", "source.organizeImports.ruff": "explicit" } } } EOF echo -e "${GREEN}โœ… VS Code configured${NC}" } case "${1:-help}" in check) check_env ;; lint) run_lint ;; format) run_format ;; server) run_config_server ;; test) echo -e "${YELLOW}โš ๏ธ No tests configured yet${NC}" ;; shell) run_shell ;; clean) clean_up ;; install) install_deps ;; vscode) configure_vscode ;; help|--help|-h) show_help ;; *) echo -e "${RED}โŒ Unknown command: $1${NC}" show_help exit 1 ;; esac

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jck411/MCP_BACKEND_OPENROUTER'

If you have feedback or need assistance with the MCP directory API, please join our Discord server