Gliner2
FreeNot checkedMCP server exposing GLiNER2 entity extraction, classification, and JSON parsing.
About
MCP server exposing GLiNER2 entity extraction, classification, and JSON parsing.
README
MCP server that exposes GLiNER2 entity extraction, classification, and JSON extraction as tools.
Quickstart
- Install dependencies:
uv sync
- Run the MCP server:
uv run gliner2-mcp
Environment configuration
This server is configured via environment variables (optionally loaded from .env).
| Variable | Default | Description |
|---|---|---|
GLINER2_MODEL_ID |
fastino/gliner2-base-v1 |
GLiNER2 model id or path. |
GLINER2_DEVICE |
empty | Device override passed to from_pretrained when supported. |
GLINER2_MAX_TEXT_LENGTH |
0 |
Maximum input length. 0 disables the limit. |
GLINER2_MCP_LOG_LEVEL |
INFO |
Log level for server logging. |
GLINER2_MCP_ENV_FILE |
empty | Path to an env file to load before reading the variables above. |
If GLINER2_MCP_ENV_FILE is not set, the server will load .env from the working directory when it exists.
MCP tools
extract_entities(labels, text=None, filename=None)returns a mapping of label to entity spans.classify_text(schema, text=None, filename=None)returns a mapping of field name to chosen label or list of labels.extract_json(schema, text=None, filename=None)returns a JSON object that matches the provided schema.
For all tools, provide exactly one of text or filename:
text: inline input text.filename: UTF-8 text file path relative to the current working directory. Absolute paths and paths resolving outside the current working directory are rejected.
Legacy camelCase aliases are still available for compatibility:
extractEntities, classifyText, extractJson.
Available Models
GLiNER2 family models on Hugging Face
Development
uv sync --dev
uv run ruff check .
Testing
Run the default test suite (unit + contract tests):
uv sync --extra dev
uv run --extra dev pytest -q
Run real-model integration tests (downloads/loads actual GLiNER2 weights):
GLINER2_MCP_RUN_INTEGRATION=1 uv run --extra dev pytest -q -m integration
Recommended pre-release check:
uv run --extra dev pytest -q
GLINER2_MCP_RUN_INTEGRATION=1 uv run --extra dev pytest -q -m integration
License
MIT. See LICENSE.
Install Gliner2 in Claude Desktop, Claude Code & Cursor
unyly install gliner2Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add gliner2 -- uvx gliner2-mcpStep-by-step: how to install Gliner2
FAQ
Is Gliner2 MCP free?
Yes, Gliner2 MCP is free — one-click install via Unyly at no cost.
Does Gliner2 need an API key?
No, Gliner2 runs without API keys or environment variables.
Is Gliner2 hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Gliner2 in Claude Desktop, Claude Code or Cursor?
Open Gliner2 on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
Deploy sites and MCP servers to Unyly straight from your AI agent
by UnylyAmap Maps Mcp Server
MCP server for using the AMap Maps API
by duxiaohuiPayMCP
Lightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
by blustAIServer For Power BI
Enables exploring Microsoft Fabric / Power BI workspaces and semantic models, and executing ad-hoc DAX queries.
by Mitsubishi-FusoTemplate MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectSupabase
Database, auth and storage
by SupabaseEverything
Reference / test server with prompts, resources, and tools.
Compare Gliner2 with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
