Skip to main content
Glama
__main__.py1.09 kB
"""Main entry point for the Whissle MCP server.""" import os import sys from pathlib import Path from dotenv import load_dotenv def get_python_path(): return sys.executable def generate_config(auth_token: str | None = None): module_dir = Path(__file__).resolve().parent server_path = module_dir / "server.py" python_path = get_python_path() final_auth_token = auth_token or os.environ.get("WHISSLE_AUTH_TOKEN") if not final_auth_token: print("Error: Whissle auth token is required.") print("Please either:") print(" 1. Pass the auth token using --auth-token argument, or") print(" 2. Set the WHISSLE_AUTH_TOKEN environment variable, or") print(" 3. Add WHISSLE_AUTH_TOKEN to your .env file") sys.exit(1) config = { "mcpServers": { "Whissle": { "command": python_path, "args": [ str(server_path), ], "env": {"WHISSLE_AUTH_TOKEN": final_auth_token}, } } } return config

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/WhissleAI/whissle-mcp'

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