AI代理后端服务

一个基于内存的AI代理后端引擎,支持持久化上下文、向量搜索和多用户隔离,适用于智能对话和上下文感知应用。

  • by CharanKairoju
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 CharanKairoju/mcp-server

使用说明

MCP Server

Memory-Based AI Agent Backend

Overview

A backend engine for memory-based AI agents with persistent context, vector search, and multi-user support. Built on the Model Context Protocol (MCP) specification.

Features

  • Persistent Memory — PostgreSQL + pgvector for long-term context
  • Vector Search — Semantic retrieval of relevant memories
  • Multi-user — Isolated contexts per user/session
  • MCP Compliant — Standard protocol for AI tool integration
  • Real-time — WebSocket support for streaming responses

Tech Stack

FastAPI React PostgreSQL Supabase pgvector LangChain WebSockets TypeScript

Architecture

Client -> FastAPI -> pgvector Search -> LangChain Agent -> Response
              |                    |
         Memory Store         Context Injection

Project Structure

mcp-server/
├── backend/        # FastAPI server
├── frontend/       # React dashboard
├── database/       # SQL schemas, migrations
└── public-assets/  # Static assets

API Endpoints

POST /memory/add      — Store new memory
POST /memory/search   — Semantic search
GET  /memory/list     — List user memories
WS   /chat            — Streaming chat

License

MIT License