__init__.py•1.19 kB
"""
UseKeen MCP Server - Package Documentation Search
This package provides an MCP server for the UseKeen Package Documentation Search API,
enabling Claude and other AI assistants to search for documentation of packages and services.
"""
import os
import sys
import logging
from typing import Optional
from .server import start_server
# Configure logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.StreamHandler(sys.stderr)]
)
logger = logging.getLogger("usekeen_mcp")
def main() -> None:
"""
Main entry point for the UseKeen MCP server.
This function checks for the required API key environment variable,
then starts the MCP server with the appropriate configuration.
Returns:
None
"""
# Get API key from environment
api_key = os.environ.get("USEKEEN_API_KEY")
if not api_key:
logger.error("Please set USEKEEN_API_KEY environment variable")
sys.exit(1)
logger.info("Starting UseKeen Documentation MCP Server...")
# Start the server
start_server(api_key)
if __name__ == "__main__":
main()