This commit is contained in:
17
docs/snippets/python/mcp/mcp_server_start.md
Normal file
17
docs/snippets/python/mcp/mcp_server_start.md
Normal file
@@ -0,0 +1,17 @@
|
||||
```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")
|
||||
```
|
||||
Reference in New Issue
Block a user