RDF Validation Deployment
commited on
Commit
·
954b0c9
1
Parent(s):
e344fcd
Update README.md for MCP submission guidelines
Browse files
README.md
CHANGED
@@ -8,7 +8,50 @@ sdk_version: 5.33.0
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: cc0-1.0
|
11 |
-
|
12 |
---
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: cc0-1.0
|
11 |
+
tag: "mcp-server-track"
|
12 |
---
|
13 |
|
14 |
+
# Mcp4rdf - RDF Validation Server with AI
|
15 |
+
|
16 |
+
**Space Link:** [https://huggingface.co/spaces/jimfhahn/mcp4rdf](https://huggingface.co/spaces/jimfhahn/mcp4rdf)
|
17 |
+
|
18 |
+
This is a Gradio app that serves as an RDF validation tool and an MCP (Model Context Protocol) server. It allows users to validate RDF/XML content against SHACL schemas, and provides AI-powered suggestions and corrections for validation errors using a Hugging Face Inference Endpoint.
|
19 |
+
|
20 |
+
**Track:** MCP Server / Tool
|
21 |
+
**Tag:** `mcp-server-track`
|
22 |
+
|
23 |
+
## MCP Server in Action
|
24 |
+
|
25 |
+
The MCP server can be tested by connecting an MCP client to the Gradio app's API endpoint.
|
26 |
+
The application is live and can be accessed at the Space Link above.
|
27 |
+
|
28 |
+
## Features:
|
29 |
+
- Real-time RDF/XML validation against SHACL schemas (Monograph and custom templates).
|
30 |
+
- AI-powered error suggestions and corrections via a Hugging Face Inference Endpoint.
|
31 |
+
- Built-in examples for valid, invalid, and BibFrame RDF.
|
32 |
+
- Auto-validation as you type.
|
33 |
+
- Easy-to-use Gradio interface.
|
34 |
+
- Exposes MCP server functionality for clients like Claude Desktop.
|
35 |
+
|
36 |
+
## MCP Server Tools Exposed:
|
37 |
+
- `validate_rdf_tool`: Validate RDF/XML against SHACL shapes.
|
38 |
+
- `get_ai_suggestions`: Get AI-powered fix suggestions.
|
39 |
+
- `get_ai_correction`: Generate corrected RDF/XML.
|
40 |
+
- `get_rdf_examples`: Retrieve example RDF snippets.
|
41 |
+
|
42 |
+
## Setup and Deployment on Hugging Face Spaces:
|
43 |
+
|
44 |
+
1. **Hugging Face Space:** This application is deployed at [https://huggingface.co/spaces/jimfhahn/mcp4rdf](https://huggingface.co/spaces/jimfhahn/mcp4rdf).
|
45 |
+
2. **Inference Endpoint:** The application is configured to use a specific Hugging Face Inference Endpoint for AI features.
|
46 |
+
3. **API Key:** To enable AI features, the `HF_API_KEY` (your Hugging Face API token with access to the Inference Endpoint) must be set as a Secret in the Space settings.
|
47 |
+
* Go to your Space → Settings → Repository secrets.
|
48 |
+
* Add: `HF_API_KEY` = `your_huggingface_api_key_here`.
|
49 |
+
4. **Requirements:** The Space automatically installs dependencies from `requirements.txt`.
|
50 |
+
|
51 |
+
## MCP Connection:
|
52 |
+
1. When deployed on Hugging Face Spaces, the MCP server is available at:
|
53 |
+
`https://jimfhahn-mcp4rdf.hf.space/gradio_api/mcp/sse` (Note: The Space ID `jimfhahn-mcp4rdf` might vary slightly based on HF naming conventions, please verify the exact URL from your Space).
|
54 |
+
2. Use this URL in your MCP client's configuration (e.g., Claude Desktop).
|
55 |
+
|
56 |
+
## Acknowledgments:
|
57 |
+
This application utilizes concepts and profiles inspired by the work of the [DCMI DCTAP Community Group](https://bf-interop.github.io/DCTap/).
|