-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-server.ps1
More file actions
30 lines (23 loc) · 943 Bytes
/
test-server.ps1
File metadata and controls
30 lines (23 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env pwsh
# Simple test script to verify MCP server functionality
# This sends a basic JSON-RPC message to test the server
Write-Host "Testing ThinkMCP Server..."
Write-Host "=========================="
# Start the server in background
$serverProcess = Start-Process -FilePath "dotnet" -ArgumentList "run", "--project", "ThinkMCP.csproj" -WorkingDirectory "." -PassThru -NoNewWindow
Start-Sleep -Seconds 2
Write-Host "Server process started with PID: $($serverProcess.Id)"
# Test basic connectivity by checking if the server is still running
if ($serverProcess.HasExited) {
Write-Host "❌ Server exited immediately. Check the logs for errors."
exit 1
} else {
Write-Host "✓ Server is running"
}
# Clean up
$serverProcess.Kill()
Write-Host "✓ Server stopped"
Write-Host ""
Write-Host "To test the server properly, use an MCP client or run the test client:"
Write-Host " cd examples"
Write-Host " dotnet run"