We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AI-enthusiasts/crawl4ai-rag-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
run_mcp_stdio.py•793 B
#!/usr/bin/env python3
"""
Run the MCP server with stdio transport for testing.
This script overrides the .env file to force stdio transport.
"""
import os
import sys
from pathlib import Path
# Override environment variables before importing the server
os.environ["TRANSPORT"] = "stdio"
# Load other settings from .env.test
from dotenv import load_dotenv
env_test_path = Path(__file__).parent.parent / ".env.test"
load_dotenv(env_test_path)
# Force stdio transport (override what was in .env.test)
os.environ["TRANSPORT"] = "stdio"
# Now import and run the server
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
# Import after setting environment
import asyncio # noqa: E402
from crawl4ai_mcp import main # noqa: E402
if __name__ == "__main__":
asyncio.run(main())