ASP.NET Core Quickstart
Use Swashbuckle to publish OpenAPI and generate MCP servers. Follow the flowchart below to set up your spec and link it with LegacyAI.
Expose OpenAPI Specification
Enable Swagger support in your ASP.NET Core API using Swashbuckle to generate and host the OpenAPI schema definition.
// Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger(); // Generates raw swagger.json
app.UseSwaggerUI();
}
app.MapControllers();
app.Run();Run the application and check the generated schema at http://localhost:5000/swagger/v1/swagger.json.
Generate the MCP Server
Link the Swagger endpoint in LegacyAI. Choose "ASP.NET Core" in the project wizard and submit http://localhost:5000/swagger/v1/swagger.json.
You can upload the swagger.json file directly if your local dev port is not publicly accessible.
Register in Claude Desktop
Add the generated server configuration block into the Claude Desktop configuration.
{
"mcpServers": {
"legacy-aspnet-tools": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-openapi", "http://localhost:5000/swagger/v1/swagger.json"]
}
}
}Locate your config file at %APPDATA%\Claude\claude_desktop_config.json on Windows.
Test in Claude Desktop
Open Claude Desktop. Ask: "retrieve data using my aspnet tools" to check if the connection is active.