Kinjo, A. R., Yamamoto, Y., Bustamante-Larriet, S., Labra-Gayo, J. E., Fujisawa, T.
TogoMCP is a system that enables querying life-science knowledge graphs using natural language by recasting LLMs as protocol-driven inference engines via the Model Context Protocol (MCP).
Querying knowledge graphs like DBCLS's RDF Portal requires proficiency in SPARQL and database-specific RDF schemas, making the resource inaccessible to most researchers. LLMs, while capable of translating natural language to SPARQL, often fabricate predicates or fail to resolve entity names without schema-level context.
The system uses two key mechanisms: (i) a concise MIE (Metadata-Interoperability-Exchange) YAML file that dynamically supplies the LLM with structural and semantic context for target databases at query time; and (ii) a two-stage workflow separating entity resolution via external REST APIs from schema-guided SPARQL generation.
On a benchmark of 50 biologically grounded questions, TogoMCP achieved a large improvement over an unaided baseline (Cohen's d = 1.82, Wilcoxon p < 0.001), with win rates exceeding 80% for precise question types. An ablation study shows that concise, dynamically delivered schema context is more valuable for mean-score performance than complex orchestration logic.