m-diegodlt/asp-core-mcp-server-http
3.1
If you are the rightful owner of asp-core-mcp-server-http and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project is an ASP.NET Core server implementation for Model Context Protocol (MCP) over HTTP.
Tools
1
Resources
0
Prompts
0
ASP Core MCP Server HTTP
This project is an ASP.NET Core server implementation for Model Context Protocol (MCP) over HTTP.
Resources
Features
- ASP.NET Core based HTTP server
- Model Context Protocol (MCP) support
Getting Started
-
Clone the repository:
git clone https://github.com/yourusername/asp-core-mcp-server-http.git -
Install dependencies:
dotnet restore -
Run the server:
dotnet run
Project Structure
Controllers/- HTTP endpointsMcpServer/- MCP tools
Requirements
- .NET 9.0 or later
How to run locally and test using VS Code
NOTE: These instructions should be followed on VS Code.
1. Run the server:
- Navigate to the project directory and execute in the terminal:
dotnet run
2. Add MCP server to VS Code:
- Create directory
.vscodein the project root if it doesn't exist. - Create a file named
mcp.jsoninside the.vscodedirectory. - Open the
mcp.jsonfile in the project directory. - Click on the "Add Server..." button in the bottom right corner of the editor window.
- Select "HTTP" as the server type.
- The full URL will consist of the base address from the terminal output (e.g., http://localhost:5000) followed by
/api/mcp, resulting in http://localhost:5000/api/mcp. NOTE: The port number may vary. Reference the terminal output for the correct port number. - Set the server name to
todos-mcp-server. This name will be used in the prompts to reference this MCP server.
3. Test the server:
- Open the Copilot Studio chat window in VS Code.
- Set the chat to "Agent" mode.
- Use the following prompt for the first message:
Using todos-mcp-server get me all todos - This will ensure that the Copilot Chat uses the correct MCP server for the request.
- Subsequent messages shouldn't require explicitly mentioning the MCP server.
4. Prompt usage example:
- "Using todos-mcp-server get me all todos"
- "Add a new todo with title 'Buy groceries'"
- "Add a new todo with title 'Walk the dog'"
- "Get all todos"
- "Update the todo with id 1 to mark it as completed and get me all todos."
- "Delete the todo with id 2 and get me all todos."
License
This project is licensed under the MIT License.