folio-mcp
Provides AI agents with searchable, browsable access to the FOLIO legal ontology, using either the public API or a local ontology backend.
Search FOLIO concepts by label/synonym, definition text, or natural-language fact pattern with expanded query search.
Retrieve full concept records, export concepts as Markdown/JSON-LD/OWL XML, and inspect translations, identifiers, and cross-references.
Browse the 24 taxonomy branches and navigate parent/child concept hierarchies.
Run precise concept/property queries using text and structural filters.
Inspect OWL object properties, domains/ranges, inverses, and semantic triples/connections.
Extract/tag legal concepts mentioned in pasted text.
Use guided prompts/resources for legal document classification, area-of-law/entity classification, ontology stats, and branch browsing.
Optionally extract and map legal citations when the
kaosextra is installed.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@folio-mcp search for concepts related to contract law"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
folio-mcp
MCP server for FOLIO, the Federated Open Legal Information Ontology.
FOLIO is an open-source legal ontology with 18,000+ concepts covering areas of law, document types, legal entities, governmental bodies, and more. This MCP server makes the full ontology available to AI agents as searchable, browsable tools.
A public REST API is already available at https://folio.openlegalstandard.org/ with interactive Swagger documentation at /docs. This MCP server wraps the same ontology for native use in AI coding assistants and agent frameworks.
License: MIT (server code) / CC-BY 4.0 (ontology data)
Backends
folio-mcp supports two interchangeable backends:
Mode | Startup | Dependencies | Use case |
API (default) | Instant |
| Normal usage — calls the public FOLIO REST API |
Local ( | ~10s |
| Offline use or when mounting inside folio-api |
API mode (default)
The server starts instantly and delegates all queries to the public API at https://folio.openlegalstandard.org/. No local ontology loading required.
Local mode
Loads the full FOLIO ontology in-process (~18k classes). Useful for offline work or when embedded in folio-api.
# Install with local dependencies
pip install folio-mcp[local]
# Run in local mode
folio-mcp --local
# Or via environment variable
FOLIO_MCP_LOCAL=1 folio-mcpCustom API URL
Point to a different FOLIO API instance:
folio-mcp --api-url https://my-folio-instance.example.comRelated MCP server: Legal Court MCP Server
Installation
Claude Code
claude mcp add folio -- uvx folio-mcpClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"folio": {
"command": "uvx",
"args": ["folio-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"folio": {
"command": "uvx",
"args": ["folio-mcp"]
}
}
}VS Code
Add to your User Settings (JSON):
{
"mcp": {
"servers": {
"folio": {
"command": "uvx",
"args": ["folio-mcp"]
}
}
}
}Remote (Streamable HTTP)
Connect to the hosted endpoint:
https://folio.openlegalstandard.org/mcpManual (pip)
pip install folio-mcp
folio-mcpTools (13, plus 1 optional)
Tool | Description |
| Search concepts by label/name using fuzzy matching (start here; max 50) |
| Loose fuzzy search over definition text (fallback) |
| Advanced query with composable text and structural filters |
| Query OWL object properties by label, domain, range |
| Get full details for a concept by IRI |
| Export a concept as markdown, JSON-LD, or OWL XML |
| List all 24 taxonomy branches with concept counts |
| Get concepts in a taxonomy branch |
| Get child concepts |
| Get parent concepts |
| List all OWL object properties (iri, label, short definition) |
| Find semantic triples |
| Tag pasted text with the FOLIO concepts it mentions (label/synonym dictionary match; first call builds the index in ~1s) |
| Optional, needs the |
extract_citations is registered only when kaos-citations is installed:
uvx --python 3.13 --from 'folio-mcp[kaos]' folio-mcpBrowse operations return compact summaries (iri, label, definition). Use get_concept(iri) for full details including translations (31% of concepts, 10+ languages), preferred labels, external identifiers, and cross-references.
Prompts (3)
Prompt | Description | Argument |
| Classify a legal document against the FOLIO taxonomy |
|
| Identify applicable areas of law for a situation |
|
| Classify a legal entity (person, org, role) |
|
Each prompt guides the LLM through the correct tool workflow and returns structured output (FOLIO label, IRI, definition, confidence, reasoning).
Resources (3)
Resource URI | Description |
| Branch names with concept counts (564 bytes) |
| Ontology statistics — version, class/property counts, license |
| Top-level concepts in a specific branch (on-demand) |
Taxonomy Branches
The FOLIO ontology is organized into 24 top-level branches:
Branch | Description |
| Parties, roles, and participants in legal matters |
| Legal practice areas and specializations |
| Types of assets (real property, intellectual property, etc.) |
| Communication channels and methods |
| Monetary currencies |
| Data and file formats |
| Legal documents, contracts, filings |
| Terms of engagement and fee arrangements |
| Legal events and milestones |
| Courts, tribunals, and dispute resolution venues |
| Government agencies and departments |
| Industry sectors and classifications |
| Natural languages |
| FOLIO internal type classifications |
| Statutes, regulations, case law |
| Entity types (corporations, LLCs, trusts, etc.) |
| Geographic locations and jurisdictions |
| Matter descriptions and narratives |
| Formats for matter narratives |
| Legal objectives and goals |
| Legal services and service types |
| Standards and compatibility mappings |
| Status values for matters, documents, etc. |
| System and external identifiers |
Development
# Clone and install
git clone https://github.com/alea-institute/folio-mcp.git
cd folio-mcp
uv sync
# Run tests (requires folio-python for local backend tests)
uv sync --extra local
uv run pytest tests/
# Run with MCP Inspector
uv run mcp dev folio_mcp/server.py
# Run locally for Claude Code
claude mcp add folio-dev -- uv run --directory /path/to/folio-mcp folio-mcpLinks
FOLIO REST API — public API for direct HTTP access
FOLIO API Docs (Swagger) — interactive API documentation
folio-python — Python client library
folio-api — REST API server
Available Tools
14 toolsexport_conceptA
Export one FOLIO concept as Markdown, JSON-LD or OWL/XML (for documents or other systems). For reading a concept yourself, get_concept is more compact.
Args: iri: The concept IRI or short ID. format: "markdown" (default), "jsonld", or "owl_xml".
Returns: The concept in the requested format, or {error, hint}.
Inputs: iri (required), format. Returns: result
extract_conceptsA
Tag a passage of text with the FOLIO concepts it mentions.
Paste a fact pattern, clause, email, or brief excerpt; returns every FOLIO concept whose label or synonym appears in it (e.g., "tenant", "eviction", "temporary restraining order", "Bankruptcy Court", "EEOC"), with its branch. Dictionary matching, not inference: use it as a fast first pass, then get_concept(iri) or the classification prompts for judgment calls. The first call builds the label index (about 2s).
Args: text: The text to tag (up to 100,000 characters). limit: Maximum concepts to return, in order of first mention (default 50). branch: Optional branch filter, e.g. "areas_of_law", "document_artifacts", "actors_players", "forum_venues" (see list_branches).
Returns: JSON {"count", "concepts": [{iri, label, branch, match_type, matched_text, count, first_offset}]}.
Inputs: text (required), limit, branch. Returns: result
find_connectionsA
Find explicit property links (subject -> property -> object triples) from a FOLIO concept, e.g. Actor / Player -folio:drafted-> Document / Artifact.
FOLIO records only a small number of these links (mostly on top-level classes), so most concepts have none. For broader/narrower relationships use get_parents/get_children; for related concepts see "see_also" in get_concept.
Args: subject_iri: IRI or short ID of the subject concept (branch names accepted). property_name: Optional property label (e.g. "folio:drafted") or IRI. object_iri: Optional object concept IRI to filter by.
Returns: JSON array of {subject, property, object} (each {iri, label}), or {results: [], note} when the concept has no recorded links.
Inputs: subject_iri (required), object_iri, property_name. Returns: result
get_childrenA
Get the narrower (child) concepts of a FOLIO concept.
Args: iri: A concept IRI or short ID. A branch name such as "areas_of_law" is also accepted and returns that branch's top-level concepts. max_depth: 1 (default) = direct children. Up to 3; prefer drilling down one level at a time.
Returns: JSON array of {iri, label, definition}; capped at 100 items as {results, truncated, total, note}.
Inputs: iri (required), max_depth. Returns: result
get_conceptA
Get the full record for one FOLIO concept: definition, synonyms, translations, examples, parent/child IRIs, identifiers and cross-references.
Args: iri: A full IRI ("https://folio.openlegalstandard.org/RSYBzf149Mi5KE0YtmpUmr"), a short ID ("RSYBzf149Mi5KE0YtmpUmr"), or a branch name such as "areas_of_law" (returns that branch's root concept). Not a free-text name — use search_concepts to find the IRI first.
Returns: JSON object with all non-empty fields, or {error, hint}.
Inputs: iri (required). Returns: result
get_parentsA
Get the broader (parent) concepts of a FOLIO concept. A concept can have several parents (FOLIO is a polyhierarchy).
Args: iri: A concept IRI or short ID. max_depth: 1 (default) = direct parents; up to 3 for grandparents etc.
Returns: JSON array of {iri, label, definition}. Empty for a branch root.
Inputs: iri (required), max_depth. Returns: result
get_propertiesA
List all FOLIO object properties (relationship types such as "folio:advised", "folio:drafted", "folio:isGovernedBy", "oasis:hasActor").
Compact listing: iri, label and short definition only. For domain/range details, or to filter, use query_properties.
Returns: JSON array of {iri, label, definition}.
Inputs: no named parameters. Returns: result
get_taxonomy_branchA
Browse the top-level concepts of a FOLIO taxonomy branch.
Args: branch_name: A branch name from list_branches(), e.g. "areas_of_law", "document_artifacts", "actors_players". Close variants such as "Areas of Law" or "AREA_OF_LAW" are accepted. max_depth: 1 (default) = top level only. Up to 3, but deeper levels can be large; prefer get_children(iri) on the relevant concept.
Returns: JSON array of {iri, label, definition} (definitions shortened; use get_concept for full text). Large results are capped at 100 items and returned as {results, truncated, total, note}.
Inputs: branch_name (required), max_depth. Returns: result
list_branchesA
List the 24 top-level FOLIO taxonomy branches with their number of top-level concepts (e.g. areas_of_law, document_artifacts, legal_entities, actors_players, industries, locations).
Returns: JSON object mapping branch name to top-level concept count.
Inputs: no named parameters. Returns: result
query_conceptsA
Filter FOLIO concepts by exact field matches and structure (not ranked).
Use this for precise filters, e.g. every area of law whose label contains "tax", or concepts whose definition mentions "fiduciary". For "find the concept called X", search_concepts ranks better. All filters are ANDed; give at least one.
Text filters: label: Match the primary label. definition: Match the definition text. alt_label: Match alternative labels / synonyms. example: Match examples. any_text: Match any text field (label, definition, synonyms, examples, notes).
Structural filters: branch: Branch name from list_branches(), e.g. "areas_of_law" (also accepts "AREA_OF_LAW"). parent_iri: Only descendants of this concept (IRI, short ID or branch name). has_children: True = non-leaf concepts only, False = leaf concepts only. deprecated: Include deprecated concepts (default False). country: Match the country field.
Control: match_mode: "substring" (default, case-insensitive), "exact", "regex", or "fuzzy". limit: Maximum results (default 20, max 100).
Returns: JSON array of {iri, label, definition}.
Inputs: label, limit, branch, country, +8 more. Returns: result
query_propertiesA
Filter FOLIO object properties (relationship types), with full domain/range detail.
Text filters: label: Match the property label, e.g. "advised", "drafted", "governed", "hasActor". definition: Match the property definition.
Structural filters: domain_iri: Only properties whose domain includes this class IRI. range_iri: Only properties whose range includes this class IRI. has_inverse: True = only properties with inverses, False = only without.
Control: match_mode: "substring" (default), "exact", "regex", or "fuzzy". limit: Maximum results (default 20, max 100).
Returns: JSON array of {iri, label, definition, domain, range, inverse_of, sub_property_of}.
Inputs: label, limit, range_iri, definition, +3 more. Returns: result
search_conceptsA
Find FOLIO concepts by name. START HERE for almost every question.
Fuzzy-matches the query against concept labels and synonyms (alternative labels, abbreviations, translations of names). Works best with a short legal term or noun phrase, not a sentence: "noncompete agreement", "motion to dismiss", "landlord tenant", "LLC", "breach of contract". For a paragraph of facts, pick out the key legal terms and search each one.
Args: query: A short concept name (2-6 words). limit: Maximum results (default 10, max 50).
Returns: JSON array of {iri, label, definition, score}; score is 0-100, higher is better. Pass an iri to get_concept for the full record.
Inputs: query (required), limit. Returns: result
search_definitionsA
Fuzzy search over concept DEFINITIONS. Fallback only — use search_concepts first.
Ranking is loose: results often share only a few common words with the query, so read each definition before relying on a hit. For an exact word or phrase inside definitions, query_concepts(definition="...") is more precise.
Args: query: A short descriptive phrase (e.g. "duty of loyalty to beneficiaries"). limit: Maximum results (default 10, max 50).
Returns: JSON array of {iri, label, definition, score}.
Inputs: query (required), limit. Returns: result
search_expandedA
Search FOLIO with a plain-English question or fact pattern.
An LLM rewrites the query into synonyms and legal terms of art (e.g. "my landlord won't fix the heat" -> "Implied Warranty of Habitability", "Constructive Eviction"), searches each, and merges the results by rank. Use this for natural-language or situational queries; use search_concepts when you already know the concept's name. The first call for a query takes a few seconds; repeats are cached. If the LLM is unavailable it returns plain label-search results with an empty expansions list.
Args: query: Natural-language description (e.g., "fired for reporting safety violations"). limit: Maximum results (default 10, max 50). include_definitions: Also match concept definitions (default false).
Returns: JSON object: query, expansions, expansion_source ("llm", "cache" or "none"), and results [{iri, label, definition, score, matched_via}].
Inputs: query (required), limit, include_definitions. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
The numerous search tools (search_concepts, search_definitions, search_expanded, query_concepts, extract_concepts) are unusually well-differentiated by explicit guidance ('START HERE', 'Fallback only', precise filters, natural-language queries), so an agent can pick correctly. The one genuine overlap is get_taxonomy_branch vs get_children: both accept a branch name and return that branch's top-level concepts, and get_children vs find_connections both touch related-concept traversal.
Every tool follows a clean snake_case verb_noun pattern (search_concepts, get_concept, query_properties, extract_concepts, list_branches). The verb choice is semantically meaningful and consistent across search/get/list/query/export families.
14 tools is squarely within the ideal range and each maps to a distinct capability (search, retrieve, navigate, filter, extract, export). Nothing feels redundant or padded for a taxonomy-browsing server.
The read-only surface is thorough for a taxonomy server: discovery, full-record retrieval, hierarchical navigation (parents/children/branches), property filtering, relation triples, text extraction, and export all exist. Minor gaps: no batch get_concept for multiple IRIs at once (a common post-search step) and subtree traversal is capped at depth 3, forcing iterative drill-down.
Maintenance
Related MCP Connectors
- ORANO MCP ServerDeprecatedio.github.infotik
Read-only MCP server exposing a user ORANO library to their own AI agent.
MCP server for querying Forkast documentation
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseAqualityFmaintenanceMCP server for AgentFolio — the identity and reputation layer for AI agents. Query agent profiles, trust scores, verification status, and marketplace listings through 8 MCP tools.9129 npm1MIT
- AlicenseAqualityDmaintenanceMCP Server providing AI agents access to over 3 million US court decisions via CourtListener and EU legislation via EUR-Lex, with tools for searching cases, citations, judges, and court information.6MIT

Vaquill-AI/vaquill-mcpofficial
AlicenseAqualityBmaintenanceMCP server for Vaquill legal research API. Covers US federal + 50-state law (USC, CFR, state legislation, CourtListener case law)52114 PyPI11MIT- AlicenseAqualityDmaintenanceMCP server for the OpenAlex scholarly database, providing AI agents with tools to search and retrieve academic works, authors, and institutions via natural language queries.8MIT