sbkg-mcp
OfficialParses local Markdown files into knowledge graph triples.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sbkg-mcp
A personal knowledge graph exposed as an MCP server. Store notes, bookmarks, concepts, and their relationships as RDF triples in a persistent Oxigraph database — then query them with SPARQL from any MCP-compatible LLM client.
graph LR
subgraph Clients
A[Claude Code]
B[ChatGPT]
C[Any MCP Host]
end
subgraph MCP Protocol
D[Tools & Resources]
end
subgraph SBKG Server
E[Oxigraph Store<br/>RDF Triples]
F[Ontologies<br/>sbkg + SKOS<br/>DC + DOAP]
end
A --> D
B --> D
C --> D
D --> E
E --> FWhy a Knowledge Graph?
Flat notes and bookmarks get lost. A knowledge graph lets you:
Connect information across topics — a bookmark about React hooks automatically relates to your JavaScript notes, frontend project, and tutorial collection
Query with precision — "show me all bookmarks tagged
pythonthat I haven't read yet" is a single SPARQL queryBuild hierarchies — SKOS lets you express that
reactis a narrower concept underfrontend, so searching forfrontendfinds everythingCombine with other MCP servers — pull emails, calendar events, or GitHub issues from other MCP connectors and link them into your graph
Related MCP server: Zettelkasten MCP Server
Quick Start
Installation
# Clone and install
git clone https://github.com/netsemantics/sbkg-mcp.git
cd sbkg-mcp
uv pip install -e .MCP Configuration
Add to your Claude Code MCP config (~/.claude/settings.json or project-level):
{
"mcpServers": {
"sbkg": {
"command": "uv",
"args": ["run", "--directory", "/path/to/sbkg-mcp", "sbkg-mcp"]
}
}
}First Steps
Once connected, try these in your LLM client:
> "Add a bookmark for https://docs.pytest.org/ titled 'pytest docs' tagged with python and testing"
> "What bookmarks do I have?"
> "Show me everything tagged with 'python'"Examples
Add a bookmark and query it
User: Save this link — https://hypothesis.readthedocs.io/
Title it "Hypothesis Property-Based Testing" and tag it with python and testing.
LLM calls: sbkg_add_bookmark(
title="Hypothesis Property-Based Testing",
url="https://hypothesis.readthedocs.io/",
tags=["python", "testing"],
status="ToRead"
)User: What testing resources do I have?
LLM calls: sbkg_query_sparql("""
PREFIX sbkg: <http://sb.ai/kg/>
SELECT ?title ?url WHERE {
?b a sbkg:Bookmark .
?b sbkg:hasTag ?tag .
?tag sbkg:title "testing" .
?b sbkg:title ?title .
?b sbkg:sourceUrl ?url .
}
""")Batch import with SPARQL UPDATE
Instead of adding bookmarks one at a time, insert many in a single call:
User: Add these three bookmarks about Python testing.
LLM calls: sbkg_update_sparql("""
PREFIX sbkg: <http://sb.ai/kg/>
INSERT DATA {
<http://sb.ai/kg/bookmark/pytest-docs> a sbkg:Bookmark ;
sbkg:title "pytest documentation" ;
sbkg:sourceUrl "https://docs.pytest.org/" ;
sbkg:hasTag <http://sb.ai/kg/concept/python> ;
sbkg:hasTag <http://sb.ai/kg/concept/testing> ;
sbkg:hasStatus sbkg:Reference .
<http://sb.ai/kg/bookmark/hypothesis> a sbkg:Bookmark ;
sbkg:title "Hypothesis property-based testing" ;
sbkg:sourceUrl "https://hypothesis.readthedocs.io/" ;
sbkg:hasTag <http://sb.ai/kg/concept/python> ;
sbkg:hasTag <http://sb.ai/kg/concept/testing> ;
sbkg:hasStatus sbkg:ToRead .
<http://sb.ai/kg/bookmark/coverage-py> a sbkg:Bookmark ;
sbkg:title "Coverage.py" ;
sbkg:sourceUrl "https://coverage.readthedocs.io/" ;
sbkg:hasTag <http://sb.ai/kg/concept/python> ;
sbkg:hasTag <http://sb.ai/kg/concept/testing> ;
sbkg:hasStatus sbkg:ToRead .
}
""")Build concept hierarchies with SKOS
User: Set up a tag hierarchy — "react" and "vue" should be
subtopics of "frontend".
LLM calls: sbkg_update_sparql("""
PREFIX sbkg: <http://sb.ai/kg/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
INSERT DATA {
<http://sb.ai/kg/concept/react>
skos:broader <http://sb.ai/kg/concept/frontend> .
<http://sb.ai/kg/concept/vue>
skos:broader <http://sb.ai/kg/concept/frontend> .
<http://sb.ai/kg/concept/frontend>
skos:narrower <http://sb.ai/kg/concept/react> ;
skos:narrower <http://sb.ai/kg/concept/vue> .
}
""")Then query "everything under frontend" including subtopics:
PREFIX sbkg: <http://sb.ai/kg/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?title ?url WHERE {
?tag skos:broader* <http://sb.ai/kg/concept/frontend> .
?b sbkg:hasTag ?tag .
?b sbkg:title ?title .
?b sbkg:sourceUrl ?url .
}Track a software project
User: Register my-app as a project — it's a Python web app on GitHub.
LLM calls: sbkg_add_project(
name="my-app",
description="A web application for task management",
homepage="https://github.com/user/my-app",
repository="https://github.com/user/my-app.git",
programming_language="Python",
maintainers=["Jane Developer"],
tags=["python", "web"]
)This creates a DOAP project with repository, maintainer, and tag triples — no raw SPARQL needed.
Multi-MCP workflow: Email to knowledge graph
Direct email ingestion — if you have the raw email text, use sbkg_add_note_from_email for one-step parsing:
User: Add this email to my knowledge graph.
LLM calls: sbkg_add_note_from_email(raw_email=email_content)
→ Creates FleetingNote with sender as creator, recipients as mentions, "email" tagSynthesized notes — when combining with an email MCP server (e.g. Gmail, Outlook), the LLM can summarize multiple emails into a single note:
User: Check my recent emails about the conference and save
any useful info to my knowledge graph.
LLM calls: gmail_search(query="PyCon 2026", max_results=5)
→ Returns 3 emails with schedule and travel details
LLM calls: sbkg_add_note(
title="PyCon 2026 - Travel & Schedule",
content="Conference runs May 15-17. Talk accepted for Day 2. ..."
tags=["conference", "python", "travel"],
project="pycon-2026"
)
LLM calls: sbkg_add_bookmark(
title="PyCon 2026 Schedule",
url="https://us.pycon.org/2026/schedule/",
tags=["conference", "python"]
)See docs/examples.md for more workflows including GitHub integration, calendar events, and research pipelines.
Tools
Creating Data
Tool | Purpose | Key Parameters |
| Create a note with metadata and triples | title, content, note_type, tags, links, project, area, status |
| Create a bookmark entry | title, url, description, tags, status |
| Register a DOAP software project | name, description, homepage, repository, programming_language, maintainers, developers, tags |
| Parse a raw email into a FleetingNote | raw_email |
| Parse a local .md file into the graph | path |
| Bulk-load RDF from an in-memory string | data, format |
| Execute SPARQL UPDATE (INSERT/DELETE) | update |
Querying Data
Tool | Purpose | Key Parameters |
| Fetch all properties of a note by title | title |
| Search notes/bookmarks by title substring | query, entity_type, tag, limit |
| Run SPARQL SELECT/ASK/CONSTRUCT/DESCRIBE | sparql |
| Get ontology context for natural language → SPARQL | question |
| Find notes related via tags, links, project/area | title, max_results |
| Graph statistics (triple count, entity counts) | — |
| Return ontology as summary or Turtle | format |
| Load the comprehensive LLM usage guide | — |
Modifying & Managing Data
Tool | Purpose | Key Parameters |
| Update a note's fields (content, tags, status, etc.) | title, content, tags, status, project, area, links, note_type |
| SPARQL UPDATE for batch modify/delete/insert | update |
| Delete a note and all its triples | title |
| Delete a bookmark and its triples | title |
| Export graph in RDF format | format, path |
| Import RDF from a file | path, format |
| Wipe all data and reload ontology | confirm (must be true) |
Ontology
SBKG uses a modular ontology loaded from ontology/*.ttl:
File | Vocabulary | What it covers |
| Core | Notes, Bookmarks, Concepts, Projects, Areas, People, Tools |
| Concept hierarchies — broader, narrower, related, ConceptScheme | |
| Resource metadata — creator, dates, license, format, relations | |
| Software projects — repository, language, releases, maintainer |
The core sbkg:Concept class is aligned as a subclass of skos:Concept, enabling SKOS hierarchy queries to work across all tags.
Data Storage
Database:
~/Library/Application Support/sbkg/oxigraph/(macOS) or equivalent XDG pathFormat: Oxigraph persistent store (RocksDB-backed)
Exports:
~/Library/Application Support/sbkg/exports/
Development
# Run tests
uv run pytest tests/ -v
# Run the server directly
uv run sbkg-mcpLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Personal knowledge graph as an AI memory layer over MCP - read, save, and link your memories.
Query your own knowledge graph from any MCP client. The graph lives in a database you own.
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceBuilds a persistent knowledge graph from notes and conversations, enabling semantic search, entity exploration, and GTD task management from any MCP-compatible AI assistant.3-
- FlicenseNot gradedqualityAmaintenanceEnables users to create, link, explore, and synthesize atomic notes as a knowledge graph through Claude and other MCP-compatible clients. It supports tagging, search, note types, semantic link types, and Markdown-file storage indexed by SQLite.-
- FlicenseNot gradedqualityAmaintenanceEnables creating, linking, searching, exploring, and synthesizing atomic notes as a knowledge graph through MCP-compatible clients such as Claude. Supports tags, note types, semantic relationships, Markdown storage, and an SQLite index for efficient traversal.-
- FlicenseNot gradedqualityAmaintenanceEnables users to create, link, explore, and synthesize atomic notes through Claude and other MCP-compatible clients. Supports tagging, semantic links, search, and a Markdown/SQLite storage architecture for building and navigating a knowledge graph.-