Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.42.0
metadata
title: Xkcd Mcp Server
emoji: π
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 5.34.2
app_file: app.py
pinned: false
license: mit
short_description: XKCD Remote MCP Server
XKCD MCP Server
A Model Context Protocol (MCP) server for fetching and searching XKCD comics, built with Gradio.
Features
- Get XKCD Comic: Fetch specific comics by ID or get the latest comic
- Search Comics: Search through recent comics by title, alt text, and transcript
Installation
- Install dependencies:
pip install -r requirements.txt
- Run the server:
python app.py
MCP Tools Available
get_xkcd_comic
Fetch XKCD comic information by ID or get the latest comic.
Parameters:
comic_id
(str): Comic ID number (leave empty for latest comic)
Returns: JSON string with comic data including title, alt text, image URL, and metadata.
search_xkcd_transcript
Search for XKCD comics by searching their transcripts and titles.
Parameters:
search_term
(str): Term to search for in comic transcripts and titles
Returns: JSON string with matching comics information.
Deployment to Hugging Face Spaces
- Create a new Space on Hugging Face
- Upload
app.py
andrequirements.txt
- Set the Space to use Gradio SDK
- Configure your MCP client to connect to the Space URL
Usage with MCP Clients
Configure your MCP client (e.g., Claude Desktop) to connect to this server:
{
"servers": {
"xkcd": {
"command": "python",
"args": ["app.py"]
}
}
}
Or use the Hugging Face Spaces URL if deployed online.