@dotlab-hq/vector-store-mcp
Manage OpenAI vector stores, files, file batches, and perform semantic search through the OpenAI Vector Store API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@dotlab-hq/vector-store-mcp search my vector store for 'machine learning basics'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@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
Related MCP server: Universal OpenAI Vector Store MCP Server
Installation
# Clone and install
git clone <repo-url>
cd vector-store-mcp
npm install
# Build
npm run buildEnvironment Variables
Variable | Required | Description |
| Yes | Your OpenAI API key |
| No | Custom OpenAI API base URL (for proxies/compatible APIs) |
| No | HTTP server port (default: |
| No | HTTP server host (default: |
Usage
Local (stdio) — Recommended for Desktop Clients
# Run directly
npm start
# Or with dev watch mode
npm run devHTTP Server — For Deployment
# Start the HTTP server
npm run start:http
# Or with dev watch mode
npm run dev:httpThe HTTP server exposes:
GET /health— Health checkPOST /mcp— MCP Streamable HTTP endpointCORS 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/mcp2. 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/jsonHow 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 |
| Create a new vector store |
| Retrieve a vector store by ID |
| Update a vector store's name or metadata |
| Delete a vector store |
| List all vector stores with pagination and filtering |
| Search a vector store with a query string and optional filters |
Files (4)
Tool | Description |
| List files with filtering by purpose, status, and pagination |
| Retrieve file metadata by ID |
| Delete a file by ID |
| Download the content of a file by ID |
Vector Store Files (6)
Tool | Description |
| Attach a file to a vector store with optional attributes |
| List files in a vector store with filtering and pagination |
| Retrieve a specific file in a vector store |
| Remove a file from a vector store |
| Download file content from a vector store |
| Update attributes on a vector store file |
File Batches (4)
Tool | Description |
| Create a batch of files for a vector store |
| Retrieve batch status and details |
| Cancel an in-progress batch |
| List files in a specific batch |
Upload (1)
Tool | Description |
| Upload a file to OpenAI (for use with vector stores) |
npm Scripts
Script | Description |
| Run stdio transport (local) |
| Run HTTP transport (deployment) |
| Dev mode with watch (stdio) |
| Dev mode with watch (HTTP) |
| Compile TypeScript |
| Remove dist/ |
License
MIT
Available Tools
21 toolsopenai_attach_file_to_vector_storeAttach File to Vector StoreA
Attach a previously uploaded file to a vector store.
The file must already exist in your OpenAI project (use openai_upload_file to upload first). Once attached, the file will be chunked and indexed for semantic search.
For multi-file ingestion, prefer openai_create_vector_store_file_batch to minimize per-vector-store write requests.
Inputs: vector_store_id (required), file_id (required), attributes, chunking_strategy.
openai_cancel_vector_store_file_batchCancel Vector Store File BatchA
Cancel processing of a file batch as soon as possible.
Use this to stop ingestion of files that are still being processed. Already-processed files will remain attached.
Inputs: vector_store_id (required), batch_id (required).
openai_create_vector_storeCreate Vector StoreA
Create a new OpenAI vector store — a collection of processed files that can be used with the file_search tool.
Use this when you need a new vector store to hold uploaded documents for semantic search or retrieval-augmented generation (RAG).
You can optionally provide file_ids to attach already-uploaded files, a chunking strategy, and metadata (up to 16 key-value pairs).
Inputs: name (required), file_ids, expires_after, metadata, +1 more.
openai_create_vector_store_file_batchCreate Vector Store File BatchA
Create a batch of files to attach to a vector store.
This is the recommended way to attach multiple files at once — it minimizes per-vector-store write requests and is more efficient than attaching files one by one.
Inputs: vector_store_id (required), file_ids (required), attributes, chunking_strategy.
openai_delete_fileDelete FileADestructiveIdempotent
Permanently delete a file and remove it from all vector stores.
This action cannot be undone. The file will be deleted from OpenAI's storage.
Inputs: file_id (required).
openai_delete_vector_storeDelete Vector StoreADestructiveIdempotent
Permanently delete an OpenAI vector store by its ID.
This will remove the vector store and all its associated files. This action cannot be undone.
Inputs: vector_store_id (required).
openai_delete_vector_store_fileDelete Vector Store FileADestructiveIdempotent
Remove a file from a vector store (does NOT delete the underlying OpenAI file).
After removal, the file will no longer be searchable in this vector store. To delete the file entirely, use openai_delete_file.
Inputs: vector_store_id (required), file_id (required).
openai_list_filesList FilesARead-onlyIdempotent
List all files in your OpenAI project with pagination and optional purpose filter.
Returns metadata about each uploaded file including its ID, filename, size, purpose, and creation timestamp. Use the 'purpose' parameter to filter by type (e.g., "assistants", "fine-tune", "batch").
Inputs: after, limit, order, purpose, +1 more.
openai_list_vector_store_file_batch_filesList Vector Store File Batch FilesARead-onlyIdempotent
List all files in a specific file batch with pagination and optional status filter.
Use this to inspect which files in a batch have been processed, are still in progress, or have failed.
Inputs: vector_store_id (required), batch_id (required), after, before, +4 more.
openai_list_vector_store_filesList Vector Store FilesARead-onlyIdempotent
List all files attached to a vector store with pagination and optional status filter.
Shows each file's processing status (in_progress, completed, failed, cancelled) so you can monitor ingestion progress.
Inputs: vector_store_id (required), after, before, filter, +3 more.
openai_list_vector_storesList Vector StoresARead-onlyIdempotent
List all OpenAI vector stores with pagination support.
Returns a paginated list of vector stores in your project. Use 'after' or 'before' cursors to navigate pages.
Inputs: after, before, limit, order, +1 more.
openai_retrieve_fileRetrieve FileARead-onlyIdempotent
Retrieve metadata about a specific file by its ID, including filename, size, purpose, and status.
Inputs: file_id (required).
openai_retrieve_file_contentRetrieve File ContentARead-onlyIdempotent
Retrieve the raw content of a file by its ID.
Returns the file content as-is (text, JSON, JSONL, etc. depending on the file type). For large files, consider using the file's metadata first to check its size.
Inputs: file_id (required).
openai_retrieve_vector_storeRetrieve Vector StoreARead-onlyIdempotent
Retrieve details of a specific OpenAI vector store by its ID.
Use this to check the status, file counts, metadata, and other properties of an existing vector store.
Inputs: vector_store_id (required).
openai_retrieve_vector_store_fileRetrieve Vector Store FileARead-onlyIdempotent
Retrieve details of a specific file attached to a vector store, including its processing status and any errors.
Inputs: vector_store_id (required), file_id (required).
openai_retrieve_vector_store_file_batchRetrieve Vector Store File BatchARead-onlyIdempotent
Retrieve the status and details of a file batch, including file counts by status.
Inputs: vector_store_id (required), batch_id (required).
openai_retrieve_vector_store_file_contentRetrieve Vector Store File ContentARead-onlyIdempotent
Retrieve the parsed text content of a vector store file.
Returns the chunks of text that were extracted from the file and indexed in the vector store. Useful for inspecting what content is available for search.
Inputs: vector_store_id (required), file_id (required).
openai_search_vector_storeSearch Vector StoreARead-onlyIdempotent
Search an OpenAI vector store for relevant chunks based on a query and optional file-attribute filters.
Use this to perform semantic search across the documents in a vector store. You can provide a single query string or an array of queries, and optionally filter by file attributes (e.g., department = "engineering").
Results include ranked search hits with content snippets, file IDs, and relevance scores.
Inputs: vector_store_id (required), query (required), max_num_results, rewrite_query, +2 more.
openai_update_vector_storeUpdate Vector StoreAIdempotent
Modify an existing OpenAI vector store — rename it, update metadata, or change the expiration policy.
Use this when you need to update properties of an existing vector store without recreating it.
Inputs: vector_store_id (required), name, expires_after, metadata.
openai_update_vector_store_file_attributesUpdate Vector Store File AttributesAIdempotent
Update or clear the attributes (up to 16 key-value pairs) on a vector store file.
Attributes can be used to filter and organize files within a vector store. Pass null to clear all attributes.
Inputs: vector_store_id (required), file_id (required), attributes (required).
openai_upload_fileUpload FileA
Upload a local file to OpenAI.
The file is uploaded using multipart/form-data. Once uploaded, you can attach the returned file ID to a vector store using openai_attach_file_to_vector_store.
Supported purposes:
assistants: Used in the Assistants API
batch: Used in the Batch API
fine-tune: Used for fine-tuning
vision: Images for vision fine-tuning
user_data: Flexible file type for any purpose
evals: Used for eval data sets
Individual files can be up to 512 MB.
Inputs: file_path (required), purpose (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Every tool has a clearly distinct purpose: vector store CRUD, file upload/attach/delete, batch operations, search, and attribute updates. No two tools overlap in functionality.
All tools follow the pattern 'openai_verb_noun' with consistent snake_case (e.g., openai_create_vector_store, openai_delete_vector_store_file). No mixing of styles.
21 tools cover the full lifecycle of vector store and file management without being excessive. Each tool serves a specific, necessary operation.
The server provides complete CRUD for vector stores and files, batch operations, search, and attribute management. No obvious gaps like missing detach functionality, as openai_delete_vector_store_file handles removal.
Related MCP Connectors
Remote ChromaDB vector database MCP server with streamable HTTP transport
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes ChromaDB vector database operations, enabling AI assistants to perform collection management and semantic document searches. It supports HTTP, persistent, and in-memory connection modes along with various embedding providers including OpenAI and HuggingFace.MIT
- FlicenseNot gradedqualityDmaintenanceProvides comprehensive management of OpenAI Vector Stores, allowing AI assistants to upload files, manage vector databases, and handle batch operations via the OpenAI API. It supports multiple deployment methods, including Cloudflare Workers and local NPM installation, for seamless integration with MCP-compatible clients.7-
- AlicenseNot gradedqualityDmaintenanceMCP server for document ingestion and semantic search on Qdrant. Enables ingesting local documents, generating embeddings with OpenAI, and performing vector search with metadata filters.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for Qdrant vector database with local BERT embeddings. Enables semantic search and vector storage operations through natural language.MIT