MCP LangChainJS Search Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP LangChainJS Search Server search for RetrievalQA examples in langchainjs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP LangChainJS Server
Serveur MCP (Model Context Protocol) en TypeScript permettant de rechercher des exemples et du code dans le dépôt GitHub LangChainJS (langchain-ai/langchainjs). Il expose un outil search_langchain que les clients MCP (ex. Claude Desktop) peuvent appeler pour retrouver rapidement des snippets TS/JS/MD pertinents.
Aperçu
Outil principal:
search_langchainSource: GitHub Search Code API via
@octokit/restTransport:
stdio(pour intégration avec clients MCP)Langage: TypeScript (build vers
dist/)
Related MCP server: GraphSense MCP Server
Prérequis
Node.js 18+ et npm
(Optionnel) Un jeton GitHub personnel pour des quotas plus généreux
Variable d’environnement:
GITHUB_TOKEN
Installation
npm install
npm run buildDémarrage
Développement (TypeScript, sans build):
npm run devWatch (redémarrage auto):
npm run watchProduction (depuis
dist/):
npm startLe serveur écoute via stdio et est destiné à être lancé par un client MCP.
Configuration du client MCP (ex. Claude Desktop)
Exemple de configuration Claude Desktop (à adapter à votre chemin local) :
{
"mcpServers": {
"langchain-js": {
"command": "node",
"args": [
"/chemin/vers/votre/projet/dist/index.js"
],
"env": {
"GITHUB_TOKEN": "votre_token_optionnel"
}
}
}
}Notes:
GITHUB_TOKENest recommandé pour éviter les limitations strictes de l’API publique.Ne commitez jamais de secrets. Préférez des variables d’environnement ou un fichier
.envignoré par Git.
Variables d’environnement
Vous pouvez fournir un jeton GitHub pour augmenter les limites d’API :
export GITHUB_TOKEN=ghp_xxx_votre_tokenOu via un fichier .env (non commité) si votre outil de lancement le supporte.
Outils exposés
search_langchainEntrée:
query(string, requis): la requête de recherche (TS/JS/MD)
Sortie (texte): liste des correspondances avec nom, chemin, et URL HTML
Exemple d’appel (côté client MCP):
{
"name": "search_langchain",
"arguments": { "query": "RetrievalQA" }
}Architecture
src/index.ts: serveur MCP + transportstdio, enregistrement des handlerssrc/tools/search.ts: schéma de l’outil et handlersearch_langchainsrc/github-client.ts: client GitHub (Octokit) pour recherche et lecture de contenusrc/types.ts: types internes (exemples, résultats)
Scripts npm
npm run dev: exécutesrc/index.tsavects-nodenpm run watch: redémarre avecnodemonsur changementsnpm run build: compile TypeScript versdist/npm start: lancenode dist/index.js
Dépannage
Erreurs 403/abuse/ratelimit: fournissez
GITHUB_TOKEN.Résultats vides: vérifiez la requête (
query) et les extensions ciblées (TS/JS/MD).Import/ESM: le projet est configuré en
type: commonjsavects-nodeadapté; utiliseznpm run buildpuisnpm starten prod.
Sécurité
Ne mettez jamais un jeton en clair dans le dépôt.
Préférez des variables d’environnement et des gestionnaires de secrets.
Licence
ISC
Available Tools
1 toolsearch_langchainB
Search for examples and code in the LangChainJS GitHub repository
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool available, there is no possibility of confusing it with another tool. The tool's purpose is clearly defined by its name and description.
The single tool name follows a clear verb_noun pattern (search_langchain), and since there are no other tools, there is no inconsistency to worry about.
The server is explicitly a search-only server, so one tool is arguably appropriate, but it falls below the typical 3-15 tool range, making it feel minimal.
For its stated purpose of searching LangChainJS examples and code, the tool provides the core functionality without obvious gaps. The agent can search and receive results directly.
Maintenance
Related MCP Connectors
GitHub, npm, PyPI, Stack Overflow, arXiv and OpenAlex paper search as agent tools.
GitHub repo search, stats, language breakdown and comparison as agent tools.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time access to official LangChain documentation, API references, and GitHub code examples to assist in LangChain-based development. It enables LLMs to search for tutorials, version info, and detailed class specifications directly from live sources.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language queries about JavaScript/TypeScript codebases using graph and vector search. Allows finding functions by semantic description, callers, callees, and function details.9 npm35MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to search, read, and create GitHub issues and pull requests via natural language, using the GitHub API.1MIT
- FlicenseNot gradedqualityDmaintenanceProvides semantic search across the entire LangChain ecosystem, including documentation and source code for LangChain, LangGraph, LangSmith, and DeepAgents.4-