# Langchain Mcp Integration

> LangChain integration with MCP tools.

- **Type:** MCP server
- **Install:** `agentstack add mcp-lambdaworks-langchain-mcp-integration`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [lambdaworks](https://agentstack.voostack.com/s/lambdaworks)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [lambdaworks](https://github.com/lambdaworks)
- **Source:** https://github.com/lambdaworks/langchain-mcp-integration

## Install

```sh
agentstack add mcp-lambdaworks-langchain-mcp-integration
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# LangChain MCP Integration [](https://www.npmjs.com/package/@lambdaworks/langchain-mcp-integration) [](https://opensource.org/licenses/Apache-2.0)

## Overview

The [Model Context Protocol](https://modelcontextprotocol.io/introduction) allows applications to provide context for LLMs in a standardized way, separating the concerns of providing context from the actual LLM interaction. There are plenty of open source MCP servers available, each one offering different tools for an LLM to use, but they're not compatible with LangChain's tool representation out of the box. This library provides a thin wrapper around the interaction with MCP servers, ensuring they're compatible with LangChain.

## Installation

```
npm i @lambdaworks/langchain-mcp-integration
```

## Usage

An example of how this library allows you to use MCP tools with a prebuilt ReAct agent from LangGraph:

```
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { HumanMessage } from "@langchain/core/messages";
import { MCPServerToolkit } from "@lambdaworks/langchain-mcp-integration";

const client = new Client({
    name: "example-client",
    version: "1.0.0"
});

const transport = new StdioClientTransport({
    command: "uvx",
    args: ["mcp-server-fetch", "--ignore-robots-txt"]
});

let toolkit = new MCPServerToolkit();

await toolkit.addTools({ client, transport });

const agentModel = new ChatOpenAI({ temperature: 0 });

const agent = createReactAgent({
    llm: agentModel,
    tools: toolkit.getTools()
});

const agentFinalState = await agent.invoke({ 
    messages: [new HumanMessage("Summarize the information from this URL: https://rs.linkedin.com/company/lambdaworksio")] 
});

console.log(
    agentFinalState.messages[agentFinalState.messages.length - 1].content
);
```

You can also add tools from multiple MCP servers:

```
toolkit.addTools({ client: client1, transport: transport1 }, {client: client2, transport: transport2 });
```

Each client and transport pair are used to specify the way you'll connect to a specific MCP server.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [lambdaworks](https://github.com/lambdaworks)
- **Source:** [lambdaworks/langchain-mcp-integration](https://github.com/lambdaworks/langchain-mcp-integration)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-lambdaworks-langchain-mcp-integration
- Seller: https://agentstack.voostack.com/s/lambdaworks
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
