LangExtract

FastMCP for Google's langextract library
  • python

28

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

LangExtract MCP Server enables Claude Code and similar MCP clients to extract structured information from unstructured text using Google Gemini models. It provides intelligent caching, persistent connections, and server-side credential management to deliver fast, accurate extractions with clear source grounding through the MCP interface.

How to use

You access LangExtract’s capabilities through an MCP client to perform structured text extraction. Use natural language prompts to request specific data from input text or web content, then work with the retrieved structured results and accompanying metadata. You can tailor the extraction process with configuration options to balance speed, cost, and accuracy, and you can save outputs for later analysis.

Typical workflows include extracting medications, dosages, and instructions from clinical notes, or pulling methodologies and results from research papers. You can also generate visualizations of extraction results for quick review.

Commands to initiate an MCP session or enter the server’s toolset depend on your MCP client. Once connected, you will see the tool contents and available extraction endpoints you can invoke.

How to install

Prerequisites you need before installing include Python 3.10 or higher, and a configured MCP-enabled environment such as Claude Code with access to Google Gemini.

Install and start the LangExtract MCP server using the included command in your Claude Code environment. This command passes your Gemini API key into the MCP setup and launches the server in a persistent MCP runtime.

Run the following command in your Claude Code environment to install and start the server via MCP management:

claude mcp add langextract-mcp -e LANGEXTRACT_API_KEY=your-gemini-api-key -- uv run --with fastmcp fastmcp run src/langextract_mcp/server.py

Verification

After you install, verify the integration by entering the MCP interface in Claude Code. You should see the server listed as running and you can enter the server to view its available tools and configurations.

/mcp

You should receive confirmation that the LangExtract MCP server is active and ready for use.

## Configuration and usage notes

Environment variable you must configure during setup: `LANGEXTRACT_API_KEY` with your Gemini API key. This value is required for authentication with the Gemini models.

Operational parameters you can adjust to control extraction behavior include model selection, chunking, temperature, and the number of extraction passes. These are provided to tailor performance and output to your needs.

## Available tools

### extract\_from\_text

Extract structured information from provided text, returning a schema with field names and values.

### extract\_from\_url

Fetch and extract structured information from a web page or URL, preserving source grounding.

### save\_extraction\_results

Persist extraction results to JSONL format for downstream processing.

### generate\_visualization

Create interactive HTML visualizations to explore extraction results.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational