
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

An MCP server that queues text generation requests to the OpenRouter API and tracks job status asynchronously using a Redis queue.
MCP Waifu Queue Server is cataloged as an MCP server attributed to waifuai. An MCP server that queues text generation requests to the OpenRouter API and tracks job status asynchronously using a Redis queue. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT-0 License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP Waifu Queue Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
The tool enqueues the prompt to a Redis queue, a worker picks it up and calls OpenRouter, and the result is stored as the job result for retrieval.
Yes, Redis is a prerequisite, and jobs stay queued if the RQ worker is not running against the same Redis instance.
README.md · 83ab0afd9073 · Fetched 2026-11-13 10:57:11 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
This project implements an MCP (Model Context Protocol) server for a conversational AI "waifu" character, leveraging the OpenRouter API via a Redis queue for asynchronous processing. It utilizes the FastMCP library for simplified server setup and management.
~/.model-openrouter or openrouter/free.FastMCP..env file).OPENROUTER_API_KEY or ~/.api-openrouter~/.model-openrouter for OpenRouter model nameThe project consists of several key components:
main.py: The main entry point, initializing the FastMCP application and defining MCP tools/resources.respond.py: Contains the core text generation logic using the OpenRouter API.task_queue.py: Handles interactions with the Redis queue (using python-rq), enqueuing generation requests.utils.py: Contains utility functions, specifically call_predict_response which is executed by the worker to call the generation logic in respond.py.worker.py: A Redis worker (python-rq) that processes jobs from the queue, calling call_predict_response.config.py: Manages configuration using pydantic-settings.models.py: Defines Pydantic models for MCP request and response validation.The flow of a request is as follows:
generate_text MCP tool (defined in main.py).task_queue.py).worker.py process picks up the job from the queue.call_predict_response function (from utils.py).call_predict_response calls the predict_response function (in respond.py), which interacts with the OpenRouter API.predict_response and stored as the job result by RQ.job://{job_id} MCP resource (defined in main.py).graph LR
subgraph Client
A[User/Client] -->|1. Send Prompt via MCP Tool| B(mcp-waifu-queue: main.py)
end
subgraph mcp-waifu-queue Server
B -->|2. Enqueue Job (prompt)| C[Redis Queue]
B -->|7. Return Job ID| A
D[RQ Worker (worker.py)] --|>| C
D -->|3. Dequeue Job & Execute| E(utils.call_predict_response)
E -->|4. Call Generation Logic| F(respond.predict_response)
F -->|5. Call OpenRouter API| G[OpenRouter API]
G -->|6. Return Response| F
F --> E
E -->|Update Job Result in Redis| C
A -->|8. Check Status via MCP Resource| B
B -->|9. Fetch Job Status/Result| C
B -->|10. Return Status/Result| A
end
pip or uv (Python package installer)You can find instructions for installing Redis on your system on the official Redis website: https://redis.io/docs/getting-started/ You can obtain an OpenRouter API key from: https://openrouter.ai/
Clone the repository:
git clone <YOUR_REPOSITORY_URL>
cd mcp-waifu-queue
Create and activate a virtual environment using uv:
python -m uv venv .venv
.venv/Scripts/python.exe -m ensurepip
.venv/Scripts/python.exe -m pip install uv
Install dependencies:
.venv/Scripts/python.exe -m uv pip install -r requirements.txt
.venv/Scripts/python.exe -m uv pip install -r requirements-dev.txt
Model Names via files in $HOME:
echo "openrouter/free" > ~/.model-openrouter
API Keys: Preferred via environment variables with file fallback:
OPENROUTER_API_KEY or ~/.api-openrouterecho "YOUR_API_KEY_HERE" > ~/.api-openrouter
(Replace YOUR_API_KEY_HERE with your actual key)
Other Settings: Copy the .env.example file to .env:
cp .env.example .env
Modify the .env file to set the remaining configuration values:
MAX_NEW_TOKENS: Maximum number of tokens for the response (default: 2048).REDIS_URL: The URL of your Redis server (default: redis://localhost:6379).FLASK_ENV, FLASK_APP: Optional, related to Flask if used elsewhere, not core to the MCP server/worker operation.Ensure Redis is running. If you installed it locally, you might need to start the Redis server process (e.g., redis-server command, or via a service manager).
Start the RQ Worker:
Open a terminal, activate your virtual environment (source .venv/bin/activate or similar), and run:
python -m mcp_waifu_queue.worker
This command starts the worker process, which will listen for jobs on the Redis queue defined in your .env file. Keep this terminal running.
Start the MCP Server:
Open another terminal, activate the virtual environment, and run the MCP server using a tool like uvicorn (you might need to install it: pip install uvicorn or uv pip install uvicorn):
uvicorn mcp_waifu_queue.main:app --reload --port 8000 # Example port
Replace 8000 with your desired port. The --reload flag is useful for development.
Alternatively, you can use the start-services.sh script (primarily designed for Linux/macOS environments) which attempts to start Redis (if not running) and the worker in the background:
# Ensure the script is executable: chmod +x ./scripts/start-services.sh
./scripts/start-services.sh
# Then start the MCP server manually as shown above.
The server provides the following MCP-compliant endpoints:
generate_text
{"prompt": "Your text prompt here"} (Type: GenerateTextRequest){"job_id": "rq:job:..."} (A unique ID for the queued job)job://{job_id}
job_id (The ID returned by the generate_text tool).{"status": "...", "result": "..."} (Type: JobStatusResponse)
status: The current state of the job (e.g., "queued", "started", "finished", "failed"). RQ uses slightly different terms internally ("started" vs "processing", "finished" vs "completed"). The resource maps these.result: The generated text if the job status is "completed", otherwise null. If the job failed, the result might be null or contain error information depending on RQ's handling.The project includes tests. Ensure you have installed the test dependencies (pip install -e .[test] or uv pip install -e .[test]).
Run tests using pytest:
pytest tests
Note: Tests might require mocking Redis (fakeredis) and potentially the OpenRouter API calls depending on their implementation.
OpenRouter API key not available: Ensure OPENROUTER_API_KEY is set or ~/.api-openrouter exists with your key on a single line (no whitespace).python -m mcp_waifu_queue.worker) is running in a separate terminal and connected to the same Redis instance specified in .env. Check the worker logs for errors.REDIS_URL specified in .env.uvicorn ...) is running and you are connecting to the correct host/port.git checkout -b feature/your-feature-name).git commit -am 'Add some feature').git push origin feature/your-feature-name).Please adhere to the project's coding standards and linting rules (ruff).
This project is licensed under the MIT-0 License - see the LICENSE file for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP Waifu Queue Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-waifu-queue)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.