Files
fil/docs/snippets/python/mcp/mcp_server_start.md

18 lines
390 B
Markdown
Raw Normal View History

2026-06-01 23:40:55 +02:00
```python title="Python"
import subprocess
import time
from typing import Optional
mcp_process: subprocess.Popen = subprocess.Popen(
["python", "-m", "kreuzberg", "mcp"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
pid: Optional[int] = mcp_process.pid
print(f"MCP server started with PID: {pid}")
time.sleep(1)
print("Server is running, listening for connections")
```