Skip to content

robsyc/ld-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI

Linked Data MCP

MCP server for AI agents to progressively access W3C Semantic Web specifications. Instead of dumping entire spec docs into the rotting context, it serves them section-by-section. Your AI can now look up that one SHACL 1.2 property it keeps forgetting about without burning 100k tokens.

Supported Standards

Family Specifications Namespace
RDF RDF 1.1/1.2 Primer, Concepts, Semantics, Turtle, TriG, N-Triples, N-Quads, JSON-LD rdf:, rdfs:
SPARQL SPARQL 1.1/1.2 Query, Update, Overview -
OWL OWL 2 Primer, Overview, Syntax, Profiles, RDF Mapping owl:
SHACL SHACL 1.1/1.2 Core, Advanced Features, SPARQL, Node Expressions, Rules, UI sh:
SKOS SKOS Primer, Reference skos:
PROV PROV Primer, Data Model, Ontology prov:
TIME OWL-Time time:

See the index.yaml file for the full list of specifications and namespaces. Please feel free to submit a PR to add more specifications and parsers.

Quick Start

Option 1: FastMCP Cloud (Recommended)

Fork the repo, configure the index.yaml and deploy to your own fastmcp.cloud instance (free for personal use). Afterwards, you can use their web ui to connect your agentic coding tool (e.g. Cursor, Claude Desktop, etc.) to the MCP server.

Option 2: Install as a tool

Prerequisites: Python 3.11+ and uv.

git clone https://github.com/robsyc/ld-mcp && cd ld-mcp
uv tool install .

Then add to your .cursor/mcp.json or Claude Desktop config:

{
  "mcpServers": {
    "ld-mcp": {
      "command": "ld-mcp"
    }
  }
}

Option 3: Run with uv

git clone https://github.com/robsyc/ld-mcp && cd ld-mcp
uv sync

Add to your .cursor/mcp.json or Claude Desktop config:

{
  "mcpServers": {
    "ld-mcp": {
      "command": "uv",
      "args": ["tool", "run", "ld-mcp"]
    }
  }
}

Available Tools

Tool Description
list_specifications(family?) Browse spec families (RDF, SPARQL, OWL, SHACL, SKOS, etc.)
list_sections(spec_key, depth?) Get TOC with section IDs
get_section(spec_key, section_id) Get markdown content for a section
list_resources(ns_key) List classes/properties in a namespace
get_resource(ns_key, resource) Get Turtle definition of a resource

Configuration

Variable Description Default
SPEC_VERSIONS Filter by version (e.g., "1.2") All
CACHE_TTL Cache TTL in seconds 86400 (24 hours)
INDEX_PATH Path to a custom index.yaml Bundled default

Development

uv sync --group dev

# Validate all specs/namespaces
uv run pytest tests/test_index.py -v

# Lint
uv run ruff check src/ tests/

# MCP Inspector (web UI for testing tools)
uv run fastmcp dev inspector src/ld_mcp/server.py:mcp

Adding Specifications

  1. Add entry to src/ld_mcp/index.yaml
  2. Run uv run pytest tests/test_index.py -v -k "your_spec_key"
  3. Push to main — CI validates automatically

Acknowledgments

About

Linked Data MCP - A Python-based MCP server for QA over W3C semantic web and linked data standard specifications: RDF, RDFS, SPARQL, OWL, SHACL and more

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages