mcp-server-tools

FranckDubray/mcp-server-tools

3.2

If you are the rightful owner of mcp-server-tools and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Server Tools provide a comprehensive server environment with integrated Git/GitHub, FileSystem management, and a web control interface.

Tools
5
Resources
0
Prompts
0

🔧 MCP Server Tools

Serveur MCP (Model Context Protocol) complet avec outils Git/GitHub, FileSystem et interface de contrĂŽle web.

✹ FonctionnalitĂ©s

  • 🐙 Git & GitHub : OpĂ©rations locales (clone, commit, push, pull) + API GitHub (repos, users)
  • 📁 FileSystem : Gestion complĂšte des fichiers avec workspace intelligent
  • 🎛 Interface Web : Dashboard de contrĂŽle avec exĂ©cution des outils en temps rĂ©el
  • 🔌 Architecture modulaire : Ajout facile de nouveaux outils
  • 🔄 Hot Reload : Rechargement automatique des outils

🚀 Installation rapide

# Cloner le repository
git clone https://github.com/FranckDubray/mcp-server-tools.git
cd mcp-server-tools

# Installer les dépendances
pip install -e .

# Lancer en mode développement
./scripts/dev.sh  # Linux/Mac
# ou
./scripts/dev.ps1  # Windows

🎯 Usage

Interface Web

Accédez à http://localhost:8000/control pour l'interface de contrÎle complÚte.

API Endpoints

  • GET /tools - Liste des outils disponibles
  • POST /execute - ExĂ©cution d'un outil
  • GET /control - Interface web de contrĂŽle

🛠 Outils disponibles

Git & GitHub (git_github)

  • Git Local : clone, status, add, commit, push, pull, branch, checkout, log, diff
  • GitHub API : create_repo, get_user, list_repos
  • Authentification : Variable d'environnement GITHUB_TOKEN

FileSystem (FileSystemNG)

  • Gestion de workspace (limite 500KB)
  • OpĂ©rations : load_file, writeFile, list, search, createDirectory
  • Support PDF avec sĂ©lection de pages

Calculs

  • add : Addition de deux nombres
  • multiply : Multiplication
  • square : Puissance au carrĂ©

⚙ Configuration

Variables d'environnement :

  • MCP_HOST=127.0.0.1 (par dĂ©faut)
  • MCP_PORT=8000 (par dĂ©faut)
  • LOG_LEVEL=INFO
  • GITHUB_TOKEN (requis pour GitHub API)
  • RELOAD=1 (rechargement automatique)

🏗 Architecture

src/add_mcp_server/
├── server.py          # Serveur principal FastAPI
├── __init__.py
└── tools/             # Outils modulaires
    ├── __init__.py
    ├── git_github.py   # Git + GitHub
    ├── add.py          # Addition
    ├── multiply.py     # Multiplication
    └── square.py       # Puissance

🔄 DĂ©veloppement

Ajouter un nouvel outil

  1. Créer tools/mon_outil.py :
def run(param1: str, param2: int):
    """Fonction principale de l'outil"""
    return {"result": f"Traité {param1} avec {param2}"}

def spec():
    """Spécification OpenAI/Anthropic"""
    return {
        "type": "function", 
        "function": {
            "name": "mon_outil",
            "description": "Description de mon outil",
            "parameters": {
                "type": "object",
                "properties": {
                    "param1": {"type": "string"},
                    "param2": {"type": "number"}
                },
                "required": ["param1", "param2"]
            }
        }
    }
  1. RedĂ©marrer le serveur → l'outil est automatiquement dĂ©couvert !

Hot Reload

  • Modification d'un outil → rechargement automatique
  • GET /tools?reload=1 → rechargement forcĂ©
  • Variable RELOAD=1 → rechargement continu

📋 Points techniques

  • DĂ©couverte automatique : Utilise pkgutil.iter_modules()
  • ETag : Cache intelligent pour /tools
  • CORS : Support complet pour interface web
  • Timeout : 30s par dĂ©faut pour l'exĂ©cution
  • Validation : Pydantic pour les requĂȘtes

🎛 Interface de contrîle

L'interface web (/control) permet :

  • ✅ Visualisation de tous les outils
  • ⚡ ExĂ©cution en temps rĂ©el
  • 📝 Formulaires dynamiques avec validation
  • 🔄 Rechargement avec prĂ©servation des valeurs
  • 📊 Affichage des rĂ©sultats formatĂ©s

đŸ€ Contribution

  1. Fork du projet
  2. Branche feature (git checkout -b feature/nouvel-outil)
  3. Commit (git commit -am 'Ajout nouvel outil')
  4. Push (git push origin feature/nouvel-outil)
  5. Pull Request

📝 License

MIT - Voir le fichier LICENSE

📚 Documentation complùte

Consultez mcp_server_min_playbook.md pour le guide complet de développement.