Skip to content
Back to search

langconnect-client

A Modern GUI Interface for Vector Database Management(Supports MCP integration)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/teddynote-lab--langconnect-client/badge.svg)](/listings/teddynote-lab--langconnect-client)

HTML

<a href="/listings/teddynote-lab--langconnect-client"><img src="/api/listings/teddynote-lab--langconnect-client/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Quick Start

# Clone and setup
git clone https://github.com/teddynote-lab/langconnect-client.git
cd langconnect-client
cp .env.example .env

# Edit .env with your credentials, then:
make build   # Build Docker images
make up      # Start all services

Create MCP configuration

make mcp

Stop services

make down

Prerequisites

- Docker and Docker Compose - Node.js 20+ (for MCP inspector) - Python 3.11+ with UV package manager - Supabase account

Installation

1. **Clone the repository**

   git clone https://github.com/teddynote-lab/langconnect-client.git
   cd langconnect-client

2. **Set up environment variables**

   cp .env.example .env

3. **Configure Supabase**

a. Create a new project at [supabase.com](https://supabase.com)

b. Get your API credentials: - Go to Project Settings → API - Copy the `URL` and `anon public` key

c. Update `.env` file:

   SUPABASE_URL=https://your-project.supabase.co
   SUPABASE_KEY=your-anon-public-key

4. **Build the application**

   make build

Running the Application

1. **Start all services**

   make up

2. **Access the services** - 🎨 **Frontend**: http://localhost:3000 - 📚 **API Documentation**: http://localhost:8080/docs - 🔍 **Health Check**: http://localhost:8080/health

3. **Stop services**

   make down

4. **View logs**

   make logs

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 376 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # LangConnect Client
  2. <div align="center">
  3. [English README](./README.md) | [한국어 README](./README_ko.md)
  4. </div>
  5. <div align="center">
  6. ![Next.js](https://img.shields.io/badge/Next.js-15.3.4-black?style=for-the-badge&logo=next.js)
  7. ![React](https://img.shields.io/badge/React-19.0.0-61DAFB?style=for-the-badge&logo=react)
  8. ![TypeScript](https://img.shields.io/badge/TypeScript-5.0-3178C6?style=for-the-badge&logo=typescript)
  9. ![Python](https://img.shields.io/badge/Python-3.11+-3776AB?style=for-the-badge&logo=python)
  10. ![FastAPI](https://img.shields.io/badge/FastAPI-0.115.6+-009688?style=for-the-badge&logo=fastapi)
  11. ![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-4169E1?style=for-the-badge&logo=postgresql)
  12. **A GUI Interface for Vector Database Management**
  13. ![frontend](./assets/frontend.png)
  14. </div>
  15. ## 📋 Table of Contents
  16. - [Overview](#overview)
  17. - [Main Features](#main-features)
  18. - [Architecture](#architecture)
  19. - [Getting Started](#getting-started)
  20. - [Prerequisites](#prerequisites)
  21. - [Installation](#installation)
  22. - [Running the Application](#running-the-application)
  23. - [MCP Integration](#mcp-integration)
  24. - [Environment Variables](#environment-variables)
  25. - [API Documentation](#api-documentation)
  26. - [Contributors](#contributors)
  27. - [License](#license)
  28. ## 🎯 Overview
  29. LangConnect Client is a modern, Next.js-based GUI interface for managing vector databases powered by PostgreSQL with pgvector extension. It provides an intuitive web interface for document management, vector search capabilities, and seamless integration with AI assistants through the Model Context Protocol (MCP).
  30. This project was inspired by [langchain-ai/langconnect](https://github.com/langchain-ai/langconnect).
  31. ## ✨ Main Features
  32. ### 📚 **Collection Management**
  33. - CRUD operations with custom metadata support
  34. - Real-time statistics and bulk operations
  35. ### 📄 **Document Management**
  36. - Multi-format support (PDF, TXT, MD, DOCX, HTML)
  37. - Automatic text extraction and chunking
  38. - Drag-and-drop batch upload
  39. ### 🔍 **Advanced Search**
  40. - **Semantic**: Vector similarity search with OpenAI embeddings
  41. - **Keyword**: PostgreSQL full-text search
  42. - **Hybrid**: Combined search with configurable weights
  43. ### 🔐 **Authentication**
  44. - Supabase JWT authentication with automatic token refresh
  45. - Role-based access control
  46. - Secure refresh token management with NextAuth.js
  47. ### 🤖 **MCP Integration**
  48. - 9+ tools for AI assistants (Claude, Cursor)
  49. - stdio and SSE transport support
  50. ### 🎨 **Modern UI**
  51. - Next.js with Tailwind CSS
  52. - Dark/Light themes, Multi-language (EN/KO)
  53. ## 🏗️ Architecture
  54. ![Overall Architecture](./assets/structure.png)
  55. ### Authentication Flow
  56. The authentication system implements a secure token refresh mechanism:
  57. ```
  58. ┌─────────────┐ ┌──────────────┐ ┌───────────┐
  59. │ Browser │────▶│ NextAuth │────▶│ Supabase │
  60. │ │◀────│ (JWT) │◀────│ Auth │
  61. └─────────────┘ └──────────────┘ └───────────┘
  62. │ │
  63. │ httpOnly cookie │ refresh token
  64. │ (encrypted JWT) │ stored in JWT
  65. │ │
  66. ▼ ▼
  67. Only accessToken Auto refresh when
  68. exposed to client accessToken expires
  69. ```
  70. **Key Security Features:**
  71. - Refresh tokens are never exposed to the client
  72. - Automatic token refresh when access token expires
  73. - Token rotation on each refresh for enhanced security
  74. - Encrypted JWT storage in httpOnly cookies
  75. ## 🚀 Getting Started
  76. ### Quick Start
  77. ```bash
  78. # Clone and setup
  79. git clone https://github.com/teddynote-lab/langconnect-client.git
  80. cd langconnect-client
  81. cp .env.example .env
  82. # Edit .env with your credentials, then:
  83. make build # Build Docker images
  84. make up # Start all services
  85. ```
  86. Create MCP configuration
  87. ```bash
  88. make mcp
  89. ```
  90. Stop services
  91. ```bash
  92. make down
  93. ```
  94. ### Prerequisites
  95. - Docker and Docker Compose
  96. - Node.js 20+ (for MCP inspector)
  97. - Python 3.11+ with UV package manager
  98. - Supabase account
  99. ### Installation
  100. 1. **Clone the repository**
  101. ```bash
  102. git clone https://github.com/teddynote-lab/langconnect-client.git
  103. cd langconnect-client
  104. ```
  105. 2. **Set up environment variables**
  106. ```bash
  107. cp .env.example .env
  108. ```
  109. 3. **Configure Supabase**
  110. a. Create a new project at [supabase.com](https://supabase.com)
  111. b. Get your API credentials:
  112. - Go to Project Settings → API
  113. - Copy the `URL` and `anon public` key
  114. c. Update `.env` file:
  115. ```env
  116. SUPABASE_URL=https://your-project.supabase.co
  117. SUPABASE_KEY=your-anon-public-key
  118. ```
  119. 4. **Build the application**
  120. ```bash
  121. make build
  122. ```
  123. ### Running the Application
  124. 1. **Start all services**
  125. ```bash
  126. make up
  127. ```
  128. 2. **Access the services**
  129. - 🎨 **Frontend**: http://localhost:3000
  130. - 📚 **API Documentation**: http://localhost:8080/docs
  131. - 🔍 **Health Check**: http://localhost:8080/health
  132. 3. **Stop services**
  133. ```bash
  134. make down
  135. ```
  136. 4. **View logs**
  137. ```bash
  138. make logs
  139. ```
  140. ## 🤖 MCP Integration
  141. ### Automated Setup
  142. 1. **Generate MCP configuration**
  143. ```bash
  144. make mcp
  145. ```
  146. This command will:
  147. - Prompt for your Supabase credentials
  148. - Automatically obtain an access token
  149. - Update `.env` with the token
  150. - Generate `mcpserver/mcp_config.json`
  151. 2. **Integration with AI Assistants**
  152. **For Claude Desktop:**
  153. - Copy the contents of `mcpserver/mcp_config.json`
  154. - Paste into Claude Desktop's MCP settings
  155. **For Cursor:**
  156. - Copy the MCP configuration
  157. - Add to Cursor's settings under MCP integrations
  158. ### Available MCP Tools
  159. - `search_documents` - Perform semantic/keyword/hybrid search
  160. - `list_collections` - List all collections
  161. - `get_collection` - Get collection details
  162. - `create_collection` - Create new collection
  163. - `delete_collection` - Delete collection
  164. - `list_documents` - List documents in collection
  165. - `add_documents` - Add text documents
  166. - `delete_document` - Delete documents
  167. - `get_health_status` - Check API health
  168. - `multi_query` - Generate multiple search queries from a single question
  169. ### Sample RAG Prompt
  170. Here is a sample RAG prompt that can be used in Claude Desktop.
  171. ```markdown
  172. You are a question-answer assistant based on given document.
  173. You must use MCP tool(`langconnect-rag-mcp`) to answer the question.
  174. #Search Configuration:
  175. - Target Collection: (user's request, default value: RAG)
  176. - Search Type: hybrid(preferred)
  177. - Search Limit: 5(default)
  178. #Search Guidelines:
  179. Follow the guidelines step-by-step to find the answer.
  180. 1. Use `list_collections` to list up collections and find right **Collection ID** for user's request.
  181. 2. Use `multi_query` to generate at least 3 sub-questions which are related to original user's request.
  182. 3. Search all queries generated from previous step(`multi_query`) and find useful documents from collection.
  183. 4. Use searched documents to answer the question.
  184. ---
  185. ## Format:
  186. (answer to the question)
  187. **Source**
  188. - [1] (Source and page numbers)
  189. - [2] (Source and page numbers)
  190. - ...
  191. ---
  192. [Note]
  193. - Answer in same language as user's request
  194. - Append sources that you've referenced at the very end of your answer.
  195. - If you can't find your answer from <search_results>, just say you can't find any relevant source to answer the question without any narrative sentences.
  196. ```
  197. ### Running MCP SSE Server
  198. #### Quick Start with Script
  199. ```bash
  200. # Use the convenient launcher script
  201. ./run_mcp_sse.sh
  202. ```
  203. This script will:
  204. - Check if all requirements are met (uv, .env file)
  205. - Verify API server is running
  206. - Start the MCP SSE server with automatic authentication
  207. #### Manual Start
  208. ```bash
  209. # Or run directly
  210. uv run python mcpserver/mcp_sse_server.py
  211. ```
  212. The server now includes automatic authentication:
  213. - Tests existing token validity on startup
  214. - Prompts for login if token is expired or missing
  215. - Automatically updates `.env` with new token
  216. - Starts the SSE server on port 8765
  217. ### Testing MCP Integration
  218. ```bash
  219. # Test with MCP Inspector
  220. npx @modelcontextprotocol/inspector
  221. ```
  222. In the Inspector:
  223. 1. Select "SSE" as transport type
  224. 2. Enter `http://localhost:8765/sse` as URL
  225. 3. Connect and test the available tools
  226. ## 🔧 Environment Variables
  227. | Variable | Description | Required |
  228. |----------|-------------|----------|
  229. | `OPENAI_API_KEY` | OpenAI API key for embeddings | Yes |
  230. | `SUPABASE_URL` | Supabase project URL | Yes |
  231. | `SUPABASE_KEY` | Supabase anon public key | Yes |
  232. | `NEXTAUTH_SECRET` | NextAuth.js secret key | Yes |
  233. | `NEXTAUTH_URL` | NextAuth URL (default: http://localhost:3000) | Yes |
  234. | `NEXT_PUBLIC_API_URL` | Public API URL for frontend | Yes |
  235. | `POSTGRES_HOST` | PostgreSQL host (default: postgres) | No |
  236. | `POSTGRES_PORT` | PostgreSQL port (default: 5432) | No |
  237. | `POSTGRES_USER` | PostgreSQL user (default: teddynote) | No |
  238. | `POSTGRES_PASSWORD` | PostgreSQL password | No |
  239. | `POSTGRES_DB` | PostgreSQL database name | No |
  240. | `SSE_PORT` | MCP SSE server port (default: 8765) | No |
  241. ## 👥 Contributors
  242. <table>
  243. <tbody>
  244. <tr>
  245. <td align="center">
  246. <a href="https://github.com/teddylee777">
  247. <img src="https://avatars.githubusercontent.com/u/10074379?s=400&u=ee37ac1a4bb730df9c80d1ac92311cbbf61c680e&v=4" width="100px;" alt="Teddy Lee"/>
  248. <br />
  249. <sub><b>Teddy Lee</b></sub>
  250. </a>
  251. <br />
  252. <a href="https://teddylee777.github.io/" title="Portfolio">🏠</a>
  253. </td>
  254. <td align="center">
  255. <a href="https://github.com/fbwndrud">
  256. <img src="https://avatars.githubusercontent.com/u/50973794?v=4" width="100px;" alt="fbwndrud"/>
  257. <br />
  258. <sub><b>fbwndrud</b></sub>
  259. </a>
  260. <br />
  261. <a href="https://github.com/fbwndrud" title="GitHub">🏠</a>
  262. </td>
  263. <td align="center" valign="top" width="14.28%">
  264. <a href="https://github.com/jikime">
  265. <img src="https://avatars.githubusercontent.com/u/9925165?v=4" width="100px;" alt="jikime"/>
  266. <br />
  267. <sub><b>jikime</b></sub>
  268. </a>
  269. <br />
  270. <a href="https://github.com/jikime/next-connect-ui/commits?author=jikime" title="Code">💻</a>
  271. <a href="https://github.com/jikime/next-connect-ui/pulls?q=is%3Apr+author%3Ajikime" title="Pull Requests">💪</a>
  272. </td>
  273. <td valign="top">
  274. <strong>Key Contributions</strong>
  275. <ul>
  276. <li>Next-Connect-UI Development</li>
  277. </ul>
  278. <strong>Community</strong>
  279. <ul>
  280. <li><a href="https://www.facebook.com/groups/1183007433518603">Vibe Coding KR Facebook Group</a></li>
  281. </ul>
  282. </td>
  283. </tr>
  284. </tbody>
  285. </table>
  286. ## 📄 License
  287. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
  288. <div align="center">
  289. Made with ❤️ by <a href="https://github.com/teddynote-lab">TeddyNote LAB</a>
  290. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.