Existing ASP.NET API with vanilla JS SPA, WindowWatcher, Chrome extension, and MCP server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
458 B
C#
18 lines
458 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
var builder = Host.CreateApplicationBuilder(args);
|
|
|
|
var apiBaseUrl = Environment.GetEnvironmentVariable("API_BASE_URL") ?? "http://localhost:5200";
|
|
|
|
builder.Services.AddSingleton(_ => new HttpClient
|
|
{
|
|
BaseAddress = new Uri(apiBaseUrl)
|
|
});
|
|
|
|
builder.Services.AddMcpServer()
|
|
.WithStdioServerTransport()
|
|
.WithToolsFromAssembly();
|
|
|
|
await builder.Build().RunAsync();
|