Skip to main content
Glama
server.py1.49 kB
"""Main MCP server for Turbify Store integration.""" import logging from mcp.server.fastmcp import FastMCP from turbify_mcp.utils.config import validate_environment from turbify_mcp.tools.catalog_tools import register_catalog_tools from turbify_mcp.resources.documentation import register_documentation_resources # Initialize FastMCP server mcp = FastMCP("Turbify Store MCP Server") # Set up logging logging.basicConfig(level=logging.INFO) # Initialize logger logger = logging.getLogger(__name__) def setup_server(): """Set up the MCP server with tools and resources.""" # Validate environment configuration try: validate_environment() except ValueError as e: logger.error(f"Configuration error: {e}") logger.error("Please set the required environment variables:") logger.error(" TURBIFY_STORE_ID - Your Turbify Store ID") logger.error(" TURBIFY_CONTRACT_TOKEN - Your contract token") return False # Register all tools register_catalog_tools(mcp) # Register resources register_documentation_resources(mcp) return True def main(): """Main entry point for the MCP server.""" logger.info("Starting Turbify Store MCP Server...") if not setup_server(): logger.error("Server setup failed. Exiting.") return logger.info("Server configured successfully. Starting MCP server...") mcp.run(transport='stdio') if __name__ == "__main__": main()

Implementation Reference

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/benpeke/turbify_store_mcp'

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