Get the FREE Ultimate OpenClaw Setup Guide →

mcp-products

Example MCP server using the .NET ModelContextProtocol SDK, Semantic Kernel, Aspire, and a Blazor client app. The MCP server provides tools to interact with a Cosmos DB database.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tahubu-ai-mcp-products-server dotnet run --project mcp-products-server

How to use

This MCP server provides product search capabilities and marketing summary generation for Cosmic Works Bike Company. Clients interact with the server over HTTP using JSON-RPC to invoke tools such as hybrid_search_products, get_product_by_id, generate_product_summary, get_product_summary, update_product_summary, delete_product_summary, and list_product_summaries. The Semantic Kernel integration exposes these MCP tools as plugins, enabling an AI-driven workflow where an agent can automatically choose tools, retrieve product data from Cosmos DB, and generate marketing copy. Use the Blazor client for a convenient UI to test tools, view real-time logs, and render AI-generated content. The architecture supports vector and full-text search for product data, AI-generated summaries, and full CRUD operations on the product summaries.

How to install

Prerequisites:

  • .NET 9.0 SDK installed
  • Access to an Azure Cosmos DB account
  • (Optional) Azure OpenAI service for enhanced features
  1. Clone the repository and navigate to the project root

    git clone <repository-url> cd mcp-dotnet-2-complex

  2. Configure environment

    Create appsettings.Development.json for the MCP server with your Azure OpenAI and Cosmos DB settings. Example paths from the repo:

    • mcp-products-server/appsettings.Development.json
    • mcp-products-server.AppHost/appsettings.Development.json

    Provide your endpoint URLs and deployment names for OpenAI and Cosmos DB containers as shown in the README example.

  3. Build and run

Option A: Run with .NET Aspire (recommended)

cd mcp-products-server.AppHost dotnet run

This starts both the MCP server and the Blazor client with the Aspire dashboard for monitoring.

Option B: Run individual components

Terminal 1: Start MCP Server

cd mcp-products-server dotnet run

Terminal 2: Start Blazor Client

cd mcp-products-client dotnet run

Additional notes

Tips and notes:

  • Ensure your OpenAI and Cosmos DB configurations (endpoints, deployment names, containers) are correctly set in appsettings.Development.json files.
  • The MCP server exposes tools that Semantic Kernel can convert to plugins; ensure the Blazor client is able to discover and proxy tools via the tools/list endpoint.
  • If you encounter startup issues, verify that environment variables (detailed errors, logging levels) are enabled in development configs and that the Cosmos DB containers exist.
  • For production, consider adjusting Logging, AllowedHosts, and security settings in appsettings.json and AppHost configurations.
  • The available MCP tools include hybrid_search_products, get_product_by_id, generate_product_summary, get_product_summary, update_product_summary, delete_product_summary, and list_product_summaries; these drive both data retrieval and AI content generation workflows.

Related MCP Servers

Sponsor this space

Reach thousands of developers