MCP Server for Hydrus - Allowing your LLM to interact with your hydrus client to interact with your media
Project description
HydrusMCPServer
An MCP Server for Hydrus Network. Connecting your LLM to an elaborate and very powerful media manager with sophisticated tag management and features.
Demonstration
![oh_wow.jpg]
![tag_analysis.jpg]
Tools
The Hydrus MCP Server provides the following tools:
hydrus_available_clients()- Check which Hydrus clients are available for usehydrus_available_tag_services(client_name)- Get available tag services for a specific Hydrus clienthydrus_search_tags(client_name, search, tag_service, limit)- Search for tags in Hydrus using keywords and wildcardshydrus_query(client_name, query, tag_service, file_sort_type, trs)- Query files in the Hydrus client using various search criteriahydrus_get_tags(client_name, content, content_type, tag_service, trs, limit, result_limit)- Get tags for files in Hydrus clienthydrus_get_file_metadata(client_name, file_id)- Get metadata for a file by its IDhydrus_get_page_info(client_name, page_key)- Get page information for a specific tab using its page keyhydrus_list_tabs(client_name, return_tab_keys)- List open tabs in a Hydrus clienthydrus_focus_on_tab(client_name, tab_name)- Focus the Hydrus client on a specific tabhydrus_send_to_tab(client_name, tab_name, content, is_query, tag_service)- Send files to a specific tab in Hydrus clienthydrus_send(client_name, link, service_names_to_additional_tags, subdir, max_depth, filename, destination_page_name)- Send a link to be downloaded to Hydrus
Abilities
The server enables the LLM to:
- Discover and connect to multiple Hydrus clients simultaneously
- Search and query files using complex tag syntax with wildcards
- Analyze tag distributions across large file collections with summary views
- Retrieve detailed metadata for individual files including timestamps, file types, and all associated tags
- Manage tabs and pages within Hydrus client interface
- Send files for download from URLs with optional recursive directory scraping
- Organize files by sending them to specific tabs with custom tags
- Handle large result sets with configurable limits and threshold-based summary views
Example Prompts
...
Setup
UVX Setup (Coming Soon™)
UV Setup (Recommended)
The UV setup is the new recommended method for running the Hydrus MCP Server. It uses uv (a Python package manager) to manage dependencies and run the server.
Clone the Repo
Clone the repository to a directory of your choice, open a command prompt there, and run:
git clone https://github.com/TheElo/HydrusMCPServer
Install uv
If you don't have uv installed, install it with:
pip install uv
Install dependencies
Run uv sync to create the virtual environment and install all dependencies:
uv sync
Add LM Studio MCP Configuration
Add this configuration to your LM Studio mcp.json file. If you don't use LM Studio then you maybe need to remove the timeout block as it's maybe LM Studio specific.
- Replace the path to where you downloaded the github project ()"c:/PATH/TO/WHERE/UV/PROJECT/IS/HydrusMCPServer")
- Configure your Hydrus client(s) by giving them a short name, the right adress and api key
{
"mcpServers": {
"hydrus-mcp-server": {
"command": "uv",
"args": [
"run",
"--project",
"c:/PATH/TO/WHERE/UV/PROJECT/IS/HydrusMCPServer",
"-m",
"hydrus_mcp.server"
],
"env": {
"HYDRUS_CLIENTS": "[[\"Name1\", \"http://192.168.1.20:45869/\", \"APIKEY1\"], [\"Name2\", \"http://192.168.1.20:45870/\", \"APIKEY2\"]]"
},
"timeout": 360000
}
}
}
If this is your only MCP server, simply paste the contents into mcp.json. If you already have other MCP servers configured, add the content manually at the appropriate level in the hierarchy to avoid breaking anything.
Add Context to Character
Add the provided character prompt to your frontend (LM Studio, OpenWebUI, etc.) where you use your LLM or create your own. Using hydrus is a intricate task, context can help a lot to make the llm behave as you expect it would. Include it in the system prompt or use it as a character prompt. The LLM should be able to use the tools without the character prompt but it will probably require a lot of user input to make it work well or a lot of trial and error by the llm.
_Now it should work_™
Tipps & Tricks
- provide more context about your structure, content, usecases, strategies as context to your llm either in the chat or in the agent prompt. Hydrus is tricky to use already for a human, a llm needs also some context to understand how to use the tools and when.
- Use short names (like 2 letter codes) for your clients to save tokens per call
Roadmap / Ideas
- adding tag suggestion functionality
- better context size managment and settings
- Explore using the description field of clients to provide detailed context about content and special tag meanings.
Todo
- Provide
parcour.md- a test prompt to verify system functionality. - enhance env variables to alter default settings
Issues and Limitations
You may quickly exceed your context window limit if you set the default limits too generously.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hydrus_mcp_server-1.0.0.tar.gz.
File metadata
- Download URL: hydrus_mcp_server-1.0.0.tar.gz
- Upload date:
- Size: 98.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ee0435cc3a4c806e143e4273f4fedc99059b8221ba1f59eb0eb6b66bca30b56
|
|
| MD5 |
1173dfc060a875635775b1207a688838
|
|
| BLAKE2b-256 |
fc09bf21702a1dfb291a9cc2ffdd5288d6ce7bd957701373a0dc9b67592125f6
|
File details
Details for the file hydrus_mcp_server-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hydrus_mcp_server-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba722e9048856be4ae115f3635035c22b526d2dfe389476329741d1dfbcb4202
|
|
| MD5 |
ad1c96a23da536a26712902691f3f563
|
|
| BLAKE2b-256 |
6a3b644f3662bc68b6e2b8a8ca434ac7230efcaf1a8dce6cf350ee248e40cb12
|