Skip to main content
Glama

Stealthee MCP

by rainbowgore
test_fastapi.pyโ€ข3.12 kB
#!/usr/bin/env python3 """ Test script for FastAPI server endpoints """ import requests import json import time BASE_URL = "http://localhost:8000" def test_endpoint(method, endpoint, data=None, description=""): """Test a single endpoint""" url = f"{BASE_URL}{endpoint}" print(f"\n๐Ÿงช Testing {description}") print(f" {method} {endpoint}") try: if method == "GET": response = requests.get(url) elif method == "POST": response = requests.post(url, json=data) print(f" Status: {response.status_code}") if response.status_code == 200: result = response.json() if isinstance(result, dict) and "content" in result: print(f" Success: {len(result['content'])} content blocks") if result.get("isError"): print(f" โš ๏ธ Error in response: {result['content'][0].get('text', 'Unknown error')}") else: print(f" โœ… Response received successfully") else: print(f" โœ… Response: {result}") else: print(f" โŒ Error: {response.text}") except Exception as e: print(f" โŒ Exception: {e}") def main(): print("๐Ÿš€ Testing Stealth Launch Radar FastAPI Server") print("=" * 50) # Test basic endpoints test_endpoint("GET", "/health", description="Health Check") test_endpoint("GET", "/tools", description="Tools List") test_endpoint("GET", "/", description="Root Endpoint") # Test tool endpoints test_endpoint("POST", "/tools/web_search", {"query": "stealth AI startup", "num_results": 2}, "Web Search") test_endpoint("POST", "/tools/score_signal", {"signal_text": "We are launching our new AI product in stealth mode", "signal_title": "Test Signal"}, "Score Signal") test_endpoint("POST", "/tools/url_extract", {"url": "https://example.com", "parsing_type": "plain_text"}, "URL Extract") test_endpoint("POST", "/tools/search_tech_sites", {"query": "AI startup", "num_results": 2}, "Search Tech Sites") test_endpoint("POST", "/tools/parse_fields", {"html": "<html><body><h1>Test</h1><p>Pricing: $99/month</p></body></html>", "target_fields": ["pricing"]}, "Parse Fields") test_endpoint("POST", "/tools/batch_score_signals", {"signals": [{"signal_text": "Test signal 1"}, {"signal_text": "Test signal 2"}]}, "Batch Score Signals") test_endpoint("POST", "/tools/run_pipeline", {"query": "stealth startup", "num_results": 1, "target_fields": ["pricing"]}, "Run Pipeline") print("\n" + "=" * 50) print("โœ… All tests completed!") print(f"๐Ÿ“– API Documentation: {BASE_URL}/docs") print(f"๐Ÿ”ง Smithery compatible endpoints ready") if __name__ == "__main__": 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/rainbowgore/stealthee-MCP-tools'

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