Add bin/mcp-server wrapper script for robust path resolution
Avoids module shadowing when CWD contains another bex package.
This commit is contained in:
parent
adc52c99ec
commit
a1567bffbe
1 changed files with 15 additions and 0 deletions
15
bin/mcp-server
Executable file
15
bin/mcp-server
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/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()
|
||||
Loading…
Add table
Reference in a new issue