Install
$ agentstack add mcp-zongmin-yu-sqlite-literature-management-fastmcp-mcp-server ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Universal Source Management System
A lightweight FastMCP server for managing literature, notes, entity links, and reading-list resources in a local SQLite database.
Current Scope
This repository provides:
- Local SQLite-backed source management
- Notes attached to sources
- Entity links between sources and named concepts
- Read-only database inspection tools
- MCP resources for source lookup and reading lists
- Normalized identifier storage with a transitional JSON cache
It does not integrate with MCP Memory Server or an external memory graph.
Quick Start
- Create a database from the current schema:
sqlite3 sources.db `
- `source://by-identifier//`
- `reading-list://unread`
- `reading-list://reading`
- `entity://`
## Schema Notes
The current schema centers on four tables:
- `sources`
- `source_identifiers`
- `source_notes`
- `source_entity_links`
`sources.identifiers` is still kept as a transitional JSON cache, but identifier lookups now use `source_identifiers`.
Supported identifier types:
- `semantic_scholar`
- `doi`
- `arxiv`
- `openalex`
- `pmid`
- `isbn`
- `url`
Supported entity relation types:
- `discusses`
- `introduces`
- `extends`
- `evaluates`
- `applies`
- `critiques`
- `supports`
- `contradicts`
- `refutes`
Lightweight provenance fields live on `sources`:
- `provider`
- `discovered_via`
- `discovered_at`
The schema now uses `PRAGMA user_version = 3`.
## Migration
If you have a version 0 or version 1 database, apply:
```bash
sqlite3 /path/to/sources.db < migrations/2026-03-09__normalize-identifiers.sql
sqlite3 /path/to/sources.db < migrations/2026-03-09__expand-entity-relation-types.sql
If you already migrated to version 2, apply:
sqlite3 /path/to/sources.db < migrations/2026-03-09__expand-entity-relation-types.sql
These migrations:
- adds
source_identifiers - backfills identifier rows from the legacy JSON column
- adds provenance fields
- expands
source_entity_links.relation_typeto includesupports,contradicts, andrefutes - updates
PRAGMA user_versionto3
The server checks PRAGMA user_version on connection and will reject older databases until they are migrated.
Package Layout
The implementation is organized under sqlite_lit_server/:
app.pycreates the FastMCP instance and registers tools/resourcesdb.pyowns connection setup and schema-version checksrepository.pykeeps SQL-heavy lookup logic close to the data layertools_admin.py,tools_sources.py, andtools_entities.pyhold the MCP toolsresources.pydefines the MCP resources
sqlite-paper-fastmcp-server.py remains as a thin compatibility shim.
Batch Import Sources
add_sources is the batch import entrypoint for new sources. It accepts one argument named sources, where each item is:
[title, source_type, identifier_type, identifier_value, initial_note]
initial_note must be either null or an object with both title and content.
Supported source_type values:
paperwebpagebookvideoblog
Supported identifier_type values:
semantic_scholardoiarxivopenalexpmidisbnurl
Duplicate handling:
- Exact identifier matches return
Source already existstogether with the existing source payload. - Title-based fuzzy matches return
Potential duplicates found. Please verify or use add_identifiers if these are the same source. - Successful batch writes return one result per input item in the same order as the request.
Example MCP/JSON payload:
{
"sources": [
[
"Attention Is All You Need",
"paper",
"arxiv",
"1706.03762",
{
"title": "Initial thoughts",
"content": "Transformers start here."
}
],
[
"OpenAlex Import",
"paper",
"openalex",
"W1234567890",
null
]
]
}
Example Python call:
add_sources([
(
"Attention Is All You Need",
"paper",
"arxiv",
"1706.03762",
{
"title": "Initial thoughts",
"content": "Transformers start here.",
},
),
(
"OpenAlex Import",
"paper",
"openalex",
"W1234567890",
None,
),
])
The same tool payloads work whether you start the server locally or through Docker with docker compose run --rm sqlite-lit-mcp.
Batch Write Conventions
Plural write tools accept lists and return a per-input result list in the same order. Related batch tools include:
add_notesadd_identifiersupdate_statuslink_to_entities
Example Usage
Add another identifier:
add_identifiers([
(
"Attention Is All You Need",
"paper",
"arxiv",
"1706.03762",
"semantic_scholar",
"204e3073870fae3d05bcbc2f6a8e263d9b72e776",
),
])
Read a source resource:
source://by-identifier/arxiv/1706.03762
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: zongmin-yu
- Source: zongmin-yu/sqlite-literature-management-fastmcp-mcp-server
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.