The Finding Model MCP (Model Context Protocol) server provides AI agents with access to search and retrieve finding models from the DuckDB index.
The MCP server exposes three tools that agents can use to interact with the Finding Model Index:
- search_finding_models: Search for finding models using hybrid search (FTS + semantic)
- get_finding_model: Retrieve a specific finding model by ID, name, or synonym
- count_finding_models: Get statistics about the index (models, people, organizations)
The MCP server is included in the findingmodel package. To use it, ensure you have installed the package with all dependencies:
pip install findingmodelOr with uv:
uv add findingmodelRecommended: Run using the installed console script:
findingmodel-mcpOr with uvx (no installation required):
uvx --from findingmodel findingmodel-mcpAlternative: Run directly using Python:
python -m findingmodel.mcp_server
# or with uv:
uv run python -m findingmodel.mcp_serverTo use the MCP server with Claude Desktop, add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Recommended (using uvx, no installation required):
{
"mcpServers": {
"finding-model-search": {
"command": "uvx",
"args": ["--from", "findingmodel", "findingmodel-mcp"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}Alternative (if findingmodel is already installed):
{
"mcpServers": {
"finding-model-search": {
"command": "findingmodel-mcp",
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}Note: The server requires an OpenAI API key for semantic search functionality. Set the OPENAI_API_KEY environment variable or configure it in your .env file.
Search for finding models using hybrid search (FTS + semantic with Reciprocal Rank Fusion).
Parameters:
query(string, required): Search query (e.g., "pneumothorax", "lung nodule")limit(integer, optional): Maximum results to return (default: 10, max: 100)tags(array of strings, optional): Filter by tags - models must have ALL specified tags
Returns: SearchResponse object containing:
query: The search query usedlimit: The limit appliedtags: Tags used for filtering (if any)result_count: Number of results returnedresults: Array of SearchResult objects, each containing:oifm_id: Unique identifiername: Display nameslug_name: URL-friendly namefilename: Source filenamedescription: Detailed descriptionsynonyms: Alternative namestags: Associated tagscontributors: List of contributorsattributes: Array of attributes with id, name, and type
Example usage in Claude:
Search for pneumothorax finding models with a limit of 5 results
Retrieve a specific finding model by its ID, name, or synonym.
Parameters:
identifier(string, required): OIFM ID, name, slug name, or synonym to look up
Returns: SearchResult object or null if not found
Example usage in Claude:
Get the finding model with ID OIFM_RSNA_000001
Get statistics about the finding model index.
Parameters: None
Returns: Object with counts:
finding_models: Total number of finding modelspeople: Total number of contributors (people)organizations: Total number of organizations
Example usage in Claude:
How many finding models are in the index?
By default, the MCP server automatically downloads and uses the latest version of the Finding Model Repository Index. No manual configuration is required.
The database is downloaded from a trusted remote source and cached locally at:
- Linux/macOS:
~/.local/share/findingmodel/finding_models.duckdb - Windows:
%LOCALAPPDATA%\findingmodel\finding_models.duckdb
If you need to use a custom database file (e.g., for development or offline use), set the FINDINGMODEL_DB_PATH environment variable:
export FINDINGMODEL_DB_PATH=/path/to/your/custom/database.duckdbWhen using a custom path without additional configuration, the file will be used directly without verification or download attempts.
uv run pytest test/test_mcp_server.py -vuv run mypy src/findingmodel/mcp_server.pyuv run ruff check src/findingmodel/mcp_server.py
uv run ruff format src/findingmodel/mcp_server.pyError: ConfigurationError: OpenAI API key not configured
Solution: Set the OPENAI_API_KEY environment variable or add it to your .env file:
export OPENAI_API_KEY=your-api-key-hereSolution:
- Verify the configuration file path is correct for your OS
- Restart Claude Desktop after updating the configuration
- Check the Claude Desktop logs for errors
The MCP server follows these design principles:
- Stateless: Each tool call is independent
- Type-safe: All inputs and outputs use Pydantic models for validation
- Comprehensive: Provides both search and retrieval capabilities
- Efficient: Uses hybrid search with RRF fusion for best results
To add new tools or modify existing ones:
- Add the tool function in
src/findingmodel/mcp_server.py - Decorate it with
@mcp.tool() - Provide comprehensive docstrings (used by AI to understand the tool)
- Add tests in
test/test_mcp_server.py - Update this documentation
MIT License - see LICENSE file for details.