Skip to main content
Glama

Document Automation MCP Server

run_server.py1.01 kB
#!/usr/bin/env python3 """ Server runner script that bypasses UV and runs directly. This script ensures the MCP server runs with the correct Python environment. """ import os import sys import subprocess from pathlib import Path # Get the absolute path to this script's directory script_dir = Path(__file__).parent.absolute() # Set up the environment env = os.environ.copy() env['PYTHONPATH'] = str(script_dir) env['PATH'] = '/home/vedan/.local/bin:' + env.get('PATH', '') # Path to the actual server server_script = script_dir / 'src' / 'server.py' # Arguments to pass args = [sys.executable, str(server_script)] + sys.argv[1:] print(f"[DEBUG] Running: {' '.join(args)}", file=sys.stderr) print(f"[DEBUG] PYTHONPATH: {env.get('PYTHONPATH')}", file=sys.stderr) print(f"[DEBUG] Python executable: {sys.executable}", file=sys.stderr) # Execute the server try: os.execvpe(sys.executable, args, env) except Exception as e: print(f"[ERROR] Failed to start server: {e}", file=sys.stderr) sys.exit(1)

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/vedantparmar12/Document-Automation'

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