Omni Nli

io.github.CogitatorTechPublished by GitHub account CogitatorTechv0.1.1Updated Oct 24, 2026

An MCP server for natural language inference

VerifiedSTDIODesktop onlyDeveloper ToolsAI & ML

Overview

AI-generated overview

A self-hostable natural language inference server that lets an assistant judge whether a hypothesis is entailed by, contradicts, or is neutral to a premise.

What you can do
Evaluate a premise and hypothesis pair and get one of three labels: entailment, contradiction, or neutral, with a confidence score and optional reasoning traces. Use it as a verification layer to check whether generated text is supported by facts or consistent with earlier statements. Check summaries against source text and test whether retrieved documents entail a query. Run it as a local MCP server for agents or as a standalone REST microservice.
When to use it
Useful when you want an assistant to fact-check or consistency-check generated content, summaries, or search results against source text, and you are willing to run and configure your own inference backend.
Requirements
Runs locally as a Python package installed with pip; started with the omni-nli command. Needs a model backend such as Ollama, HuggingFace (including gated models), or OpenRouter, which may require their own accounts or access tokens. No environment variables or headers are declared in the manifest.
Before you install
The README states the project is in early development, so bugs and breaking changes are expected. Result quality depends heavily on the chosen model, and fine-tuning on domain data is suggested. Using hosted backends such as HuggingFace or OpenRouter may send your text to third parties and may require credentials.

Installation

In SourceWeft

  1. Open Omni Nli in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[Omni-NLI Logo]

Omni-NLI

[Tests] [Code Coverage] [Python Version] [PyPI] [Documentation] [License]
[Examples] [Docker Image (CPU)] [Docker Image (CUDA)]

A multi-interface (REST and MCP) server for natural language inference


Omni-NLI is a self-hostable server that provides natural language inference (NLI) capabilities via RESTful and the Model Context Protocol (MCP) interfaces. It can be used both as a very scalable standalone stateless microservice (via the REST API) and also as an MCP server for AI agents to implement a verification layer for AI-based applications.

[Architecture Diagram]

What is NLI?

Given two pieces of text called premise and hypothesis, NLI (AKA textual entailment) is the task of determining the directional relationship between them as it is perceived by a human reader. The relationship is given one of these three labels:

  • "entailment": the hypothesis is supported by the premise
  • "contradiction": the hypothesis is contradicted by the premise
  • "neutral": the hypothesis is neither supported nor contradicted by the premise

[!IMPORTANT] NLI is not the same as logical entailment. Its goal is to determine if a reasonable human would consider the hypothesis to follow from the premise. This checks for consistency instead of the absolute truth of the hypothesis.

Typical applications of NLI include:

  • NLI can be used to check if a given piece of text is consistent with the rest of the text. For example, if a new response from a chatbot or AI assistant contradicts something that was said earlier in the conversation.
  • It can be used to check if a summarization contradicts the original text in some way.
  • It can be used to check if the documents in the ranked list of results entail the query.
  • It can be used to check if a piece of text is supported by some facts. Note that this is not the same as using logic.

[!IMPORTANT] The quality of the results depends a lot on the model (the LLM) that is used. A good strategy is to first fine-tune the model using a dataset of premise-hypothesis-label triples that are relevant to your application domain.

Main Features of Omni-NLI

  • Helps mitigate LLM hallucinations by verifying if the generated content is supported by facts
  • Supports models provided by different backends, including Ollama, HuggingFace (public and private/gated models), and OpenRouter
  • Supports REST API (for traditional applications) and MCP (for AI agents) interfaces
  • Fully configurable and very scalable, with built-in caching
  • Provides confidence scores and (optional) reasoning traces for explainability

See ROADMAP.md for the list of implemented and planned features.

[!IMPORTANT] Omni-NLI is in early development, so bugs and breaking changes are expected. Please use the issues page to report bugs or request features.


Quickstart

1. Installation
sh
pip install omni-nli[huggingface]
2. Start the Server
sh
omni-nli
3. Evaluate NLI (with REST API)
sh
curl -X POST \  -H "Content-Type: application/json" \  -d '{    "premise": "A football player kicks a ball into the goal.",    "hypothesis": "The football player is asleep on the field."  }' \  http://127.0.0.1:8000/api/v1/nli/evaluate

Example response:

json
{    "label": "contradiction",    "confidence": 0.99,    "model": "microsoft/Phi-3.5-mini-instruct",    "backend": "huggingface"}
4. Evaluate NLI (with MCP Interface)

[lm_studio_mcp_usage_example_1.png]


Documentation

Check out the Omni-NLI Documentation for more information, including configuration options, API reference, and examples.


Contributing

Contributions are always welcome! Please see CONTRIBUTING.md for details on how to get started.

License

Omni-NLI is licensed under the MIT License (see LICENSE).

Acknowledgements

  • The logo is from SVG Repo with some modifications.

Source: README.md at commit 943c1f2

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts