Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Support Agent

БесплатноНе проверен

Enables ticket management through a REST API and support document search via a local vector database, powered by Ollama and LanceDB.

GitHubEmbed

Описание

Enables ticket management through a REST API and support document search via a local vector database, powered by Ollama and LanceDB.

README

This repo started as a small Express ticket API. I used it to learn how an existing API can be exposed through MCP, then added an Ollama-based agent and document search with local embeddings and LanceDB.

The code covers two use cases:

  • ticket tools backed by a REST API
  • support-document search backed by a local vector database

How it works

User question
    ↓
Ollama model
    ↓ requests a tool
TypeScript MCP client
    ↓ stdio
MCP server
    ├── ticket tools → Express REST API
    └── document search → EmbeddingGemma → LanceDB

The model sees the available tools through MCP listTools(). When it requests a tool, the TypeScript client calls the MCP server and sends the result back to the model.

MCP tools

Tool Description
get_tickets Get all tickets from the REST API
get_ticket Get one ticket by ID
create_ticket Create a ticket after user approval
search_documents Search support articles by meaning and optional category

Document search

Support articles are split into sentences and embedded with embeddinggemma:300m-qat-q4_0. The indexing script stores the chunks and their vectors in LanceDB.

At query time, only the question is embedded. LanceDB applies the tenant and category filters, performs a cosine-distance search, and returns up to two matches within the configured distance threshold.

Indexing and querying use the same embedding model. If the model or source articles change, rebuild the index.

Setup

Requirements:

  • Node.js 20 or newer
  • Ollama running locally

Install the project and download the local models:

npm install
ollama pull embeddinggemma:300m-qat-q4_0
ollama pull qwen3:1.7b

Build the vector database:

npm run index:documents

LanceDB writes its files to data/, which is ignored by Git.

Run the local agent

npm run agent:local

The included prompt asks for printer help. The agent calls search_documents and prints the sources collected from the MCP result below the model's answer.

Run the ticket API

npm run dev

Available routes:

GET  /tickets
GET  /tickets/:id
POST /tickets

Tickets are kept in memory, so created tickets are cleared when the server restarts.

Run the cloud agent

The cloud example needs an Ollama API key. Copy .env.example to .env and set the key, then run the API and agent in separate terminals:

npm run start
npm run agent:cloud

The example prompt creates a ticket and fetches another one. Write tools require confirmation before they run.

Retrieval checks

npm run evaluate:retrieval

The current test set contains three queries with expected articles and one query that should return no result:

Evaluation accuracy: 4/4 (100%)

This is only a check against the small set of articles in this repo, not a general embedding benchmark.

Tenant filtering

Documents for two sample companies are stored in the same LanceDB table. The MCP server uses a fixed company-a tenant to stand in for an authenticated session.

The tool schema does not accept tenantId. A client can send that extra field, but it cannot override the tenant used by the server. A real application would take this value from a verified session or token instead of a constant.

Commands

Command Description
npm run typecheck Check TypeScript
npm run build Compile the project
npm run index:documents Rebuild the LanceDB table
npm run evaluate:retrieval Run retrieval checks
npm run test:mcp List MCP tools and call document search directly
npm run agent:local Run the local Ollama example
npm run agent:cloud Run the Ollama Cloud example
npm run documents:upsert Insert or replace the sample Wi-Fi article
npm run documents:delete Delete the sample Wi-Fi article

Project layout

src/        API, MCP server, agents, and document search
scripts/    Indexing, document updates, and retrieval checks
examples/   Small examples built while learning each piece

from github.com/Hussainzz/api-mcp-rag

Установка Support Agent

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/Hussainzz/api-mcp-rag

FAQ

Support Agent MCP бесплатный?

Да, Support Agent MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Support Agent?

Нет, Support Agent работает без API-ключей и переменных окружения.

Support Agent — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Support Agent в Claude Desktop, Claude Code или Cursor?

Открой Support Agent на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Support Agent with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data