MCP.Market

pgvector MCP server

by mittalpk·io.github.mittalpk/pgvector·v0.1.0

Similarity search, hybrid search, and index management for pgvector-backed PostgreSQL tables

B78/100grade B
What users say
No reviews yet
Be the first
Safety scan
B78/100

full report

Adoption
New

0 stars14 downloads/wk

Reviews

Write one

Nobody has reviewed pgvector yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

pgvector tools (7, 3 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • create_vector_indexwrite action

    Create an HNSW or IVFFlat approximate-nearest-neighbor index on a vector column.

  • describe_vector_table

    Get columns, indexes, and an approximate row count for a table.

  • explain_similarity_querywrite action

    Run EXPLAIN ANALYZE on a similarity query to confirm an ANN index is used.

  • hybrid_search

    Rank rows by a weighted blend of vector similarity and Postgres full-text search.

  • list_vector_tables

    List every column of type `vector` in the database, with its table and dimensionality.

  • similarity_search

    Find the k nearest neighbors to a query embedding.

  • upsert_embeddingwrite action

    Insert a row or update it in place if `id_value` already exists (upsert).

Public scan report

scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it

no findings
  • Code scan5 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 66 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 78/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How pgvector compares

Against every graded Web search MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
78/100
higher than 62% of 3,470 Web search servers
Tools
7
the typical Web search server has 5
Tools that change things
43%
typical: 0%. Fewer write tools means less an agent can break
Downloads a week
14
more than 4% of 827 Web search servers with a package

What its tools let an agent do: 4 read · 1 create · 2 change

Install pgvector in Claude Code, Cursor or VS Code

claude mcp add pgvector -- uvx mcp-server-pgvector
Add to Cursor

What the publisher says

From the pgvector repository's README, as published. We do not edit it. Read it on GitHub

mcp-server-pgvector

<!-- mcp-name: io.github.mittalpk/pgvector -->

An MCP server that gives LLM agents first-class access to pgvector-backed embedding tables in PostgreSQL: similarity search, hybrid (vector + full-text) search, upserts, and HNSW/IVFFlat index management.

Generic Postgres MCP servers expose raw SQL or schema introspection; this one speaks pgvector specifically — nearest-neighbor search, distance metrics, and ANN index tuning are first-class tools, not something the model has to hand-write SQL for.

Tools

Safety

interpolated into SQL — an LLM can only ever reference identifiers that already exist. Values are always bound parameters.

  • Every table/column name is validated against informationschema / pgcatalog before being

leaving only read/search tools available — useful when pointing the server at a production database.

  • Metadata filters are a closed {column, op, value} allowlist, not a raw SQL fragment.
  • Set MCPPGVECTORREADONLY=true to disable upsertembedding and createvectorindex,

30s) so one expensive query can't occupy a pool connection — and stall every other caller — indefinitely. Set it to 0 to disable.

  • Every query runs with a per-command timeout (MCPPGVECTORCOMMANDTIMEOUTSECONDS, default

Installation

uvx mcp-server-pgvector

Or with pip:

pip install mcp-server-pgvector
python -m mcp_server_pgvector

Configuration

The server reads its connection string from DATABASEURL (or PGVECTORDATABASE_URL):

{
  "mcpServers": {
    "pgvector": {
      "command": "uvx",
      "args": ["mcp-server-pgvector"],
      "env": {
        "DATABASE_URL": "postgresql://user:password@localhost:5432/mydb",
        "MCP_PGVECTOR_READ_ONLY": "false",
        "MCP_PGVECTOR_COMMAND_TIMEOUT_SECONDS": "30"
      }
    }
  }
}

Production readiness

Covered:

filter-operator allowlist — no path from tool arguments to raw SQL.

  • Identifier-safe SQL (every table/column checked against pg_catalog before use) and a closed

push/PR against a real pgvector container across Python 3.10–3.13. A separate CI job builds the package and runs twine check on the result.

  • Per-query timeout, so one runaway query can't monopolize the (small, 5-connection) pool.
  • 60+ tests, including dimension-mismatch and injection-attempt regressions, run in CI on every

these don't leak the DSN's credentials into error text.

  • Connection failures surface as plain ConnectionRefusedError/asyncpg exceptions — verified

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

pgvector: common questions

Is pgvector MCP server safe?
Mostly: it is graded B (78/100). Read the pgvector safety report
How do I install pgvector?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does pgvector need an API key?
Yes. The registry entry asks for DATABASE_URL.
Is pgvector maintained?
The last commit was 106 days ago (2026-07-21). The latest release is v0.1.0.
What can I use instead of pgvector?
Servers from other publishers that do the same job: DocsMint MCP server, M3 Memory MCP server and Markdown Vault MCP server.
How does pgvector compare with other Web search MCP servers?
safety score 78/100 (higher than 62% of 3,470 Web search servers); tools 7 (the typical Web search server has 5); tools that change things 43% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to pgvector

Same job from other publishers: the closest match first, then the best rated.

  • DocsMint
    Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
    A
  • M3 Memory
    Local-first, cloud-friendly memory — 100+ tools, 99.2% LongMemEval-S retrieval@8, hybrid search.
    A
  • Markdown Vault MCP
    Generic markdown vault MCP with hybrid search
    B
  • Reverie
    Graph memory that dreams: Neo4j knowledge-graph memory for AI agents with hybrid search
    B