chore: import upstream snapshot with attribution
Test Vector Database Adaptors / Test MCP Vector DB Tools (push) Has been cancelled
Tests / Code Quality (Ruff & Mypy) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.12) (push) Has been cancelled
Tests / Tests (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers CLI - Convert documentation to AI skills dockerfile:Dockerfile name:skill-seekers]) (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers MCP Server - 25 tools for AI assistants dockerfile:Dockerfile.mcp name:skill-seekers-mcp]) (push) Has been cancelled
Docker Publish / Test Docker Images (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / Serial / Integration / E2E Tests (push) Has been cancelled
Tests / MCP Server Tests (push) Has been cancelled
Test Vector Database Adaptors / Test chroma Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test faiss Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test qdrant Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test weaviate Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test MCP Vector DB Tools (push) Has been cancelled
Tests / Code Quality (Ruff & Mypy) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.12) (push) Has been cancelled
Tests / Tests (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers CLI - Convert documentation to AI skills dockerfile:Dockerfile name:skill-seekers]) (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers MCP Server - 25 tools for AI assistants dockerfile:Dockerfile.mcp name:skill-seekers-mcp]) (push) Has been cancelled
Docker Publish / Test Docker Images (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / Serial / Integration / E2E Tests (push) Has been cancelled
Tests / MCP Server Tests (push) Has been cancelled
Test Vector Database Adaptors / Test chroma Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test faiss Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test qdrant Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test weaviate Adaptor (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Manual test script for HTTP transport.
|
||||
|
||||
This script starts the MCP server in HTTP mode and tests the endpoints.
|
||||
|
||||
Usage:
|
||||
python examples/test_http_server.py
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
async def test_http_server():
|
||||
"""Test the HTTP server."""
|
||||
print("=" * 60)
|
||||
print("Testing Skill Seeker MCP Server - HTTP Transport")
|
||||
print("=" * 60)
|
||||
print()
|
||||
|
||||
# Start the server in the background
|
||||
print("1. Starting HTTP server on port 8765...")
|
||||
server_process = subprocess.Popen(
|
||||
[
|
||||
sys.executable,
|
||||
"-m",
|
||||
"skill_seekers.mcp.server_fastmcp",
|
||||
"--http",
|
||||
"--port",
|
||||
"8765",
|
||||
],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
)
|
||||
|
||||
# Wait for server to start
|
||||
print("2. Waiting for server to start...")
|
||||
time.sleep(3)
|
||||
|
||||
try:
|
||||
# Test health endpoint
|
||||
print("3. Testing health check endpoint...")
|
||||
response = requests.get("http://127.0.0.1:8765/health", timeout=5)
|
||||
if response.status_code == 200:
|
||||
print(" ✓ Health check passed")
|
||||
print(f" Response: {response.json()}")
|
||||
else:
|
||||
print(f" ✗ Health check failed: {response.status_code}")
|
||||
return False
|
||||
|
||||
print()
|
||||
print("4. Testing SSE endpoint availability...")
|
||||
# Just check if the endpoint exists (full SSE testing requires MCP client)
|
||||
try:
|
||||
response = requests.get("http://127.0.0.1:8765/sse", timeout=5, stream=True)
|
||||
print(f" ✓ SSE endpoint is available (status: {response.status_code})")
|
||||
except Exception as e:
|
||||
print(f" ℹ SSE endpoint response: {e}")
|
||||
print(" (This is expected - full SSE testing requires MCP client)")
|
||||
|
||||
print()
|
||||
print("=" * 60)
|
||||
print("✓ All HTTP transport tests passed!")
|
||||
print("=" * 60)
|
||||
print()
|
||||
print("Server Configuration for Claude Desktop:")
|
||||
print("{")
|
||||
print(' "mcpServers": {')
|
||||
print(' "skill-seeker": {')
|
||||
print(' "url": "http://127.0.0.1:8765/sse"')
|
||||
print(" }")
|
||||
print(" }")
|
||||
print("}")
|
||||
print()
|
||||
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
print(f"✗ Test failed: {e}")
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
return False
|
||||
|
||||
finally:
|
||||
# Stop the server
|
||||
print("5. Stopping server...")
|
||||
server_process.terminate()
|
||||
try:
|
||||
server_process.wait(timeout=5)
|
||||
except subprocess.TimeoutExpired:
|
||||
server_process.kill()
|
||||
print(" ✓ Server stopped")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
result = asyncio.run(test_http_server())
|
||||
sys.exit(0 if result else 1)
|
||||
Reference in New Issue
Block a user