fix: update MCP server base URL to port 5270 and suppress logging
Point API client at the deployed service port and clear logging providers to prevent interference with MCP stdio transport. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using CutList.Mcp;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ModelContextProtocol.Server;
|
||||
|
||||
var builder = Host.CreateApplicationBuilder(args);
|
||||
@@ -8,9 +9,12 @@ var builder = Host.CreateApplicationBuilder(args);
|
||||
// Register HttpClient for API calls to CutList.Web
|
||||
builder.Services.AddHttpClient<ApiClient>(client =>
|
||||
{
|
||||
client.BaseAddress = new Uri("http://localhost:5009");
|
||||
client.BaseAddress = new Uri("http://localhost:5270");
|
||||
});
|
||||
|
||||
// Suppress all logging so it doesn't interfere with MCP stdio transport
|
||||
builder.Logging.ClearProviders();
|
||||
|
||||
builder.Services
|
||||
.AddMcpServer()
|
||||
.WithStdioServerTransport()
|
||||
|
||||
Reference in New Issue
Block a user