GLiNER2 MCP Local-first extraction tools for AI agents · PyPI v0.1.0

Make messy text instantly usable.

GLiNER2 MCP gives your agent three practical superpowers: extract entities, classify meaning, and produce structured JSON from plain language. No model training. No annotation pipeline.

Reading invoices, tickets, emails, and support chats

Quick start: uvx gliner2-mcp

$ uvx gliner2-mcp
[ready] MCP server online (stdio)
tool: extractEntities("Apple CEO Tim Cook...", ...)
result: {"company":["Apple"],"person":["Tim Cook"]}
tool: classifyText("Great camera, poor battery...", ...)
result: {"sentiment":"negative","aspects":["camera","battery"]}

What Is GLiNER2 (In Human Terms)?

Think of GLiNER2 as a text analyst that follows your instructions at runtime. Instead of asking, "What labels was this model trained for?", you tell it what to find right now. This repo wraps that capability as MCP tools any agent can call.

1. Entity Extraction

Ask for people, companies, products, locations, custom fields, or domain-specific terms.

Tool: extractEntities

2. Classification

Map text into labels you define, including multi-label setups like topic or risk tags.

Tool: classifyText

3. JSON Structuring

Pull clean objects from messy prose so downstream workflows can automate with confidence.

Tool: extractJson

See The Tools In Action

Switch tasks to preview exactly what your agent sends and receives.

Input Payload


        

Typical Output


        

From Curious To Shipping In Minutes

1Run uvx gliner2-mcp (or uv run gliner2-mcp in-repo).

2Point your MCP client/agent to this server over stdio.

3Call tools with your own labels and schema. Start simple, then increase specificity.