TorchV AIS MCP Server
Official# `@torchv-team/ais-mcp`
[English](README.md) | [δΈζ](README_CN.md)
[](https://opensource.org/licenses/Apache-2.0) 
π **TorchV AIS Knowledge Base MCP Server**
A production-ready MCP server that enables **read / write / edit / file transfer** operations directly on the AIS enterprise knowledge base.

---
## β¨ Features
* π Unified access to AIS knowledge base
* π οΈ Full MCP toolchain (read / write / management)
* β‘ One-command startup via `npx`
* π Supports both **STDIO** and **HTTP (streamable)** transports
* π Fine-grained permission control (`readonly / write / admin`)
---
## π Installation & Run
```bash
npx -y @torchv-team/ais-mcp
```
---
## π Required Configuration
Before starting, set the following environment variables:
```bash
export KB_EXECUTE_URL="https://bot.torchv.com"
export KB_TOKEN="your-token"
```
---
### π How to get `KB_EXECUTE_URL`
π Steps:
1. Open your AIS instance
2. Copy the site origin from the browser address bar
π Example:
```text
https://bot.torchv.com
```
---
### π How to get `KB_TOKEN`
**Recommended:**
```
AIS β Admin Center β API Keys β Create Key
```
**Temporary (not recommended for production):**
```
Browser DevTools β Network β Inspect request β Copy token
```
---
## βοΈ Optional Configuration
```bash
export KB_MODE="readonly" # readonly | write | admin
export KB_TIMEOUT_SECONDS="30"
export KB_DEFAULT_REPO_CODE="TEAM_DOCS"
export KB_EXTRA_HEADERS_JSON='{"x-foo":"bar"}'
```
---
### π‘οΈ Permission Levels
* π’ `readonly` β Read-only access
* π‘ `write` β Allows write / upload / publish
* π΄ `admin` β Full control (move / delete)
---
## π§© Run Modes
### π₯οΈ STDIO Mode (Local MCP Client)
```bash
npm run build
node dist/cli.js
```
or:
```bash
npm run dev
npm run start
```
---
### π Streamable HTTP Mode
```bash
npm run build
node dist/cli.js \
--transport streamable-http \
--host 127.0.0.1 \
--port 3000 \
--path /mcp
```
or:
```bash
npm run dev:http
npm run start:http
```
π Parameters:
```bash
--transport streamable-http
--host 127.0.0.1
--port 3000
--path /mcp
```
---
## π Claude / Codex Configuration
### STDIO
```json
{
"mcpServers": {
"ais": {
"command": "npx",
"args": ["-y", "@torchv-team/ais-mcp"],
"env": {
"KB_EXECUTE_URL": "https://your-ais-domain",
"KB_TOKEN": "your-token",
"KB_MODE": "readonly"
}
}
}
}
```
---
### HTTP Mode
```json
{
"mcpServers": {
"ais-http": {
"type": "streamable-http",
"url": "http://127.0.0.1:3000/mcp"
}
}
}
```
---
## π οΈ Tooling Overview
### π Read-only
* `kb_list_repos`
* `kb_list_path`
* `kb_tree`
* `kb_search`
* `kb_read_document`
* `kb_render_link`
* `kb_download_file`
* `kb_get_download_link`
---
### βοΈ Write
* `kb_write_document`
* `kb_patch_document`
* `kb_create_directory`
* `kb_copy_document`
* `kb_publish_document`
* `kb_upload_file`
---
### π§ Admin
* `kb_move_document`
* `kb_delete_document`
---
## π§ About AIS
AIS is TorchVβs core product β not just a traditional knowledge base, but:
> π§ **An Enterprise AI Knowledge Engine**
### Core Capabilities
* π Transform scattered data β structured knowledge
* π Searchable
* π§© Governable
* β‘ Composable
* π Optimizable
---
## π Try AIS
π² Contact us (CEO WeChat):

TDQS
Scored across 8 tools
The tools have overlapping purposes that could cause confusion, particularly around file/document operations. For example, kb_download_file, kb_get_download_link, and kb_render_link all seem related to accessing files, but their specific distinctions are unclear without descriptions. Similarly, kb_list_path and kb_tree both appear to involve directory/file listing, creating ambiguity in tool selection.
All tool names follow a perfectly consistent pattern: they all start with 'kb_' prefix and use snake_case throughout. This uniformity makes the tool set predictable and easy to parse, with no deviations in naming conventions across the eight tools.
With 8 tools, the count is reasonable for a knowledge base or document management server. It's slightly on the higher side but still well-scoped, suggesting a focused domain without being overly sparse or bloated. The number aligns well with typical MCP server tool counts.
Inferring from tool names, the server seems designed for knowledge base operations (e.g., listing, reading, searching, downloading). However, there are notable gaps: there are no clear tools for creating, updating, or deleting content, which limits full CRUD coverage. The surface covers retrieval and listing well but misses modification capabilities, potentially causing agent workarounds.