4,500+ servers built on MCP Fusion
Vinkius
Hugging Face logo
Vinkius
LangChain logo

How to Use the Hugging Face MCP in LangChain

Wire Hugging Face directly into your LangChain agents. Build multi-step ReAct pipelines that search models, inspect files, and track datasets.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Hugging Face MCP on Cursor AI Code Editor MCP Client Hugging Face MCP on Claude Desktop App MCP Integration Hugging Face MCP on OpenAI Agents SDK MCP Compatible Hugging Face MCP on Visual Studio Code MCP Extension Client Hugging Face MCP on GitHub Copilot AI Agent MCP Integration Hugging Face MCP on Google Gemini AI MCP Integration Hugging Face MCP on Lovable AI Development MCP Client Hugging Face MCP on Mistral AI Agents MCP Compatible Hugging Face MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
LangChain

Connect Hugging Face MCP to LangChain

Create your Vinkius account to connect Hugging Face to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Chain Hugging Face searches with this MCP Server

LangChain agents execute multi-step logic. You don't just query Hugging Face once. Your ReAct agent calls `list_models` via this MCP integration to find text-generation artifacts, then loops through the results using `get_model_tags` to filter out incompatible frameworks. That output feeds directly into the next chain link. The agent isolates the exact model ID and pipes it into `get_model` to pull author details and download counts. LangSmith tracks every token and API call across the entire sequence.

Inspect datasets before downloading

Blindly downloading massive datasets breaks pipelines. LangChain intercepts this problem by giving your agent the `list_datasets` tool to search for specific data structures. Once the agent finds a match, it doesn't just guess the format. It fires `list_dataset_files` to read the repository directory tree. The agent checks if the data lives in parquet files or raw CSVs before writing a single line of local extraction code. You get the exact file path without wasting bandwidth.

Automate model evaluations and bug reports

Models fail in production. When your LangChain evaluation pipeline detects a hallucination, it can automatically check if others hit the same wall. The agent runs `list_model_discussions` to scan the Hub for open bug reports on that specific model ID. If the issue is new, the agent takes action. It uses `create_discussion` to open a fresh thread on the repository, logging the failure trace directly to the author's page. You automate the entire feedback loop from error to open ticket.

Setup guide

Set up Hugging Face MCP in LangChain

Prerequisites

  • Python 3.10+ installed
  • langchain-mcp-adapters + langgraph packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChain BaseTool objects.

  2. 2

    Connect via HTTP transport

    Use MultiServerMCPClient with "transport": "http" pointing to your Vinkius endpoint. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Create a ReAct agent

    Pass the discovered tools to create_react_agent() from LangGraph. The agent automatically routes Hugging Face tool calls through the MCP protocol.

  4. 4

    Run with any LLM

    Swap ChatOpenAI for ChatAnthropic, ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.

agent.py
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI

async with MultiServerMCPClient({
    "hugging-face-mcp": {
        "transport": "http",
        "url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
    }
}) as client:
    tools = client.get_tools()

    agent = create_react_agent(
        ChatOpenAI(model="gpt-4o"),
        tools,
    )
    result = await agent.ainvoke({
        "messages": "List recent Hugging Face transactions"
    })
    print(result["messages"][-1].content)

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Hugging Face. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about Hugging Face MCP in LangChain

Install `langchain-mcp-adapters` and `langgraph`. Pass the Hugging Face endpoint to `MultiServerMCPClient` and use `client.get_tools()` to arm your ReAct agent.
They read the metadata and file structures. The agent uses `list_dataset_files` to map out directories like `train.parquet` before deciding how to parse them.
Yes. Every time your LangChain agent triggers `get_space` or `get_collection`, LangSmith logs the exact inputs, latency, and returned JSON payload.
Direct requests require hardcoding endpoints and parsing logic. The MCP standard exposes native tools like `list_spaces` that LangChain instantly converts into callable Python functions.
The framework passes a single endpoint token to the Vinkius V8 Isolate Sandbox. Your agent reads public repository metadata and user profile details via `get_user`, but the server destroys the execution context the millisecond the request finishes.

Start using the Hugging Face MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 13 tools

We've already built the connector for Hugging Face. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 13 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.