home / mcp / jokes by api ninjas mcp server
Provides access to the Jokes By Api Ninjas API via an MCP server with Python and UVX execution options.
Configuration
View docs{
"mcpServers": {
"bach-ai-tools-jokes_by_api_ninjas": {
"command": "python",
"args": [
"server.py"
],
"env": {
"API_KEY": "YOUR_API_KEY"
}
}
}
}This MCP server lets you access the API Ninjas Jokes API through a standardized MCP interface. You can plug it into your applications or testing environments and manage authentication via a single API key, while taking advantage of the MCP platform’s streamlined startup and monitoring features.
Connect to this MCP server using an MCP client that supports stdio-based servers. You will run the MCP server via the UVX runner or your preferred local launcher, supply your API key as an environment variable, and then query the Jokes API through the MCP connection. With a proper client, you can fetch jokes and respect the API key requirements without embedding credentials in your code.
pip install bach-jokes_by_api_ninjas
```
```
pip install -e .
```
```bash
# Run with uvx (recommended)
uvx --from jokes_by_api_ninjas bach_jokes_by_api_ninjas
# Run with a specific version
uvx --from jokes_by_api_ninjas@latest bach_jokes_by_api_ninjas
```
```
# Development mode
python server.py
```
```
# Install and run as a command
pip install bach-jokes_by_api_ninjas
bach_jokes_by_api_ninjasConfiguration and security details shown here help you connect smoothly and protect credentials. You will provide your API key as an environment variable named API_KEY. The server exposes a single stdio-based MCP entrypoint that you run with the UVX launcher, supplying the necessary arguments to target the local package and module. Use the provided examples to configure clients like Cursor or Claude Desktop.
- Set `API_KEY` in your environment before starting the MCP server. Treat the key as secret and avoid printing it in logs.
- If you use a local dev environment, prefer the UVX-based run commands to ensure dependencies are installed automatically.{
"mcpServers": {
"jokes_by_api_ninjas": {
"command": "uvx",
"args": ["--from", "bach-jokes_by_api_ninjas", "bach_jokes_by_api_ninjas"],
"env": {
"API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}{
"mcpServers": {
"jokes_by_api_ninjas": {
"command": "uvx",
"args": ["--from", "bach-jokes_by_api_ninjas", "bach_jokes_by_api_ninjas"],
"env": {
"API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
```
```
{
"mcpServers": {
"jokes_by_api_ninjas": {
"command": "uvx",
"args": ["--from", "bach-jokes_by_api_ninjas", "bach_jokes_by_api_ninjas"],
"env": {
"API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
```
Placeholders above follow the documented environment variable for authentication and show how to wire the MCP client with the server entry. Replace YOUR_API_KEY_HERE with your actual API key when you deploy.Jokes endpoint for API Ninjas Jokes API. Endpoint: GET /v1/jokes with optional limit parameter to control the number of results (1-30).