cerif-mcp
Knowledge & Discovery: Browse the 293-entity CERIF catalog (
list_entities,get_entity), and explore canonical classification schemes (list_schemes,get_scheme).Validation: Validate CERIF 1.6 XML strings or files against the official XSD (
validate_xml,validate_file), reporting detailed errors with locations, all in-process without external dependencies.Generation: Build entity fragments (
build_entity), linking entities (build_link), and assemble them into complete CERIF documents (build_document).Analysis: Analyze document structure (
analyze_document), extract specific entity instances with XPaths (extract_entities), and look up IDs (lookup_in_document).Migration: Automatically migrate CERIF 1.5 XML to 1.6 (
migrate_15_to_16).PostgreSQL Integration: Generate DDL scripts for scaffolding CERIF-compliant databases (
generate_postgresql_ddl) and audit live PostgreSQL databases for CERIF conformity (audit_postgresql).
Provides tools to audit a PostgreSQL schema for CERIF 1.6 conformance and generate PostgreSQL DDL scripts from the CERIF data model.
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., "@cerif-mcp Validate the attached CERIF 1.6 XML"
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.
cerif-mcp
Model Context Protocol (MCP) server for CERIF 1.6 — understand, validate, generate and transform research information in the Common European Research Information Format (CERIF).
cerif-mcp gives any MCP-capable AI assistant a complete working knowledge of
the CERIF 1.6 data model and the ability to produce schema-valid CERIF
XML. It bundles the official euroCRIS CERIF_1.6_2.xsd and validates against
it fully in-process — no external service, no Java, no network at runtime.
It works with Claude Code, Codex, Antigravity, Kilo, opencode, Cline, Cursor, and any other MCP client.
What is CERIF?
CERIF (Common European Research Information Format) is the open standard data model for research information, maintained by euroCRIS. It is the backbone of CRIS (Current Research Information Systems) and of research-evaluation and open-science data flows across Europe and beyond.
CERIF 1.6 defines 293 entities: 19 core entities (Person, Organisation
Unit, Project, Funding, Result Publication/Patent/Product, Event, Facility,
Equipment, Service, …), 161 linking entities (relationships such as
cfProj_Pers or cfOrgUnit_Class), 71 language-dependent attributes (names,
titles, abstracts, keywords), and 42 supporting entities (classification
schemes and terms, languages, countries, currencies, federated identifiers,
addresses, Dublin Core, …).
Related MCP server: C2PA Knowledge Graph
Features
15 tools in 7 families
Family | Tool | Purpose |
Knowledge |
| Browse the 293-entity catalog, filter by kind, search |
Knowledge |
| Full definition of one entity (children, links, id) |
Knowledge |
| Canonical classification schemes (vocabularies) |
Knowledge |
| Full term list of a classification scheme |
Validation |
| Validate CERIF 1.6 XML against the official XSD |
Validation |
| Validate a CERIF 1.6 XML file on disk |
Generation |
| Generate a |
Generation |
| Generate a linking entity (e.g. |
Generation |
| Wrap fragments into a complete CERIF document |
Analysis |
| Summarize a document: entities, counts, namespace |
Analysis |
| Extract entity instances with XPaths |
Analysis |
| Find ids across a document |
Migration |
| Migrate CERIF 1.5 XML to 1.6 (namespace, schema location, |
PostgreSQL |
| Introspect a live PostgreSQL schema and cross-reference it with CERIF |
PostgreSQL |
| Generate a CERIF 1.6 PostgreSQL DDL script (tables, views, procedures) |
4 resources — cerif://entities, cerif://entities/{entity},
cerif://schemes/{id} and cerif://schema (the full XSD).
2 prompts — cerif_author (guided authoring workflow) and
cerif_validator (fix-until-valid loop).
Validation is real
Validation runs the bundled official euroCRIS schema
(CERIF_1.6_2.xsd, 5,134 lines, namespace urn:xmlns:org:eurocris:cerif-1.6-2)
in-process via xml-xsd-engine
(pure TypeScript, zero dependencies, MIT). Errors carry the message, XPath,
line/column, and an error code:
# Validation FAILED
## 1 error(s)
- Unexpected element <cfBogusElement> in <cfOrgUnit[1]> [VALID_UNEXPECTED_ELEMENT] at line 5, column 5
`/CERIF/cfOrgUnit[1]/cfBogusElement[2]`PostgreSQL support
The server can scaffold and audit a PostgreSQL database for CERIF 1.6.
generate_postgresql_ddlproduces a complete DDL script from the CERIF model. Thecorescope (default) emits the extended core: the 19 research-object entities (persons, organisations, projects, funds, services, facilities, equipment, publications, patents, products, events, prizes, qualifications, expertise/skills, measurements, indicators, CVs, media, geographic boxes), their language-dependent attribute tables (cf_proj_title,cf_pers_name, …), supporting tables (cf_class,cf_class_scheme,cf_eaddr,cf_paddr), and 90+ linking tables — every one withcfClassId/cfClassSchemeIdas required by thecfCoreClassWithFractiongroup. Thefullscope emits all 293 CERIF entities. Every script also includes denormalised views (v_<entity>) and helper functions (cerif_insert_<entity>,cerif_count_<entity>,cerif_add_classification).audit_postgresqlconnects to a live database (credentials in arguments orPG*environment variables — any user's database works, the tool discovers the schema itself), introspects tables/columns/primary keys/foreign keys/views/routines, and reports a conformity score, the missing required CERIF entities, which tables match (and their issues), orphan tables, and the routine inventory.
The generated DDL is tested end-to-end against PostgreSQL 16 in CI and during development; both scopes execute with zero errors.
Installation
Run directly (any client)
npx -y cerif-mcpInstall globally
npm install -g cerif-mcpBuild from source
git clone https://github.com/adialaleal/cerif-mcp.git
cd cerif-mcp
npm install
npm run build
npm start # or: npx cerif-mcpConfigure your client
Claude Code
.mcp.json in your project root, or claude mcp add:
claude mcp add cerif-mcp -- npx -y cerif-mcp{
"mcpServers": {
"cerif-mcp": {
"command": "npx",
"args": ["-y", "cerif-mcp"]
}
}
}Codex
codex mcp add cerif-mcp -- npx -y cerif-mcpCursor
Cursor Settings → MCP → Add server:
Type:
commandCommand:
npx -y cerif-mcp
Cline
.clinerules/mcp.json (or Settings → MCP Servers):
{
"mcpServers": {
"cerif-mcp": {
"command": "npx",
"args": ["-y", "cerif-mcp"]
}
}
}opencode
.opencode.json:
{
"mcp": {
"cerif-mcp": {
"type": "local",
"command": ["npx", "-y", "cerif-mcp"],
"enabled": true
}
}
}Kilo
Kilo MCP settings (mcp.json or kilo mcp add):
kilo mcp add cerif-mcp -- npx -y cerif-mcpAntigravity
Antigravity MCP configuration accepts a local command:
npx -y cerif-mcpAll clients talk to the same stdio server. If a client requires a server URL instead, run
npm install -g cerif-mcpand point it at the binary withnpx cerif-mcp(an HTTP/Streamable transport can be added later).
Example prompts
Author a record
Create a CERIF 1.6 record for a researcher, Jane Doe (ORCID 0000-0000-0000-0000), employed at the University of Porto and Principal Investigator on the project "DEMO", funded with €50 000. Write the XML to
output/cerif.xml.
Validate
Validate
output/cerif.xmlagainst the CERIF 1.6 schema and fix any errors.
Extend existing data
Here is some CERIF XML: . Add a second publication by the same author and link it with
cfResPubl_Pers.
Migrate
Migrate this CERIF 1.5 file to 1.6: .
Scaffold a database
Generate the PostgreSQL DDL for the CERIF extended core and save it to
db/cerif.sql.
Audit a database
Connect to
postgresql://app:secret@db.internal:5432/researchand tell me how conformant the schema is with CERIF 1.6. If something is missing, show me theALTER TABLEstatements to fix it.
Learn the model
What entities link a person to a project, and which canonical scheme should I use for the role?
Development
npm install # dependencies
npm run dev # run the server with tsx (stdin/stdout)
npm run typecheck # tsc --noEmit
npm run lint # eslint
npm test # vitest (44 tests)
npm run build # extract model + tsc + copy XSD
npm run check # lint + typecheck + test + buildRepository layout
scripts/extract-model.mjs # regenerates the entity catalog from the XSD
src/data/xsd/CERIF_1.6_2.xsd # official euroCRIS schema (unchanged, CC BY-ND 3.0)
src/data/model.generated.json # generated structural catalog (293 entities)
src/data/descriptions.ts # curated descriptions + canonical vocabularies
src/lib/ # catalog, validate, generate, analyze, migrate, sqlaudit, sqlgen, xml, format
src/tools/ # the 15 MCP tools (incl. audit_postgresql, generate_postgresql_ddl)
src/resources.ts, prompts.ts # MCP resources and prompts
src/server.ts, index.ts # assembly and stdio entry point
test/ # vitest suites + XML fixturesRegenerating the catalog
The generated catalog is produced from the bundled XSD:
node scripts/extract-model.mjsLicense
Code and documentation: MIT © 2026 Lucas Leal — see LICENSE.
Bundled schema (
src/data/xsd/CERIF_1.6_2.xsd): © euroCRIS, distributed unchanged under Creative Commons Attribution-NoDerivs 3.0 — seesrc/data/xsd/README-license.md.
CERIF is a registered standard of euroCRIS. This project is an independent, community tool for interoperating with CERIF data and is not an official euroCRIS product.
Available Tools
13 toolsanalyze_documentAnalyze a CERIF documentA
Parses a CERIF XML document (string or file) and reports its structure: root element, namespace, attributes, entity counts, total elements, and max depth. Useful for understanding existing CERIF data before extending it.
Inputs: xml, file.
build_documentBuild a complete CERIF 1.6 documentA
Wraps one or more entity/link fragments (from build_entity / build_link) into a complete CERIF 1.6 XML document with the official namespace urn:xmlns:org:eurocris:cerif-1.6-2, date, and sourceDatabase. Always validate the result with validate_xml.
Inputs: blocks (required), date, pretty, schemaLocation, +1 more.
build_entityBuild a CERIF entity fragmentA
Builds a single top-level CERIF 1.6 entity element (e.g. , , ) with a generated primary id. Pass values for scalar child elements (names like cfFamilyNames, cfFirstNames, cfBirthdate, cfGender, cfTitle, cfKeyw). Language-dependent elements automatically get cfLangCode/cfTrans attributes. Use build_document to wrap fragments into a valid CERIF document.
Inputs: entity (required), id, lang, values.
build_linkBuild a CERIF linking entity fragmentA
Builds a linking entity element (e.g. cfProj_Pers, cfOrgUnit_Class) connecting two CERIF entities. Provide side id values via sides (keys like "Proj", "Pers"), positionally via idA/idB, or omit for placeholders. The schema requires every link to carry a classification, so when classId/classSchemeId are omitted they default to "unclassified"/"cerif" — replace them with canonical scheme terms from get_scheme. Optionally add startDate/endDate/fraction.
Inputs: entity (required), idA, idB, sides, +6 more.
extract_entitiesExtract entities from CERIF XMLA
Extracts all instances of a given entity element from a CERIF document (string or file), with their XPath, id text, and child count. For example, list every or <cfProj_Pers> in the document.
Inputs: entity (required), xml, file, limit.
get_entityGet CERIF entity detailA
Returns the full definition of one CERIF 1.6 entity: its category, primary id element, child elements in schema order, and its linking entities. Accepts friendly names (person, project, publication, org unit, etc.) or exact element names (cfPers, cfProj, cfResPubl).
Inputs: entity (required).
get_schemeGet CERIF classification schemeA
Returns the full term list of a CERIF classification scheme. Use to find the exact cfClassId / cfClassSchemeId pairs used when classifying entities (e.g. person↔organisation roles).
Inputs: scheme (required).
list_entitiesList CERIF 1.6 entitiesA
Lists the CERIF 1.6 entity catalog: 19 core entities, 161 linking entities, 71 language-dependent entities, and 42 supporting entities (293 total). Use kind to filter by category, query to search names and descriptions, and limit to cap results.
Inputs: kind, limit, query.
list_schemesList CERIF classification schemesA
Lists the canonical CERIF classification schemes (vocabularies) curated for common use: person names, organisation roles, project roles, event roles, publication types, project status, funding types, identifier types, and more. Optional query filters scheme names and terms.
Inputs: limit, query.
lookup_in_documentLook up ids in CERIF XMLA
Searches a CERIF document (string or file) for elements whose id text matches a query (e.g. an ORCID, project id, or DOI). Returns matching elements with their XPath, useful for cross-referencing links.
Inputs: query (required), xml, file, limit.
migrate_15_to_16Migrate CERIF 1.5 to 1.6A
Migrates a CERIF 1.5 XML document to CERIF 1.6 by applying the euroCRIS documented steps: (1) replace the namespace urn:xmlns:org:eurocris:cerif-1.5-2 with urn:xmlns:org:eurocris:cerif-1.6-2, (2) update the xsi:schemaLocation, and (3) remove the release attribute from the CERIF element. Returns the migrated XML plus a change log. Always validate the result with validate_xml.
Inputs: xml, file.
validate_fileValidate CERIF 1.6 XML fileA
Reads an XML file from the local filesystem and validates it against the CERIF 1.6 schema. Use when the agent has written a CERIF file to disk and needs schema confirmation.
Inputs: path (required).
validate_xmlValidate CERIF 1.6 XMLA
Validates a CERIF 1.6 XML string against the official euroCRIS CERIF_1.6_2.xsd schema (5134 lines) in-process. Returns structural, typing, and value errors with line/column and XPath location. When the document fails, use validate_xml iteratively until it passes, or ask for build_* tools to construct valid fragments.
Inputs: xml (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct operation: listing vs. getting entity/scheme, validating vs. building vs. analyzing vs. extracting vs. migrating. Even validate_xml and validate_file differ by input source, clearly described. No two tools appear to do the same thing.
All tool names follow a strict verb_noun pattern: list_entities, get_entity, build_link, validate_xml, analyze_document, migrate_15_to_16, etc. The verbs are consistent and the nouns clearly indicate the object, making the API predictable and easy to learn.
13 tools is well-scoped for a domain as complex as CERIF 1.6. Each tool earns its place, covering catalog browsing, construction, validation, analysis, and migration without redundancy or bloat.
The tool surface covers the full lifecycle: discover entities/schemes, build entity/link/document fragments, validate against the official schema, inspect existing documents, and migrate from 1.5. No obvious gaps that would prevent an agent from working effectively with CERIF data.
Maintenance
Related MCP Connectors
AI governance MCP server for EU AI Act compliance and jurisdiction verification
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that gives AI assistants access to biological and biomedical RDF databases via SPARQL at the RDF Portal, as well as selected REST APIs (NCBI E-utilities, UniProt, ChEMBL, PDB, Reactome, Rhea, MeSH, and more).23321MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for querying versioned C2PA specification knowledge graphs, enabling AI agents to browse entity definitions, validation rules, and version diffs via natural language.3Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server enabling AI assistants to explore schema.org types, generate JSON-LD examples, validate structured data, and navigate the complete ontology with fuzzy matching and caching.12 npm24MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for searching academic, patent, and web sources, normalizing identifiers, and managing workspace records. Exposes the same operations to AI clients via MCP tools.MIT