feat: add MoneyMap.Mcp project skeleton with stdio transport
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MoneyMap.Core;
|
||||
using MoneyMap.Mcp;
|
||||
using MoneyMap.Services;
|
||||
|
||||
var builder = Host.CreateApplicationBuilder(args);
|
||||
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Logging.AddConsole(options => options.LogToStandardErrorThreshold = LogLevel.Trace);
|
||||
|
||||
builder.Services.AddMoneyMapCore(builder.Configuration);
|
||||
builder.Services.AddSingleton<IReceiptStorageOptions, ConfigReceiptStorageOptions>();
|
||||
|
||||
builder.Services
|
||||
.AddMcpServer()
|
||||
.WithStdioServerTransport()
|
||||
.WithToolsFromAssembly(typeof(Program).Assembly);
|
||||
|
||||
var app = builder.Build();
|
||||
await app.RunAsync();
|
||||
Reference in New Issue
Block a user