This commit is contained in:
20
docs/snippets/csharp/mcp/mcp_server_start.md
Normal file
20
docs/snippets/csharp/mcp/mcp_server_start.md
Normal file
@@ -0,0 +1,20 @@
|
||||
<!-- snippet:syntax-only -->
|
||||
|
||||
```csharp title="C#"
|
||||
using System.Diagnostics;
|
||||
|
||||
var processInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = "kreuzberg",
|
||||
Arguments = "mcp",
|
||||
UseShellExecute = false,
|
||||
RedirectStandardInput = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
};
|
||||
|
||||
using var server = Process.Start(processInfo)
|
||||
?? throw new InvalidOperationException("Failed to start kreuzberg mcp");
|
||||
|
||||
await server.WaitForExitAsync();
|
||||
```
|
||||
Reference in New Issue
Block a user