Refactor MCP Server and Complete it ...
This commit is contained in:
+4
-15
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Grapevine;
|
||||
using System.Net.Http;
|
||||
using xAiMcpServer.DI;
|
||||
using Newtonsoft.Json;
|
||||
@@ -9,7 +8,6 @@ using xIdentityService.DI;
|
||||
using xCommons.Extensions;
|
||||
using xAiService.Extensions;
|
||||
using xCommons.Configurations;
|
||||
using Grapevine.Extensions.Mcp;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
@@ -91,21 +89,12 @@ namespace xAiMcpServer
|
||||
lifeTime: lifeTime,
|
||||
configuration: Configuration
|
||||
);
|
||||
|
||||
//
|
||||
// Register MCP Server ...
|
||||
services
|
||||
.AddMcpServer()
|
||||
.WithHttpTransport()
|
||||
.WithToolsFromAssembly();
|
||||
}
|
||||
|
||||
public void ConfigureServer(IRestServer server)
|
||||
{
|
||||
server.Prefixes.Add("https://localhost:7001/");
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
public void Configure(
|
||||
IApplicationBuilder app,
|
||||
IWebHostEnvironment env
|
||||
)
|
||||
{
|
||||
//
|
||||
// Configure the HTTP request pipeline ...
|
||||
|
||||
Reference in New Issue
Block a user