grammar-inference-engine/bin/mcp-server
tobjend a1567bffbe Add bin/mcp-server wrapper script for robust path resolution
Avoids module shadowing when CWD contains another bex package.
2026-07-01 08:06:17 +02:00

15 lines
368 B
Python
Executable file

#!/usr/bin/env python3
"""Wrapper for grammar-inference MCP server.
Ensures the correct bex module is loaded regardless of CWD.
"""
import sys
import os
GIE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, GIE_DIR)
# Remove any conflicting paths
sys.path = [p for p in sys.path if p != '']
from bex.mcp_server import main
main()