Skip to main content
Glama
build.py705 B
#!/usr/bin/env python3 """Build script to inline ./prepare_env.py into mcp_run_python/deno/prepareEnvCode.ts""" from pathlib import Path this_dir = Path(__file__).parent root_dir = this_dir.parent # Define source and destination paths src = this_dir / 'prepare_env.py' dst = root_dir / 'mcp_run_python' / 'deno' / 'src' / 'prepareEnvCode.ts' python_code = src.read_text() # Escape backslashes for JavaScript string literal python_code = python_code.replace('\\', '\\\\') # Create the JavaScript/TypeScript code ts_code = f"""// DO NOT EDIT THIS FILE DIRECTLY, INSTEAD RUN "make build" export const preparePythonCode = `{python_code}` """ dst.write_text(ts_code) print(f'Successfully built {dst}')

Latest Blog Posts

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/pydantic/mcp-run-python'

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