Spaces:
Running
A newer version of the Gradio SDK is available:
6.1.0
title: BIBFRAME Ontology Documentation MCP Server
emoji: π
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.0.0
app_file: app.py
pinned: false
π BIBFRAME Ontology Documentation MCP Server
A Model Context Protocol (MCP) server that provides BIBFRAME ontology documentation for LLMs like Claude. Built with Gradio, this server dynamically loads from the official BIBFRAME ontology at id.loc.gov.
π Live Server
Deployed at: https://jimfhahn-mcp4bibframe-docs.hf.space
MCP Endpoint: https://jimfhahn-mcp4bibframe-docs.hf.space/gradio_api/mcp/
β¨ Features
- β MCP Server: Full MCP protocol support for LLM integration
- π Live Ontology Data: Loads from official BIBFRAME ontology
- π Four MCP Tools:
get_property_info- Detailed property information with examplesget_class_info- Class documentation with applicable propertiessearch_ontology- Search for properties or classesget_property_usage- Context-specific usage information
- π Web UI: Interactive Gradio interface for testing
- βοΈ Deployed on HF Spaces: Hosted for free on Hugging Face
π Quick Start with Claude Desktop
Add this to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bibframe-docs": {
"url": "https://jimfhahn-mcp4bibframe-docs.hf.space/gradio_api/mcp/"
}
}
}
For a hosted version on Hugging Face Spaces:
{
"mcpServers": {
"bibframe-docs": {
"url": "https://YOUR-USERNAME-mcp4bibframe-docs.hf.space/gradio_api/mcp/sse"
}
}
}
Note: Claude Desktop currently requires the mcp-remote bridge for SSE servers:
{
"mcpServers": {
"bibframe-docs": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:7860/gradio_api/mcp/sse"
]
}
}
}
Deploying to Hugging Face Spaces
- Create a new Space on Hugging Face
- Choose "Gradio" as the SDK
- Push this repository to your Space
- The MCP server will be available at:
https://YOUR-USERNAME-SPACE-NAME.hf.space/gradio_api/mcp/sse
Private Spaces
For private Spaces, add your Hugging Face token:
{
"mcpServers": {
"bibframe-docs": {
"url": "https://YOUR-SPACE.hf.space/gradio_api/mcp/sse",
"headers": {
"Authorization": "Bearer YOUR-HF-TOKEN"
}
}
}
}
MCP Tools Reference
get_property_info
Get detailed information about a BIBFRAME property from the official ontology.
Args:
property_uri (str): Full URI or short name (e.g., "bf:assigner" or "assigner")
Returns:
JSON with property information, domain, range, examples, and usage guidance
get_class_info
Get detailed information about a BIBFRAME class from the official ontology.
Args:
class_name (str): Class name (e.g., "Work", "bf:Work", or full URI)
Returns:
JSON with class information and applicable properties
search_ontology
Search the BIBFRAME ontology for properties or classes matching a term.
Args:
search_term (str): Term to search for
search_type (str): Type of search - "properties", "classes", or "all"
Returns:
JSON with matching properties and/or classes
get_property_usage
Get usage information for a property, optionally in the context of a specific class.
Args:
property_name (str): Property name (e.g., "assigner" or "bf:assigner")
class_name (str): Optional class context (e.g., "AdminMetadata")
Returns:
JSON with usage information and examples
Testing with MCP Inspector
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Test your server
npx @modelcontextprotocol/inspector http://localhost:7860/gradio_api/mcp/sse
Data Sources
- BIBFRAME Ontology - Official ontology from Library of Congress
- LC BIBFRAME Profiles - Application profiles
- DCTap Validation - Community validation patterns
Related Projects
- For SHACL validation: mcp4rdf validator
- BIBFRAME Homepage: https://www.loc.gov/bibframe/
- BIBFRAME Documentation: https://www.loc.gov/bibframe/docs/
License
MIT License - See LICENSE file for details
Contributing
Contributions welcome! Please open an issue or PR on GitHub.