About Comedy MCP Server
Comedy MCP Server is an ASP.NET Core MCP server for AI assistants and developers, providing programming jokes and code-contextual humorous comments alongside an echo demo tool.
Key features
- 01Random programming jokes
- 02Humorous code-context comments
- 03Echo tool with logging
- 04Swagger API documentation
- 05Health-check endpoint
Use cases
- 01Add a programming joke to an assistant response
- 02Generate a funny comment for a code snippet
- 03Verify server status or inspect the API
MCP support
It exposes joke, code-comment, and echo tools to MCP clients. The README describes stdio communication with Cursor IDE.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEComedy MCP Server
A Model Context Protocol (MCP) server implementation that provides comedy-related tools and services for AI assistants. This server integrates with Cursor IDE and offers various comedy-related functionalities through MCP tools.
Overview
The Comedy MCP Server is built using ASP.NET Core and implements the Model Context Protocol (MCP) to provide AI assistants with tools for generating programming jokes and funny code comments. It serves as a bridge between AI models and comedy-related functionalities.

Features
- Programming Jokes: Generates random programming-related jokes
- Code Comments: Creates humorous comments based on code context and topics
- Echo Service: Demonstration service showing logging capabilities
- Swagger Integration: API documentation and testing interface
- Health Check Endpoint: Basic server status monitoring
Architecture
The server is built with the following components:
- MCP Server Integration: Uses
ModelContextProtocol.Serverfor MCP implementation - Comedy Services: Implements
IComedyServicefor joke and comment generation - HTTP Communication: Uses stdio for communication with Cursor IDE
- Logging: Comprehensive logging with configurable levels
- CORS Support: Configured for MCP inspector tool
Tools
The server provides the following MCP tools:
-
GetProgrammingJoke- Description: Retrieves a random programming-related joke
- Parameters: None
- Returns: A string containing the joke
-
GetCodeComment- Description: Generates a funny comment related to specific code context
- Parameters:
codeContext: The code snippet or contexttopic: The topic for the comment
- Returns: A humorous comment related to the code
-
EchoWithLog- Description: Demonstration tool that echoes messages with logging
- Parameters:
message: The message to echo
- Returns: The echoed message
Setup and Configuration
Prerequisites
- .NET 8.0 SDK or later
- Node.js 14+ (for MCP inspector tool)
- A code editor (preferably Cursor IDE for best integration)
- Git (for version control)
Installation Steps
- Clone the repository:
git clone [your-repository-url]
cd ComedyMcpServer
-
Set up environment:
- Copy the example environment file:
copy .env.example .env # On Windows # OR cp .env.example .env # On Unix-based systems - Update the
.envfile with your settings if needed
- Copy the example environment file:
-
Install dependencies:
dotnet restore
- Build the project:
dotnet build
Running the Server
You have several options to run the server:
- Development Mode:
dotnet run --environment Development
- With MCP Inspector (recommended for debugging MCP tools):
npx @modelcontextprotocol/inspector dotnet run
- Production Mode:
dotnet run --environment Production
Verifying Installation
-
Check the server is running:
- Open your browser to
http://localhost:5000or the configured port - You should see the message "Comedy MCP Server is running!"
- Open your browser to
-
Access Swagger Documentation:
- Navigate to
http://localhost:5000/swagger - You should see the API documentation
- Navigate to
-
Test MCP Tools:
- Use the included test script:
node test-mcp.js - Or use the MCP inspector interface if running with inspector
- Use the included test script:
Troubleshooting
Common issues and solutions:
-
Port already in use:
- Change the port in
appsettings.json - Or stop the process using the current port
- Change the port in
-
Dependencies missing:
- Run
dotnet restoreagain - Check your .NET SDK version matches the project requirements
- Run
-
Environment variables not loading:
- Ensure
.envfile exists and is properly formatted - Restart the application after modifying environment files
- Ensure
For more detailed issues, check the application logs in the console output.
Development
The project follows standard ASP.NET Core practices with additional MCP-specific components:
- Services are registered in the DI container
- Tools are automatically discovered from the assembly
- Logging is configured for development and debugging
- Swagger is available for API documentation
Deployment
The project includes:
Procfile: For platform deploymentnixpacks.toml: Build configuration- Standard ASP.NET Core deployment options
Testing
A test script (test-mcp.js) is included for verifying MCP functionality.
Health Check
Access the root endpoint (/) to verify server status:
GET / -> "Comedy MCP Server is running!"
API Documentation
When running, access Swagger UI at:
/swagger
Contributing
Feel free to contribute by:
- Implementing new comedy-related tools
- Enhancing existing joke generation
- Improving error handling and logging
- Adding new comedy services
License
[Your license information here]
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.