typst-mcp
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.
typst-docs-neo4j
A deterministic Knowledge Graph for the Typst 0.15.1 Documentation, packaged for Neo4j (LOAD CSV + Bolt auto-loader) alongside a zero-setup SQLite FTS5 mirror and a Model Context Protocol (MCP) server for AI coding assistants.
Why a Graph Instead of Plain Vector RAG?
Chunk-based vector search frequently breaks Typst's tightly interconnected semantics across pages—such as set/show rules, element parameters, type unions (color | gradient | tiling), and method signatures.
By parsing the official Typst documentation PDF deterministically (no LLM extraction hallucinations) using its Table of Contents tree, coordinate-filtered layout blocks, and 8,699 internal PDF hyperlinks, this repository preserves exact multi-hop relationships:
Traverse
Element -> Parameter -> Typeto find every component that acceptsgradientor every parameter configurable via#set.Combine Full-Text Search entry points with 1–2 hop graph traversal (
REFERENCES,ACCEPTS_TYPE,RETURNS_TYPE,HAS_METHOD,DEFINES) to feed AI assistants compact, accurate API context.
Related MCP server: fw-context-mcp
Graph Schema
flowchart LR
Chapter["Chapter / Category / Module"] -->|HAS_CHILD / DEFINES| Symbol["Element / Function / Type"]
Symbol -->|HAS_PARAMETER| Param["Parameter"]
Symbol -->|HAS_METHOD| Method["Method"]
Param -->|ACCEPTS_TYPE| TypeNode["Type"]
Symbol -->|RETURNS_TYPE| TypeNode
Method -->|RETURNS_TYPE| TypeNode
Symbol -->|REFERENCES| SymbolDataset Stats (Typst 0.15.1 — 692 Pages)
Metric | Count | Breakdown |
Nodes ( | 2,732 |
|
Relationships | 11,454 |
|
Quickstart
Prerequisites
Python 3.10+ and
uvNeo4j 5+ (via Neo4j Desktop 2 or Docker Compose) — optional if you only want the local SQLite-backed MCP server
git clone https://github.com/<your-username>/typst-docs-neo4j.git
cd typst-docs-neo4j
uv syncOption 1: Load into Neo4j Desktop 2
Open Neo4j Desktop 2 and start your DBMS (default Bolt URI:
bolt://localhost:7687).Run the Bolt auto-loader (reads directly from the included
data/typst_graph.db, zero APOC plugins required):
uv run typst-load-neo4j --password "YOUR_NEO4J_PASSWORD" --clearIn Neo4j Desktop 2, open your DBMS
importfolder (...→ Open folder → Import).Copy
data/neo4j/nodes.csvanddata/neo4j/edges.csvinto thatimportfolder.Open Neo4j Browser and run
data/neo4j/schema.cypher.Then run
data/neo4j/import_csv.cypher.
Option 2: Spin Up Neo4j via Docker Compose
cp .env.example .env # edit NEO4J_PASSWORD if desired
docker compose up -d
uv run typst-load-neo4j --password typstgraph123 --clearNeo4j Browser will be available at http://localhost:7474.
Option 3: Connect the MCP Server (typst-mcp) to Your AI Client
The MCP server runs in auto mode:
When
NEO4J_PASSWORDis configured and Neo4j is reachable, queries run against Neo4j (Full-Text Index + Cypher).When Neo4j is stopped or unconfigured, it seamlessly falls back to the bundled SQLite FTS5 mirror (
data/typst_graph.db) with identical tool outputs.
Add this to your mcp_config.json (Antigravity / Claude Desktop / Cursor):
{
"mcpServers": {
"typst-docs-neo4j": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/typst-docs-neo4j",
"run",
"typst-mcp"
],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
}
}
}
}(To use SQLite-only mode with zero database setup, omit the env block or set "TYPST_GRAPH_BACKEND": "sqlite".)
Available MCP Tools
search_typst_docs(query, kind?, limit?)— Full-text search with exact symbol name boostingget_symbol_context(symbol, include_content?, max_refs?)— Full node details, parameters, defaults, methods, return types, and incoming/outgoing cross-referencesfind_by_type(type_name, role?, limit?)— Find all symbols accepting or returning a given typefind_settable_params(element_name)— List all#set-able parameters of an elementtraverse_related(node_id_or_symbol, hops?, limit?)— Multi-hop graph traversal (1..3hops)get_section_content(section_num_or_id)— Fetch verbatim documentation text and child sectionsgraph_stats()— Active backend and node/relationship counts
Example Cypher Queries
See queries/examples.cypher for more ready-to-run Neo4j Browser queries.
// 1. Visualize `heading` parameters, accepted types, and cross-references
MATCH (h:Element {symbol_name: 'heading'})-[r1:HAS_PARAMETER]->(p:Parameter)
OPTIONAL MATCH (p)-[r2:ACCEPTS_TYPE]->(t:Type)
OPTIONAL MATCH (h)-[r3:REFERENCES]->(ref:DocNode)
RETURN h, r1, p, r2, t, r3, ref
LIMIT 80;
// 2. Hybrid Full-Text Search + 1-hop context expansion
CALL db.index.fulltext.queryNodes('typst_doc_fulltext', 'show rule numbering') YIELD node, score
WITH node, score LIMIT 5
OPTIONAL MATCH (node)-[:HAS_PARAMETER|HAS_METHOD|DEFINES|REFERENCES]-(neighbor:DocNode)
RETURN node.id AS id, node.kind AS kind, node.title AS title,
round(score, 2) AS relevance,
collect(DISTINCT coalesce(neighbor.qualified_name, neighbor.title))[0..10] AS connected_concepts;Re-extracting from a Newer Typst Documentation PDF
uv run typst-extract --pdf path/to/typst-documentation.pdfThis regenerates data/typst_graph.db and data/neo4j/* (nodes.csv, edges.csv, schema.cypher, import_csv.cypher).
Running Tests
uv run pytest -vLicense & Attribution
Repository code and extraction pipeline: Apache License 2.0.
Extracted documentation content: derived from the official Typst Documentation (0.15.1) by Laurenz Mädje, Martin Haug, and The Typst Project Developers (Typst GmbH), licensed under Apache License 2.0 (
https://github.com/typst/typst).
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
Versioned documentation registry and semantic search for AI tools and coding assistants.
Search and query nTop's knowledge base and engineering guides from AI applications.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Semantic search over Handsontable and HyperFormula docs, API reference, release notes, and issues.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides access to Typst documentation, enabling users to search, browse, and read documentation for the Typst typesetting system through natural language queries.39-
- AlicenseAqualityAmaintenanceExposes tools for AI assistants to query a persistent SQLite+FTS5 index of C/C++ symbols parsed from real build commands, enabling sub-millisecond lookup, full-text search, and natural-language explanation without hallucination.37282 PyPI10MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to query a local AST code graph with topology analysis and link source symbols to ADR/Zettelkasten memory stored in Markdown and SQLite, supporting blast-radius review, drift detection, and session context.19 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search locally indexed documentation entirely offline, resolving libraries and retrieving relevant Markdown fragments under a token budget through SQLite FTS5 full-text search. Docs never leave the machine, with no API keys or cloud dependencies.223 PyPI3MIT