pgvector MCP. Semantic Search in PostgreSQL. No New Services Needed.
Works with every AI agent you already use
…and any MCP-compatible client
Just plug in your AI agents and start using Vinkius.
pgvector runs vector similarity searches and manages embedding tables right inside your existing PostgreSQL database. It lets you build complex AI retrieval pipelines without writing custom API endpoints or deploying new microservices.
Simply connect it to your agent, ask questions about your data structure, and watch the agent handle everything from creating HNSW indexes to running nearest-neighbor queries across millions of vectors.
What your AI agents can do
Create index
Builds performance indexes (like HNSW) on vector columns to speed up similarity searches dramatically.
Create table
Creates a new table specifically structured to hold high-dimensional embeddings and associated metadata.
Delete vector
Removes specific vector entries from a table when the source data is outdated or incorrect.
Use search_vectors to perform nearest-neighbor queries across large sets of embeddings using specific distance metrics.
Call create_table to set up new tables specifically designed to hold high-dimensional vector data and associated metadata.
Use insert_vector or delete_vector to programmatically add, modify, or remove individual vector entries from existing tables.
Run list_tables to get a clear overview of all tables in the database that contain vector columns.
Execute create_index to build performance indexes (HNSW or IVFFlat) on your vector columns, making searches much faster.
Ask AI about this MCP
Supported MCP Clients
Waiting for input…
pgvector (Vector Database) MCP Server: 6 Tools for Indexing & Search
These six tools let your agent manage every aspect of vector data, from creating optimized indexes to running complex similarity searches in your PostgreSQL database.
019d75f2create index
Builds performance indexes (like HNSW) on vector columns to speed up similarity searches dramatically.
019d75f2create table
Creates a new table specifically structured to hold high-dimensional embeddings and associated metadata.
019d75f2delete vector
Removes specific vector entries from a table when the source data is outdated or incorrect.
019d75f2insert vector
Adds new vectors and their corresponding metadata into an existing embedding table.
019d75f2list tables
Shows all tables in the database that currently contain vector columns, helping you map out your data sources.
019d75f2search vectors
Runs a nearest-neighbor query to find vectors most similar to a given search query or embedding.
Choose How to Get Started
Build a custom MCP for your own tools, or connect a ready-made integration from our catalog.
Build Your Own
Turn any API into an MCP. Import a spec, define Agent Skills, or deploy with MCPFusion.
- Import from OpenAPI, Swagger, or YAML specs
- Create Agent Skills with progressive disclosure
- Deploy to edge with MCPFusion framework
- Built in DLP, auth, and compliance on every call
- Real time usage dashboard and cost metering
- Publish to catalog or keep private
Make Your AI Do More
Start with pgvector (Vector Database), then connect any of our 4,700+ other servers whenever your AI needs more. One click, no limits.
- Use this MCP plus 4,700+ others, all in one place
- Add new capabilities to your AI anytime you want
- Every connection is secured and compliant automatically
- Track usage and costs across all your servers
- Works with Claude, ChatGPT, Cursor, and more
- New servers added to the catalog every week
What you can do with this MCP connector
Look, you're building complex AI retrieval pipelines, and you don't wanna write custom API endpoints or deploy a whole bunch of new microservices just to run vector searches. This pgvector setup lets your agent handle the heavy lifting right inside your existing PostgreSQL database. You connect it once, and suddenly you can ask questions about your data structure, and your agent manages everything from building indexes to running nearest-neighbor queries across millions of embeddings.
If you need to know what vector data lives in your system, run list_tables. This tool shows every single table in the database that has a dedicated vector column, giving you a clear overview of all your current knowledge sources. If none of those tables are set up right, call create_table.
That sets up a brand new table specifically structured to hold high-dimensional embeddings and any associated metadata you need. Think of it as building the perfect digital filing cabinet for your data.
Once the structure's ready, you gotta get data in there. Use insert_vector to programmatically add new vectors along with their corresponding descriptive metadata into an existing embedding table. If a source document changes or gets archived, don't leave old junk lying around—you can use delete_vector to remove specific vector entries when the original source data is outdated or incorrect.
The main event is finding stuff. When you need to find vectors most similar to a query—say, a user prompt or another embedding—run search_vectors. This tool performs a nearest-neighbor query, letting you use specific distance metrics like cosine, L2, or inner product against massive sets of data. But running those searches across millions of vectors without killing your performance? That's where optimization comes in.
If the search speed isn't fast enough, execute create_index. This builds highly efficient performance indexes—you can specify HNSW or IVFFlat—right on your vector columns. It dramatically speeds up those approximate nearest-neighbor (ANN) queries. You run this once, and suddenly searching feels instantaneous.
Your agent handles the entire workflow: it checks what tables exist, uses create_table if they don't, populates them with insert_vector, optimizes them with create_index, and then runs a lightning-fast search using search_vectors. You just ask your AI client to find information based on context, and the agent handles all the database commands required.
How pgvector MCP Works
- 1 First, connect the agent by providing the PostgreSQL connection string. This links the conversational layer to your database.
- 2 Next, ask the agent to execute a foundational command—like
list_tablesorcreate_table—to map out the required data structure. - 3 Finally, give it the task: 'Find the top 5 documents similar to X query.' The agent then runs the necessary sequence of calls (
search_vectors) and returns the results.
The bottom line is that you talk to your AI client like a database administrator. It translates your intent into precise PostgreSQL commands, handles the execution, and gives you the clean answer.
Who Is pgvector MCP For?
This is for data people who build applications around knowledge bases. Think of the AI engineer tired of managing dozens of microservices just to run a basic RAG pipeline. Or the fullstack developer who needs semantic search in their existing app without touching infrastructure code.
Builds complex Retrieval-Augmented Generation (RAG) pipelines that query production embeddings directly within Postgres, cutting out custom API development.
Manages the vector schema lifecycle—from running list_tables to optimizing indices via create_index—all from a single conversation thread.
Integrates semantic search into an existing web application by calling functions like search_vectors through the AI agent, requiring zero new services.
What Changes When You Connect
- Cut out the middleware. Instead of building and maintaining a separate vector service layer, you keep all your embeddings right where they belong: Postgres. You just call
search_vectorsthrough the agent. - Speed up searches with
create_index. Building HNSW or IVFFlat indexes on your vector columns dramatically reduces query latency, making real-time RAG possible without complex optimization passes. - Manage data structure in one place. Use
list_tablesto audit your entire schema andcreate_tablewhen you need a new embedding source. It’s all conversational setup. - Maintain clean knowledge bases. If content changes, use
delete_vectorfollowed by targetedinsert_vectorcalls. You keep the data current without manual database scripts. - Works with existing apps. Because everything stays in Postgres, you can add semantic search to your current stack simply by letting the agent call
search_vectors, zero new microservices required.
Real-World Use Cases
Building a Knowledge Base Index
A data architect needs to index 10 million document chunks. They first use list_tables to check existing schemas, then ask the agent to create_table with the proper vector dimension. Finally, they trigger bulk inserts using insert_vector, and immediately call create_index so the system is fast on day one.
Retrieving Context for Chatbot Answers
A fullstack dev wants a chatbot to answer questions based on internal documents. The user asks the agent, 'What's the policy on PTO?' The agent runs search_vectors using cosine distance against the document chunks table and returns the top 5 relevant passages for the LLM.
Updating Outdated Product Embeddings
A product manager updates a product catalog. They don't want to overwrite old data, so they first use delete_vector on the outdated record IDs and then run targeted batches of insert_vector for the new embeddings.
Auditing Database Readiness
An AI engineer suspects some tables are missing vector capabilities. They simply ask the agent to 'Show me all tables with vectors.' The agent runs list_tables, providing a clear audit trail of every available embedding source.
The Tradeoffs
Running searches on unindexed data
Trying to run 'Search for the top 5 documents' immediately after running insert_vector a million times. The search takes minutes and times out because no index is active.
→
Always establish the structure first. After your initial bulk inserts, you must call create_index on the vector column to build an optimized data path. Never skip optimization.
Mixing up CRUD calls
Trying to delete a vector by its content or description instead of its unique ID. The agent will fail because it needs a specific primary key for delete_vector.
→
When using delete_vector, make sure your metadata is clean and you are referencing the correct, persistent identifier (like an internal UUID) to ensure only the intended vector gets removed.
Assuming one tool handles everything
Calling 'Search for similar documents' without first checking if a table exists or if it has proper indexes. The agent will fail because the target table is undefined.
→
Start with list_tables to verify your source data, and then confirm performance readiness by running create_index before you rely on search_vectors.
When It Fits, When It Doesn't
Use this MCP Server if your core problem is semantic search or RAG—meaning you need the AI to find context based on meaning, not just keywords. You're building a knowledge retrieval system that lives in Postgres.
Don't use it if:
1. You only need simple key-value lookups (e.g., 'Get user ID 45'). Use a standard relational query tool instead; you don’t need vectors.
2. Your data is purely transactional and never needs semantic grouping. If all you do is count records or perform joins on integers, the complexity of vector tools is overkill. Stick to basic SQL tooling.
Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by pgvector. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
VINKIUS INFRASTRUCTURE
Cloud Hosted
Managed infra
V8 Isolated
Sandboxed per request
Zero-Trust Proxy
No stored credentials
DLP Enforced
Policy on every call
GDPR Compliant
EU data residency
Token Compression
~60% cost reduction
Works with Claude, ChatGPT, Cursor, and more
The Model Context Protocol standardizes how applications expose capabilities to LLMs. Instead of operating in isolation, your AI gains direct access to external platforms, live data, and real-world actions through secure, standardized connections.
This server provides 6 capabilities that interface natively with Claude, ChatGPT, Cursor, and any MCP client. No middleware. No custom integration required.
Available Capabilities
Retrieval-Augmented Generation shouldn't require a separate database stack.
Right now, building an RAG system means adding a dedicated vector store (Pinecone, Weaviate, etc.). You have to manage connection credentials for that new service, write custom API endpoints to talk between Postgres and the vector store, and pay for another infrastructure component just to run searches.
With this MCP server, you keep your vectors right in PostgreSQL. The AI agent talks directly to your database, calling `search_vectors` with zero external dependencies. You get a complete pipeline—from storage to search result—all within the chat interface.
pgvector MCP Server: Index Vectors & Similarity Search
The manual steps that disappear are writing boilerplate connection code for an external vector service. You skip deploying a whole new microservice, managing authentication secrets for a second database, and rewriting the core search logic just because you needed semantic context.
What's different now is simplicity. Your entire knowledge retrieval system lives in one place. The agent manages the index optimization (`create_index`) and the query execution (`search_vectors`), leaving your stack cleaner than ever.
Common Questions About pgvector MCP
How do I start using pgvector with search_vectors? +
You must first ensure your table exists and has vectors. Start by running list_tables to confirm, then use the agent to construct a query calling search_vectors against the target table.
Is pgvector MCP Server better than using an external vector database? +
It’s simpler. By keeping everything in Postgres, you cut out the latency and complexity of cross-database calls. You manage one connection string instead of two or three.
What is the difference between create_table and list_tables? +
list_tables shows you what's already there, like an inventory check. create_table builds a brand new container for vectors when you need to ingest data into a fresh source.
How often should I use create_index? +
Whenever your dataset grows substantially or if search performance degrades, run create_index. It turns slow linear scans into rapid approximate nearest-neighbor lookups.
What permissions are needed to successfully run `create_table`? +
You need full write access, specifically CREATE TABLE rights. While the agent handles the syntax, your underlying database user must have permissions to create schema objects and enable the pgvector extension first.
What happens if I use `insert_vector` with incorrect dimensions? +
The tool will immediately throw a dimension mismatch error. You must ensure that every vector you send via insert_vector matches the exact dimensionality of the target column defined in your table's schema.
Should I use `create_index` or rely on PostgreSQL for searching vectors? +
You must run create_index. Relying only on default database indexing causes performance to degrade dramatically as your dataset grows past a few thousand records. The index is what makes similarity search fast.
How can I verify if my tables are ready for high-volume searching before running `search_vectors`? +
First, use list_tables to check the schema and current index status. If your vector column doesn't show an active HNSW or IVFFlat index, run create_index immediately before attempting complex searches.
Does the agent connect directly to my database? +
Yes. Your connection string is encrypted at rest and injected into an isolated runtime. The agent connects directly to your PostgreSQL instance — no intermediate proxies, no data copies, no third-party storage.
What vector dimensions are supported? +
Any dimension supported by pgvector — from small 128-d vectors to large 3072-d embeddings (e.g., OpenAI text-embedding-3-large). Specify the dimension when creating a table and the agent handles the rest.
Which distance metrics can I use for similarity search? +
pgvector supports three operators: (L2/Euclidean distance), (cosine distance), and `` (negative inner product). The agent uses cosine distance by default, which works best for normalized embeddings like those from OpenAI.
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
More in this category
Paperless-ngx
Manage your digital archive via Paperless-ngx — search documents, upload files, manage tags, and organize correspondents directly from any AI agent.
Jellyfin (Plex Alternative)
Manage your media library via Jellyfin — list movies, shows, and music, track playback progress, and inspect server status directly from any AI agent.
PostHog Alternative
Manage product analytics and feature flags via PostHog — query events, inspect cohorts, toggle flags and create annotations from any AI agent.
You might also like
Road511
Access real-time US and Canada traffic data via Road511 — track incidents, monitor cameras, check road conditions, and analyze trends from any AI agent.
Helicone (LLM Observability)
Monitor LLM usage via Helicone — track requests, analyze costs, measure latency, and manage prompts.
Mercado Pago
Process payments, generate Pix QR codes, manage customers and refunds via Mercado Pago API.