Skip to main content
Glama

Skulabs MCP Server

test_skulabs_client.py•3.72 kB
""" Test script for Skulabs MCP Server Run this to test the API connection and basic functionality """ import asyncio import os import json from dotenv import load_dotenv from skulabs_client import SkulabsClient, SkulabsAPIError # Load environment variables load_dotenv() async def test_skulabs_connection(): """Test basic connection to Skulabs API""" api_key = os.getenv("SKULABS_API_KEY") if not api_key: print("āŒ SKULABS_API_KEY not found in environment variables") print("Please set your Skulabs API key in .env file") return False print("šŸ”— Testing Skulabs API connection...") try: async with SkulabsClient(api_key) as client: # Test basic API connectivity print("šŸ“¦ Testing inventory retrieval...") inventory = await client.get_inventory(limit=5) print(f"āœ… Successfully retrieved {len(inventory.get('items', []))} inventory items") print("šŸ“‹ Testing products retrieval...") products = await client.get_products(limit=5) print(f"āœ… Successfully retrieved {len(products.get('items', []))} products") print("šŸ“Š Testing inventory summary...") summary = await client.get_inventory_summary() print("āœ… Successfully retrieved inventory summary") print("\nšŸŽ‰ All tests passed! Your Skulabs MCP server is ready to deploy.") return True except SkulabsAPIError as e: print(f"āŒ Skulabs API Error: {e}") print("Please check your API key and ensure it has proper permissions") return False except Exception as e: print(f"āŒ Unexpected error: {e}") return False async def test_mcp_tools(): """Test MCP tool definitions""" print("\nšŸ”§ Testing MCP tool definitions...") try: from skulabs_mcp_server import server import asyncio # Test listing tools tools = await server.list_tools() print(f"āœ… Successfully defined {len(tools)} MCP tools:") for tool in tools: print(f" - {tool.name}: {tool.description}") return True except Exception as e: print(f"āŒ Error testing MCP tools: {e}") return False def check_environment(): """Check if environment is properly configured""" print("šŸ” Checking environment configuration...") required_vars = ["SKULABS_API_KEY"] missing_vars = [] for var in required_vars: if not os.getenv(var): missing_vars.append(var) if missing_vars: print(f"āŒ Missing required environment variables: {', '.join(missing_vars)}") print("Please set these in your .env file") return False print("āœ… Environment variables configured") return True async def main(): """Run all tests""" print("šŸš€ Skulabs MCP Server Test Suite") print("=" * 40) # Check environment if not check_environment(): return # Test API connection api_ok = await test_skulabs_connection() # Test MCP tools mcp_ok = await test_mcp_tools() print("\n" + "=" * 40) if api_ok and mcp_ok: print("šŸŽ‰ All tests passed! Your MCP server is ready.") print("\nNext steps:") print("1. Deploy to Railway: git push") print("2. Set environment variables in Railway dashboard") print("3. Connect your AI agent to the Railway URL") else: print("āŒ Some tests failed. Please fix the issues above.") if __name__ == "__main__": asyncio.run(main())

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/tindevelopers/skulabs-mcp'

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