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
"""
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())