MCP LangChainJS Search Server

MCP LangChainJS Search Server

Enables searching the langchain-ai/langchainjs GitHub repository for TypeScript/JavaScript/Markdown code snippets using the search_langchain tool.

Category
Visit Server

README

MCP LangChainJS Server

CI

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_langchain
  • Source: GitHub Search Code API via @octokit/rest
  • Transport: stdio (pour intégration avec clients MCP)
  • Langage: TypeScript (build vers dist/)

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 build

Démarrage

  • Développement (TypeScript, sans build):
npm run dev
  • Watch (redémarrage auto):
npm run watch
  • Production (depuis dist/):
npm start

Le 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_TOKEN est 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 .env ignoré par Git.

Variables d’environnement

Vous pouvez fournir un jeton GitHub pour augmenter les limites d’API :

export GITHUB_TOKEN=ghp_xxx_votre_token

Ou via un fichier .env (non commité) si votre outil de lancement le supporte.

Outils exposés

  • search_langchain
    • Entré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 + transport stdio, enregistrement des handlers
  • src/tools/search.ts: schéma de l’outil et handler search_langchain
  • src/github-client.ts: client GitHub (Octokit) pour recherche et lecture de contenu
  • src/types.ts: types internes (exemples, résultats)

Scripts npm

  • npm run dev: exécute src/index.ts avec ts-node
  • npm run watch: redémarre avec nodemon sur changements
  • npm run build: compile TypeScript vers dist/
  • npm start: lance node 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: commonjs avec ts-node adapté; utilisez npm run build puis npm start en 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured