Stash MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Stash MCP ServerGet detailed information about performer Mia Malkova"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Stash MCP Server
An MCP (Model Context Protocol) server that provides a concise set of tools to query and analyze an Stash instance with composable, high‑precision filters, optimized caching for faster queries, automated intelligence for performer/scene analysis, and personalized recommendations based on usage and preferences.
Prompts
Prompt | Description | Parameters |
analyze-performer | Complete performer analysis with insights |
|
library-insights | Strategic insights for the entire library | — |
recommend-scenes | Personalized scene recommendations |
|
discover-performers | Performer discovery by criteria |
|
Resources
Performer Resources
Resource | Description | URI |
All performers | List of all favorite performers with basic info |
|
Performers Information | Detailed information about a specific performer |
|
Performers by Country | List of performers filtered by country |
|
Performers by Ethnicity | List of performers filtered by ethnicity |
|
Performers Statistics | Statistical summary of all performers |
|
Studio Resources
Resource | Description | URI |
All studios | List of all favorite studios with basic info |
|
Studio Information | Detailed information about a specific studio |
|
Studios Statistics | Statistical summary of all studios |
|
Tag Resources
Resource | Description | URI |
All tags | List of all favorite tags with basic info |
|
Tag Information | Detailed information about a specific tag |
|
Tags Statistics | Statistical summary of all tags |
|
Tools
Tool | Description | Parameters |
advanced_performer_analysis | Deep analysis with progress and logging |
|
batch_performer_insights | Aggregated insights from multiple performers |
|
health_check | Basic connectivity/cache status | — |
get_performer_info | Detailed performer information |
|
get_all_performers | List performers with advanced filtering |
|
get_all_scenes_from_performer | Scenes for a performer |
|
get_all_scenes | List all scenes with optional filters | advanced filters (see "Advanced Filters" section) |
Advanced Filters for get_all_performers
This tool now supports advanced filtering by multiple physical and demographic criteria:
Basic Filters
favorites_only: bool = True- Limit to favorite performerscountry: str- Filter by countryethnicity: str- Filter by ethnicityeye_color: str- Filter by eye colorhair_color: str- Filter by hair colormeasurements: str- Filter by body measurementspiercings: str- Filter by piercingstattoos: str- Filter by tattoos
Numeric Filters with Modifiers
height_cm: int- Filter by height in centimetersweight: int- Filter by weight
Filter Modifiers
Each filter supports modifiers for different comparison types:
EQUALS(default) - Exact matchNOT_EQUALS- Not equalGREATER_THAN- Greater than (numeric only)LESS_THAN- Less than (numeric only)BETWEEN- Between two values (numeric only, requires_value2)NOT_BETWEEN- Not between two values (numeric only, requires_value2)
Range Parameters
For BETWEEN and NOT_BETWEEN filters:
height_cm_value2: int- Second value for height rangeweight_value2: int- Second value for weight range
Resources for performers information
The server provides dedicated resources to access performers information in multiple formats:
Resource URIs
stash://performer/all- Lists all favorite performers with basic informationReturns: Name, country, ethnicity, height, weight, and associated tags
Use case: Get a quick overview of all favorite performers
stash://performer/{name}- Detailed information for a specific performerParameters:
{name}- Exact performer nameReturns: Complete profile including demographics, physical characteristics, bio, and tags
Use case: Get comprehensive information about a specific performer
stash://performer/country/{country}- Filter performers by countryParameters:
{country}- Country name or code (e.g., "USA", "ES")Returns: List of performers from the specified country with ethnicity
Use case: Discover performers from a specific country
stash://performer/ethnicity/{ethnicity}- Filter performers by ethnicityParameters:
{ethnicity}- Ethnicity name (e.g., "Caucasian", "Asian")Returns: List of performers with the specified ethnicity and their countries
Use case: Find performers matching specific ethnic characteristics
stash://performer/stats- Statistical summary of the performer databaseReturns:
Total number of favorite performers
Geographic distribution (countries and counts)
Ethnic distribution
Physical statistics (average height and weight ranges)
Use case: Analyze the composition and diversity of your performer collection
Configuration
The server supports flexible configuration through environment variables:
Variable | Default | Description |
|
| Stash server endpoint |
| — | Required API key (mandatory) |
|
| Initial connection retries |
|
| Delay between retries (seconds) |
|
| Filter resources by favorites only |
|
| Log level: DEBUG, INFO, WARNING, ERROR |
Environment Setup
Copy the example environment file:
cp .env.example .envEdit
.envwith your settings:
STASH_ENDPOINT=http://localhost:9999
STASH_API_KEY=YOUR_API_KEYRelated MCP server: stack-overflow-mcp-light
Installation
Install with uv (recommended)
Clone the repository and install with uv:
git clone https://github.com/donlothario/stash_mcp_server.git
cd stash_mcp_server
cp .env.example .env
# Edit .env file with your Stash settings
uv syncOr install directly from the repository:
uv add git+https://github.com/donlothario/stash_mcp_server.gitInstall with pip
Install the package in mode:
git clone https://github.com/donlothario/stash_mcp_server.git
cd stash_mcp_server
cp .env.example .env
# Edit .env file with your Stash settings
python3 -m pip install .Or install directly from the repository:
python3 -m pip install git+https://github.com/donlothario/stash_mcp_server.gitDocker
Build the image
Build the image:
docker build -t stash_mcp_server:latest .Pull the image
Pull the latest image from the Docker registry:
docker pull ghcr.io/donlothario/stash_mcp_server:latestUsage
Running with uv
uv run stash_mcp_serverRunning with pip installation
python3 -m stash_mcp_serverConfiguration example for Claude Desktop/Cursor/VSCode
Add this configuration to your application's settings (mcp.json):
Using uv (recommended)
"stash mcp server": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/stash_mcp_server",
"stash_mcp_server"
],
"env": {
"STASH_ENDPOINT": "http://localhost:9999",
"STASH_API_KEY": "YOUR_API_KEY",
}
}Using pip installation
"stash mcp server": {
"type": "stdio",
"command": "python3",
"args": [
"-m",
"stash_mcp_server"
],
"env": {
"STASH_ENDPOINT": "http://localhost:9999",
"STASH_API_KEY": "YOUR_API_KEY",
}
}Using Docker
"stash mcp server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--env-file",
"${workspaceFolder}/.env",
"ghcr.io/donlothario/stash_mcp_server"
]
}Technical Notes
Connection to Stash is performed with configurable retries.
If the API key is missing, the server generates an error and does not start.
GraphQL fragments used by queries are centralized in the code (
FRAGMENTS).Improved cache architecture: Cache functions are separated from MCP decorators to avoid conflicts with Pydantic schema generation.
Advanced filtering: Robust filter system with modifiers and range handling for complex queries.
Enhanced logging: Detailed information about active filters and query results for better debugging.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/donlothario/stash_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server