folio-mcp
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 (12)
Tool | Description |
| Search concepts by label/name using fuzzy matching |
| Search concepts by definition text |
| 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 |
| Get all OWL object properties (relationships) |
| Find semantic triples |
Browse 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
12 toolsexport_conceptA
Export a FOLIO concept in a specific format.
Args: iri: The concept IRI or identifier. format: Output format — "markdown", "jsonld", or "owl_xml".
Returns: The concept in the requested format, or an error message.
Inputs: iri (required), format. Returns: result
find_connectionsA
Find semantic connections (triples) between FOLIO concepts.
Searches for subject-property-object triples. At minimum, provide a subject_iri. Optionally filter by property and/or object.
Args: subject_iri: IRI of the subject concept. property_name: Optional property name or IRI to filter by. object_iri: Optional object concept IRI to filter by.
Returns: JSON array of triples [{subject: {...}, property: {...}, object: {...}}].
Inputs: subject_iri (required), object_iri, property_name. Returns: result
get_childrenA
Get child concepts of a FOLIO concept. Returns compact summaries.
Args: iri: A concept IRI (e.g., "https://folio.openlegalstandard.org/R07tQM...") or short ID (e.g., "R07tQM..."). NOT a branch name — use get_taxonomy_branch for branch names like "areas_of_law". max_depth: Depth limit (default 1 for direct children). Keep at 1-2 to avoid large results.
Returns: JSON array of {iri, label, definition} summaries. Use get_concept(iri) for full details on a specific child.
Inputs: iri (required), max_depth. Returns: result
get_conceptA
Get full details for a specific FOLIO concept by IRI.
Accepts short IDs (e.g., "RSYBzf149Mi5KE0YtmpUmr"), full IRIs (e.g., "https://folio.openlegalstandard.org/RSYBzf149Mi5KE0YtmpUmr"), or partial matches.
Args: iri: The concept IRI or identifier.
Returns: Full JSON representation of the concept, or an error message.
Inputs: iri (required). Returns: result
get_parentsA
Get parent concepts of a FOLIO concept. Returns compact summaries.
Args: iri: A concept IRI (e.g., "https://folio.openlegalstandard.org/R07tQM...") or short ID. NOT a branch name. max_depth: Depth limit (default 1 for direct parents).
Returns: JSON array of {iri, label, definition} summaries. Use get_concept(iri) for full details on a specific parent.
Inputs: iri (required), max_depth. Returns: result
get_propertiesA
Get all OWL object properties defined in the FOLIO ontology.
Returns properties that describe relationships between concepts (e.g., "hasJurisdiction", "appliesTo", "governedBy").
Returns: JSON array of properties with iri, label, definition, domain, and range.
Inputs: no named parameters. Returns: result
get_taxonomy_branchA
Get concepts in a FOLIO taxonomy branch. Returns compact summaries.
Args: branch_name: Branch name (e.g., "areas_of_law", "document_artifacts"). Use list_branches() to see all available branch names. max_depth: Depth limit. Use 1 (default) for top-level only. WARNING: depth >2 can return very large results. Navigate incrementally with get_children() instead.
Returns: JSON array of {iri, label, definition} summaries. Use get_concept(iri) for full details on a specific concept.
Inputs: branch_name (required), max_depth. Returns: result
list_branchesA
List all FOLIO taxonomy branches with concept counts.
Returns the 24 top-level categories of the FOLIO ontology (e.g., areas_of_law, document_artifacts, legal_entities).
Returns: JSON object mapping branch names to concept counts.
Inputs: no named parameters. Returns: result
query_conceptsA
Query FOLIO concepts with composable text and structural filters.
More powerful than search_concepts — supports field-specific matching, structural constraints, and multiple match modes. All specified filters must match (AND logic).
Text filters: label: Match against the concept's primary label (rdfs:label). definition: Match against the concept's definition (skos:definition). alt_label: Match against alternative labels (skos:altLabel). example: Match against examples (skos:example). any_text: Match against ALL text fields (label, definition, alt_labels, examples, notes, comment).
Structural filters: branch: Limit to a taxonomy branch (e.g., "AREA_OF_LAW", "CURRENCY", "LEGAL_ENTITY"). parent_iri: Only descendants of this IRI (transitive subClassOf). has_children: True = non-leaf concepts only, False = leaf concepts only. deprecated: Include deprecated concepts (default False). country: Match against the country field.
Control: match_mode: "substring" (default), "exact", "regex", or "fuzzy". limit: Maximum results (default 20).
Returns: JSON array of matching concepts.
Inputs: label, limit, branch, country, +8 more. Returns: result
query_propertiesA
Query FOLIO object properties with composable text and structural filters.
Replaces get_properties() when you need filtered results instead of the full list.
Text filters: label: Match against property label (e.g., "jurisdiction", "applies"). definition: Match against 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).
Returns: JSON array of matching properties with iri, label, definition, domain, range.
Inputs: label, limit, range_iri, definition, +3 more. Returns: result
search_conceptsA
Search FOLIO concepts by label (name).
Finds legal concepts whose names match the query using fuzzy matching. Use this as the primary entry point for finding concepts.
Args: query: Search term (e.g., "bankruptcy", "software license", "trust"). limit: Maximum number of results to return (default 10).
Returns: JSON array of matching concepts with iri, label, definition, and score.
Inputs: query (required), limit. Returns: result
search_definitionsA
Search FOLIO concepts by definition text.
Finds legal concepts whose definitions match the query. Use this when searching by name doesn't find what you need.
Args: query: Search term to match against definitions. limit: Maximum number of results to return (default 10).
Returns: JSON array of matching concepts with iri, label, definition, and score.
Inputs: query (required), limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools are clearly distinct (list_branches, get_children, get_parents, export_concept, find_connections). Minor overlap exists between search_concepts/search_definitions and the more powerful query_concepts, and between get_properties and query_properties, but descriptions explicitly differentiate their use cases.
All tool names follow a consistent verb_noun pattern in snake_case (list_, search_, get_, export_, find_, query_). The verbs are appropriate and predictable, making the set easy to navigate.
With 12 tools, the server is well-scoped for ontology exploration. Each tool has a clear role, though query_concepts and query_properties could potentially consolidate some simpler tools, the count is not excessive.
The tool surface comprehensively supports read-only exploration of the FOLIO ontology: browsing branches, searching by label/definition, navigating hierarchy, retrieving details, exporting, finding relationships, and querying with filters. No obvious gaps for typical use cases.
Maintenance
Related MCP Connectors
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.9128 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)25127 PyPI9MIT- 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