Back to articles
MCP Server with .Net
How-ToSystems

MCP Server with .Net

via Dev.toAntonio Di Motta

With the release 1.0 of the official ModelContextProtocol .Net SDK , we are ready to make a MCP Server fully compliant with MCP specs and entirely in C#. As usually when I need to learn new stuffs I develop a simple demo around a real scenario. For the MCP Server I thought to build one for managing some data like customers, products and orders stored into a Postgres database. The MCP server provides the data on behalf of user prompt like: give me the customer list tell me the most expensive order how many USB-C Hub has been ordered ? give me the customer list without orders suggest a new product for the customer Jane Smith add new order ..... The most important feature of MCP Server is the tool as function able to do something. Below an example of tool: [ McpServerTool ( Name = "GetCustomer" ), Description ( "Retrieve a single customer from the database." )] public static async Task < object > GetCustomer ( AppDbContext db , CancellationToken ct , ILogger < MCPTool > logger , [ Descrip

Continue reading on Dev.to

Opens in a new tab

Read Full Article
19 views

Related Articles