Back to Home
pgElephant icon

NeuronDB

by pgElephant

Overview

The NeuronMCP server acts as a Model Context Protocol (MCP) gateway, enabling MCP-compatible clients (like Claude Desktop) to interact with the NeuronDB PostgreSQL extension for vector search, machine learning, RAG pipelines, and agent runtime capabilities.

Installation

Run Command
docker run -i --rm -e NEURONDB_HOST=localhost -e NEURONDB_PORT=5433 -e NEURONDB_DATABASE=neurondb -e NEURONDB_USER=neurondb -e NEURONDB_PASSWORD=neurondb neurondb-mcp:latest

Environment Variables

  • NEURONDB_HOST
  • NEURONDB_PORT
  • NEURONDB_DATABASE
  • NEURONDB_USER
  • NEURONDB_PASSWORD
  • NEURONDB_MCP_CONFIG

Security Notes

The C-based PostgreSQL extension code (`NeuronDB/src/search/sparse_search.c`, `hybrid_search.c`, `semantic_keyword_search.c`, `multi_vector_search.c`, `faceted_vector_search.c`, `temporal_vector_search.c`, `diverse_vector_search.c`) constructs SQL queries by directly concatenating user-provided table and column names (`tbl_str`, `col_str`, `facet_str`, `ts_str`) into the query string using `%s` in `appendStringInfo`. This is a classic SQL injection vulnerability, as malicious input in these parameters could alter the SQL query. For instance, a user could supply a table name like `mytable; DROP TABLE important_data;` leading to data loss or unauthorized access. While the Node.js/TypeScript layer of NeuronMCP generally uses parameterized queries and `escapeIdentifier` for dynamic SQL, the underlying C extension functions contain this critical flaw. The `PluginManager` allows loading external plugins, which could be a risk if not sourced from trusted origins.

Similar Servers

Stats

Interest Score44
Security Score3
Cost ClassHigh
Avg Tokens750
Stars2
Forks0
Last Update2025-11-30

Tags

MCPPostgreSQL ExtensionVector DatabaseMachine LearningAI AgentsStdio Communication