This commit is contained in:
15
docs/snippets/swift/mcp/mcp_server_start.md
Normal file
15
docs/snippets/swift/mcp/mcp_server_start.md
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- snippet:syntax-only -->
|
||||
|
||||
```swift title="Swift"
|
||||
import Foundation
|
||||
|
||||
// Start the kreuzberg MCP server as a subprocess.
|
||||
// The Swift bindings do not expose an in-process MCP server; use the
|
||||
// kreuzberg CLI binary which provides the MCP transport over stdio.
|
||||
let process = Process()
|
||||
process.executableURL = URL(fileURLWithPath: "/usr/bin/env")
|
||||
process.arguments = ["kreuzberg", "mcp"]
|
||||
|
||||
try process.run()
|
||||
process.waitUntilExit()
|
||||
```
|
||||
Reference in New Issue
Block a user