@dotlab-hq/vector-store-mcp
MCP server for OpenAI Vector Store API, managing vector stores, files, file batches, and semantic search.
README
@dotlab-hq/vector-store-mcp
MCP (Model Context Protocol) server for the OpenAI Vector Store API. Manage vector stores, files, file batches, and perform semantic search — all through a single MCP server.
Supports two transports:
- stdio — for local use with Claude Desktop, VS Code Copilot, or any MCP-compatible client
- HTTP (Streamable) — for deployment as a web service
Features
- 21 tools covering the full OpenAI Vector Store API
- Fully typed with TypeScript + Zod schema validation
- Uses the official OpenAI Node SDK
- Two entry points: local stdio and HTTP server
- Zero-config for local development
Installation
# Clone and install
git clone <repo-url>
cd vector-store-mcp
npm install
# Build
npm run build
Environment Variables
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
Yes | Your OpenAI API key |
OPENAI_API_BASE |
No | Custom OpenAI API base URL (for proxies/compatible APIs) |
PORT |
No | HTTP server port (default: 3000) |
HOST |
No | HTTP server host (default: 127.0.0.1) |
Usage
Local (stdio) — Recommended for Desktop Clients
# Run directly
npm start
# Or with dev watch mode
npm run dev
HTTP Server — For Deployment
# Start the HTTP server
npm run start:http
# Or with dev watch mode
npm run dev:http
The HTTP server exposes:
GET /health— Health checkPOST /mcp— MCP Streamable HTTP endpoint- CORS enabled for all origins in development
Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"vector-store": {
"command": "npx",
"args": ["-y", "@dotlab-hq/vector-store-mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}
VS Code (GitHub Copilot)
Add to .vscode/mcp.json in your workspace root:
{
"servers": {
"vector-store": {
"command": "npx",
"args": ["-y", "@dotlab-hq/vector-store-mcp"],
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}
Windows users:
npxmay fail with'vector-store-mcp' is not recognizeddue to a known Windows shim resolution issue. To fix this, link the package globally once:npm link @dotlab-hq/vector-store-mcpThen use the direct command in
.vscode/mcp.json:{ "servers": { "vector-store": { "command": "vector-store-mcp", "args": [], "env": { "OPENAI_API_KEY": "your-api-key-here" } } } }
HTTP/Web Clients
With HTTP-based MCP, the server holds the credentials — the client only needs the URL. The API key and base URL are passed as environment variables when starting the server, not in the client config.
1. Start the server with your credentials:
# Pass env vars directly
OPENAI_API_KEY=sk-... npm run start:http
# Or use a .env file / shell profile to set them
export OPENAI_API_KEY=sk-...
export OPENAI_API_BASE=https://your-proxy.example.com/v1 # optional
npm run start:http
# Server running at http://127.0.0.1:3000/mcp
2. Connect from your MCP client — just the URL, no keys needed:
VS Code .vscode/mcp.json:
{
"servers": {
"vector-store": {
"url": "http://127.0.0.1:3000/mcp",
"type": "http"
}
}
}
Any MCP-compatible HTTP client:
POST http://127.0.0.1:3000/mcp
Content-Type: application/json
How it works: The server process reads
OPENAI_API_KEYfrom its own environment and uses it for all OpenAI API calls. The MCP client never sees or transmits the key — it just sends tool requests to the server URL. This means you can run the server anywhere (local, cloud, Docker) and point multiple clients at it.
Programmatic API
You can also use this as a library:
import {
McpServer,
registerAllTools,
getClient,
resetClient,
} from "@dotlab-hq/vector-store-mcp";
const server = new McpServer({ name: "my-server", version: "1.0.0" });
registerAllTools(server);
Tools (21)
Vector Stores (6)
| Tool | Description |
|---|---|
openai_create_vector_store |
Create a new vector store |
openai_retrieve_vector_store |
Retrieve a vector store by ID |
openai_update_vector_store |
Update a vector store's name or metadata |
openai_delete_vector_store |
Delete a vector store |
openai_list_vector_stores |
List all vector stores with pagination and filtering |
openai_search_vector_store |
Search a vector store with a query string and optional filters |
Files (4)
| Tool | Description |
|---|---|
openai_list_files |
List files with filtering by purpose, status, and pagination |
openai_retrieve_file |
Retrieve file metadata by ID |
openai_delete_file |
Delete a file by ID |
openai_retrieve_file_content |
Download the content of a file by ID |
Vector Store Files (6)
| Tool | Description |
|---|---|
openai_attach_file_to_vector_store |
Attach a file to a vector store with optional attributes |
openai_list_vector_store_files |
List files in a vector store with filtering and pagination |
openai_retrieve_vector_store_file |
Retrieve a specific file in a vector store |
openai_delete_vector_store_file |
Remove a file from a vector store |
openai_retrieve_vector_store_file_content |
Download file content from a vector store |
openai_update_vector_store_file_attributes |
Update attributes on a vector store file |
File Batches (4)
| Tool | Description |
|---|---|
openai_create_vector_store_file_batch |
Create a batch of files for a vector store |
openai_retrieve_vector_store_file_batch |
Retrieve batch status and details |
openai_cancel_vector_store_file_batch |
Cancel an in-progress batch |
openai_list_vector_store_file_batch_files |
List files in a specific batch |
Upload (1)
| Tool | Description |
|---|---|
openai_upload_file |
Upload a file to OpenAI (for use with vector stores) |
npm Scripts
| Script | Description |
|---|---|
npm start |
Run stdio transport (local) |
npm run start:http |
Run HTTP transport (deployment) |
npm run dev |
Dev mode with watch (stdio) |
npm run dev:http |
Dev mode with watch (HTTP) |
npm run build |
Compile TypeScript |
npm run clean |
Remove dist/ |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。