npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@arthurfranckpat/sage-x3-mcp

v1.2.0

Published

MCP Server pour base de connaissance Sage X3 - Accès aux tables, champs et menus locaux

Readme

@arthurfranckpat/sage-x3-mcp

🚀 Serveur MCP (Model Context Protocol) pour base de connaissance Sage X3

Permet à Claude et autres LLM d'accéder à une base de connaissance Sage X3 complète avec 1,888 tables, 47,367 champs et 608 menus locaux.

📦 Installation

Utilisation avec npx (recommandé)

# Mode stdio pour Claude Desktop
npx @arthurfranckpat/sage-x3-mcp

# Mode serveur HTTP
npx @arthurfranckpat/sage-x3-mcp server --port 3000

Installation globale

npm install -g @arthurfranckpat/sage-x3-mcp

# Puis utiliser
sage-x3-mcp
sage-x3-mcp server

🚀 Utilisation

Mode 1 : Stdio (Claude Desktop)

Pour une utilisation avec Claude Desktop en local :

Configuration claude_desktop_config.json :

{
  "mcpServers": {
    "sage-x3": {
      "command": "npx",
      "args": ["@arthurfranckpat/sage-x3-mcp"],
      "env": {
        "SAGE_DATA_PATH": "/path/to/your/sage_x3_knowledge_base"
      }
    }
  }
}

Localisation du fichier :

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Mode 2 : Serveur HTTP/SSE

Pour un accès distant ou via un serveur web :

# Démarrer le serveur
npx @arthurfranckpat/sage-x3-mcp server --port 3000 --host 0.0.0.0

# Ou avec données personnalisées
npx @arthurfranckpat/sage-x3-mcp server --data-path /path/to/data

Configuration Claude Desktop (HTTP) :

{
  "mcpServers": {
    "sage-x3": {
      "url": "http://localhost:3000/sse"
    }
  }
}

Endpoints disponibles :

  • GET / - Informations serveur
  • GET /health - Health check
  • GET /sse - Server-Sent Events (MCP)
  • GET /tools - Liste des outils
  • GET /resources - Liste des ressources
  • POST /call-tool - Exécuter un outil

🛠️ Outils MCP

1. search_tables

Recherche des tables par nom ou mot-clé

{
  "name": "search_tables",
  "arguments": {
    "query": "SORDER"
  }
}

2. get_table_details

Obtient tous les champs d'une table

{
  "name": "get_table_details",
  "arguments": {
    "table_name": "SORDER"
  }
}

3. search_menus

Recherche des menus locaux (enums)

{
  "name": "search_menus",
  "arguments": {
    "query": "statut"
  }
}

4. get_menu_values

Obtient les valeurs d'un menu local

{
  "name": "get_menu_values",
  "arguments": {
    "menu_number": 415
  }
}

5. validate_sql_conventions

Vérifie qu'une requête SQL respecte les conventions Sage X3

6. get_table_relations

Trouve les relations d'une table avec d'autres tables

📚 Ressources disponibles

  • guide://00_GUIDE_LLM - Guide de génération SQL
  • guide://01_GLOSSAIRE - Conventions Sage X3
  • guide://03_RELATIONS - Relations entre tables

⚙️ Configuration

Variables d'environnement

  • SAGE_DATA_PATH : Chemin vers les données Sage X3 (requis)

Options CLI

sage-x3-mcp [mode] [options]

Modes:
  stdio         Mode stdio pour Claude Desktop (défaut)
  server        Mode serveur HTTP/SSE

Options:
  --port        Port du serveur HTTP (défaut: 3000)
  --host        Host du serveur (défaut: 0.0.0.0)
  --data-path   Chemin vers les données
  --help, -h    Affiche l'aide

📊 Données accessibles

  • 1,888 tables de votre ERP Sage X3
  • 47,367 champs avec types et descriptions
  • 608 menus locaux avec 3,127 valeurs d'enums
  • Guides complets pour génération SQL

🧪 Test

# Tester le serveur HTTP
npm test

# Ou manuellement
curl http://localhost:3000/health

📖 Exemples

Rechercher des tables

# Avec curl
curl -X POST http://localhost:3000/call-tool \
  -H "Content-Type: application/json" \
  -d '{"name":"search_tables","arguments":{"query":"SORDER"}}'

Obtenir détails d'une table

curl -X POST http://localhost:3000/call-tool \
  -H "Content-Type: application/json" \
  -d '{"name":"get_table_details","arguments":{"table_name":"SORDER"}}'

🔧 Dépendances

Python :

  • Python 3.10+
  • mcp >= 0.9.0
  • fastapi >= 0.104.0 (mode serveur)
  • uvicorn >= 0.24.0 (mode serveur)
  • sse-starlette >= 1.8.0 (mode serveur)

Node.js :

  • Node.js 16+

🐛 Dépannage

Erreur "SAGE_DATA_PATH non trouvé"

Assurez-vous de définir la variable d'environnement :

export SAGE_DATA_PATH=/chemin/vers/sage_x3_knowledge_base

Erreur "Python dependencies not installed"

cd node_modules/@arthurfranckpat/sage-x3-mcp
pip install -r requirements.txt

Le serveur ne démarre pas

Vérifiez que Python 3 est installé :

python3 --version

📄 License

MIT

🔗 Liens

👤 Auteur

Arthur Franck-Pat


Note : Ce package nécessite des données Sage X3 pour fonctionner. Consultez la documentation pour créer votre base de connaissance.