-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathserver.sh
More file actions
executable file
·26 lines (20 loc) · 996 Bytes
/
Copy pathserver.sh
File metadata and controls
executable file
·26 lines (20 loc) · 996 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
#!/bin/bash
# Congressional MCP Server restart script
echo "Stopping Congressional MCP server and related dev tools if running..."
# Forcefully kill processes on known MCP Inspector/Proxy ports
echo "Attempting to free port 6277 (MCP Proxy)..."
if pids=$(lsof -t -i:6277); then kill -9 $pids 2>/dev/null; fi
echo "Attempting to free port 6274 (MCP Inspector)..."
if pids=$(lsof -t -i:6274); then kill -9 $pids 2>/dev/null; fi
# Also attempt the original pkill for the server process itself
echo "Attempting to stop the main server process..."
pkill -f "mcp dev.*run_server\.py" || true
pkill -f "mcp run.*run_server\.py" || true
pkill -f "uvicorn asgi:app" || true
pkill -f "python -m congress_api.main" || true
pkill -f "fastmcp run.*run_server\.py" || true
# Add a small delay to allow ports to be fully released by the OS
echo "Waiting for ports to be released..."
sleep 2
echo "Starting Congressional MCP server with fastmcp run..."
source env/bin/activate && fastmcp run run_server.py