Langflow-DOC-QA-SERVER

This repository provides a Model Context Protocol (MCP) server for document question answering, leveraging Langflow to create a backend for querying documents. It offers a simple interface to interact with

5
0

Langflow-DOC-QA-SERVER

A Model Context Protocol (MCP) server for document Question Answering (Q&A) powered by Langflow.

This TypeScript-based server implements a document Q&A system, demonstrating core MCP concepts by providing an interface to query documents through a Langflow backend.

Prerequisites

  1. Create Langflow Document Q&A Flow: Create a new flow from the "Document Q&A" template in Langflow, configure it with components like ChatInput, File Upload, and LLM, and save the flow.
  2. Get Flow API Endpoint: Obtain the API endpoint URL from the cURL command in Langflow's API section. This URL is required for the API_ENDPOINT configuration.

Features

Tools

  • query_docs - Queries the document Q&A system. It takes a query string as input and returns responses from the Langflow backend.

Development

Install dependencies using npm install, build the server with npm run build, and use npm run watch for development with auto-rebuild.

Installation

To use with Claude Desktop, add the server configuration to claude_desktop_config.json (location varies by OS). The configuration includes the command to run the server, arguments, and environment variables.

Environment Variables

  • API_ENDPOINT: The Langflow API endpoint URL. Defaults to http://127.0.0.1:7860/api/v1/run/480ec7b3-29d2-4caa-b03b-e74118f35fac if not specified.

Debugging

Use the MCP Inspector for debugging via npm run inspector.

License

This project is licensed under the MIT License.

Repository

GO
GongRzhe

GongRzhe/Langflow-DOC-QA-SERVER

Created

February 23, 2025

Updated

March 28, 2025

Language

JavaScript

Category

AI