
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
simple-postgres-mcp
Advanced tools
MCP server for PostgreSQL vector database with semantic and full-text search capabilities using pgvector
A Model Context Protocol (MCP) server for PostgreSQL with pgvector that provides semantic and full-text search capabilities for LLM memory management.
Primary Use Case: Multi-Tenant Collection Management
Secondary Benefit: Agent-Friendly Simplified Interface
store_memory, search_memory, forget_memory)# For Google models (default)
export GEMINI_API_KEY="your_google_api_key"
# For OpenAI models
export OPENAI_API_KEY="your_openai_api_key"
# For Vertex AI models
export VERTEX_PROJECT_ID="your-gcp-project"
export VERTEX_LOCATION="us-central1"
export VERTEX_CREDENTIALS='{"type":"service_account","project_id":"your-project","private_key":"-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n","client_email":"...@...iam.gserviceaccount.com",...}'
# Install dependencies
pnpm install
# Build the package
pnpm run build
# Test the installation
pnpm run test
The easiest way to get started is using Docker Compose:
# Start PostgreSQL with pgvector
pnpm run docker:up
# View logs
pnpm run docker:logs
# Stop PostgreSQL
pnpm run docker:down
This starts PostgreSQL on port 5432 with:
mcp_memoriespostgrespostgres# Using npx (after building)
npx simple-postgres-mcp --host localhost --port 5432 --database mcp_memories
# With a default collection/table
npx simple-postgres-mcp --collection my_memories
# Using OpenAI embeddings
npx simple-postgres-mcp --embedding-model openai/text-embedding-3-small
# Development mode (without building)
pnpm run dev --help
--host: PostgreSQL server host (default: localhost)--port: PostgreSQL server port (default: 5432)--database: PostgreSQL database name (default: mcp_memories)--collection: Default table name (optional - tables created as needed)--embedding-model: Embedding model to use (default: google/text-embedding-004)PGUSER: PostgreSQL username (default: postgres)PGPASSWORD: PostgreSQL password (default: postgres)store_memoryStore a document/memory in Milvus with automatic embedding generation and ID creation.
Parameters:
content (string, required): The text content to storemetadata (object, optional): Additional metadata to store with the memorycollection (string, optional): Collection name (if not set as default)Response:
{
"success": true,
"operation": "store",
"result": {
"id": "mem_1234567890_abc123def",
"collection": "my_memories",
"content_length": 42,
"embedding_dimensions": 768,
"embedding_model": "google/text-embedding-004",
"metadata": {"topic": "AI"},
"created_at": "2024-01-01T12:00:00.000Z"
}
}
search_memorySearch for memories/documents using semantic or full-text search.
Parameters:
query (string, required): Search query textmode (string, optional): Search mode - semantic or fulltext (default: semantic)limit (number, optional): Maximum number of results (default: 10)collection (string, optional): Collection name (if not set as default)Response:
{
"success": true,
"operation": "search",
"result": {
"query": "machine learning",
"mode": "semantic",
"count": 2,
"memories": [
{
"id": "mem_1234567890_abc123def",
"content": "Machine learning is a subset of AI...",
"similarity": 0.92,
"metadata": {"topic": "AI"},
"created_at": "2024-01-01T12:00:00.000Z"
}
]
}
}
forget_memoryDelete a memory/document from PostgreSQL using its auto-generated ID.
Parameters:
id (string, required): Auto-generated ID of the memory to delete (format: mem_timestamp_randomstring)collection (string, optional): Table name (if not set as default)Response:
{
"success": true,
"operation": "delete",
"result": {
"id": "mem_1234567890_abc123def",
"collection": "my_memories"
}
}
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"postgres-memories": {
"command": "npx",
"args": [
"simple-postgres-mcp",
"--host", "localhost",
"--port", "5432",
"--database", "mcp_memories",
"--collection", "my_memories"
],
"env": {
"GEMINI_API_KEY": "your-api-key-here",
"PGUSER": "postgres",
"PGPASSWORD": "postgres"
}
}
}
}
Each collection/table is created with the following schema:
CREATE TABLE {collection_name} (
id TEXT PRIMARY KEY,
content TEXT NOT NULL,
embedding vector(768), -- pgvector, dimension varies by model
content_fts tsvector GENERATED ALWAYS AS (to_tsvector('english', content)) STORED,
metadata_json JSONB,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Indexes for performance
CREATE INDEX {table}_content_fts_idx ON {table} USING GIN(content_fts);
CREATE INDEX {table}_embedding_idx ON {table} USING hnsw (embedding vector_l2_ops);
<->) for similarityMIT
FAQs
MCP server for PostgreSQL vector database with semantic and full-text search capabilities using pgvector
We found that simple-postgres-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.