hassanhabib/SimpleMcp.Demo
If you are the rightful owner of SimpleMcp.Demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Simple MCP Server & Client demo showcases the use of the Model-Context-Protocol (MCP) framework in C# for building AI-powered tools.
The Simple MCP Server & Client project demonstrates the implementation of a Model-Context-Protocol (MCP) server and client using C#. It leverages the MCPSharp library to facilitate the creation and invocation of AI tools. The project is structured into a server that registers tools and a client that calls these tools. The primary focus is on demonstrating how to define and use tools in a structured manner, allowing for easy integration into larger systems. The example provided is a simple addition tool, but the framework supports more complex operations, including context management and communication with local or remote AI models. This project serves as a foundational example for developers looking to explore MCP's capabilities in building agentic systems and orchestrating AI models.
Features
- Simple MCP server-client architecture using C#.
- Demonstrates tool registration and invocation.
- Utilizes MCPSharp for local process communication.
- Expandable to include multiple tools and contexts.
- Supports integration with local/remote AI models.
Usages
usage with local integration stdio
csharp mcp.run(transport='stdio');
usage with local integration ide plugin
{ "mcpServers": { "simple-mcp": { "command": "dotnet", "args": ["run", "--project", "SimpleMcp.Server"] } } }
usage with remote integration sse
csharp mcp.run(transport='sse', host="0.0.0.0", port=8000);
usage with remote integration streamable http
yaml paths: /mcp: post: x-ms-agentic-protocol: mcp-streamable-1.0
usage with platform ecosystem integration ai toolchains
{ "command": "docker", "args": ["run", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"] }
usage with platform ecosystem integration enterprise saas
{ "mcpServers": { "asana": { "command": "dotnet", "args": ["run", "--project", "SimpleMcp.Server"] } } }
Tools
addition
This tool will add two numbers.