NeuronMCP
OfficialProvides tools for interacting with a NeuronDB-enabled PostgreSQL instance: full database administration (DDL, DML, DCL, user/role management, backup/restore) plus vector search, embedding generation, indexing (HNSW/IVF), and ML/RAG functions exposed by the NeuronDB extension.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
NeuronMCP
Model Context Protocol server for NeuronDB PostgreSQL extension, implemented in Go
Enables MCP-compatible clients to access NeuronDB vector search, ML algorithms, and RAG capabilities.
Overview
NeuronMCP implements the Model Context Protocol using JSON-RPC 2.0 over stdio. It provides tools and resources for MCP clients to interact with NeuronDB, including vector operations, ML model training, and database schema management.
Key Capabilities
MCP Protocol — Full JSON-RPC 2.0 implementation with stdio, HTTP, and SSE transport
650+ Tools — Vector ops, ML, RAG, PostgreSQL administration, debugging, composition, workflow, plugins. See FEATURES.md.
Resources — Real-time access to schema, models, indexes, and system stats
Enterprise Security — JWT, API keys, OAuth2, rate limiting, and audit logging
High Performance — TTL caching, connection pooling, and optimized query execution
Observability — Prometheus metrics, structured logging, and health checks
Related MCP server: toolbridge-mcp-server
Table of Contents
Documentation
Features - Complete feature list and capabilities
Tool & Resource Catalog - Complete catalog of all tools and resources
Setup Guide - Setup and configuration guide
Tools and Claude Desktop
The server registers all available tools at startup (650+ tools: vector, ML, RAG, PostgreSQL administration, and more). There is no environment variable to limit or filter which tools are registered.
Claude Desktop: Some MCP clients, including Claude Desktop, may impose a limit on how many tools they display or use. If you hit that limit, use a different MCP client (e.g. the included neuron-mcp-client) or run the server in a context where the full tool set is needed. See Setup Guide for Claude Desktop configuration.
Example configuration (use the path to your built binary, e.g. ./bin/neuron-mcp):
{
"mcpServers": {
"neurondb": {
"command": "/path/to/neuron-mcp",
"env": {
"NEURONDB_HOST": "localhost",
"NEURONDB_PORT": "5432",
"NEURONDB_DATABASE": "neurondb",
"NEURONDB_USER": "neurondb",
"NEURONDB_PASSWORD": "your_password"
}
}
}
}Official Documentation
https://www.neurondb.ai/docs/neuronmcp — Tool reference, Claude Desktop setup, and configuration.
Features
Feature | Description | Count |
MCP Protocol | Full JSON-RPC 2.0 implementation with stdio, HTTP, and SSE transport | Yes |
Vector Operations | Vector search (L2, cosine, inner product), embedding generation, indexing (HNSW, IVF), quantization | 100+ tools |
ML Tools | ML pipeline: training, prediction, evaluation, AutoML, ONNX, time series (backed by NeuronDB; 25+ algorithm families) | Yes |
RAG Operations | Document processing, context retrieval, response generation with multiple reranking methods | Yes |
PostgreSQL Tools | Complete database control: DDL, DML, DCL, user/role management, backup/restore | 100+ tools |
Debugging Tools | Debug tool calls, query plans, monitor connections and performance, trace requests | 5+ tools |
Composition Tools | Tool chaining, parallel execution, conditional execution, retry logic | 4+ tools |
Workflow Tools | Create, execute, monitor workflows | 4+ tools |
Plugin Tools | Marketplace, hot reload, versioning, sandbox, testing, builder | 6+ tools |
Dataset Loading | Load from HuggingFace, URLs, GitHub, S3, local files with auto-embedding | Yes |
Resources | Schema, models, indexes, config, workers, stats with real-time subscriptions | 6+ resources |
Prompts Protocol | Full prompts/list and prompts/get with template engine | Yes |
Sampling/Completions | sampling/createMessage with streaming support | Yes |
Progress Tracking | Long-running operation progress with progress/get | Yes |
Batch Operations | Transactional batch tool calls (tools/call_batch) | Yes |
Tool Discovery | Search and filter tools with categorization | Yes |
Middleware System | Request validation, logging, timeouts, error handling, auth, rate limiting | Yes |
Security | JWT, API keys, OAuth2, rate limiting, request validation, secure storage | Yes |
Performance | TTL caching, connection pooling, optimized query execution | Yes |
Enterprise Features | Prometheus metrics, webhooks, circuit breaker, retry, health checks | Yes |
Modular Architecture | 19 independent packages with clean separation of concerns | Yes |
For a detailed comparison with other MCP servers, see docs/tool-resource-catalog.md and the MCP protocol spec.
Architecture
System Architecture
graph TB
subgraph CLIENT["MCP Clients"]
CLAUDE[Claude Desktop]
CUSTOM[Custom MCP Clients]
CLI[CLI Tools]
end
subgraph MCP["NeuronMCP Server"]
PROTOCOL[MCP Protocol Handler<br/>JSON-RPC 2.0]
TOOLS[Tool Registry<br/>650+ Tools]
RESOURCES[Resource Manager<br/>Schema, Models, Indexes]
MIDDLEWARE[Middleware Pipeline<br/>Auth, Logging, Rate Limit]
CACHE[TTL Cache<br/>Idempotency]
end
subgraph CATEGORIES["Tool Categories"]
VEC[Vector Operations<br/>50+ tools]
ML[ML Pipeline<br/>25+ algorithm families]
RAG[RAG Operations<br/>Document processing]
PG[PostgreSQL Tools<br/>100+ DDL/DML/DCL<br/>650+ total tools]
DATASET[Dataset Loading<br/>HuggingFace, S3, GitHub]
end
subgraph DB["NeuronDB PostgreSQL"]
VECTOR[Vector Search<br/>HNSW/IVF]
EMBED[Embeddings<br/>Text/Image/Multimodal]
ML_FUNC[ML Functions<br/>25+ algorithm families]
ADMIN[PostgreSQL Admin<br/>Full DDL/DML/DCL]
end
CLAUDE -->|stdio| PROTOCOL
CUSTOM -->|stdio/HTTP/SSE| PROTOCOL
CLI -->|stdio| PROTOCOL
PROTOCOL --> MIDDLEWARE
MIDDLEWARE --> CACHE
CACHE --> TOOLS
CACHE --> RESOURCES
TOOLS --> VEC
TOOLS --> ML
TOOLS --> RAG
TOOLS --> PG
TOOLS --> DATASET
VEC --> VECTOR
ML --> ML_FUNC
RAG --> EMBED
PG --> ADMIN
DATASET --> VECTOR
style CLIENT fill:#e3f2fd
style MCP fill:#fff3e0
style CATEGORIES fill:#f3e5f5
style DB fill:#e8f5e9MCP Protocol Flow
sequenceDiagram
participant Client as MCP Client
participant Server as NeuronMCP Server
participant Tools as Tool Registry
participant DB as NeuronDB
Client->>Server: Initialize (JSON-RPC)
Server-->>Client: Server Capabilities
Client->>Server: tools/list
Server->>Tools: Get available tools
Tools-->>Server: Tool catalog
Server-->>Client: Tool list (650+ tools)
Client->>Server: tools/call {"name": "vector_search", ...}
Server->>Server: Validate & authenticate
Server->>Tools: Execute tool
Tools->>DB: Execute SQL query
DB-->>Tools: Query results
Tools-->>Server: Tool response
Server-->>Client: JSON-RPC response
Note over Client,DB: Streaming supported via SSETool Catalog Overview
graph LR
subgraph TOOLS["650+ Tools"]
VEC_TOOLS[Vector Operations<br/>Search, Embeddings, Indexing]
ML_TOOLS[ML Pipeline<br/>25+ algorithm families<br/>Training, Prediction, Evaluation]
RAG_TOOLS[RAG Operations<br/>Document Processing<br/>Context Retrieval]
PG_TOOLS[PostgreSQL Tools<br/>100+ tools<br/>DDL, DML, DCL, Admin]
DATASET_TOOLS[Dataset Loading<br/>HuggingFace, S3, GitHub<br/>Auto-embedding]
end
style VEC_TOOLS fill:#ffebee
style ML_TOOLS fill:#e8f5e9
style RAG_TOOLS fill:#fff3e0
style PG_TOOLS fill:#e3f2fd
style DATASET_TOOLS fill:#f3e5f5Use the Setup Guide for Claude Desktop. If your client limits the number of tools, use another MCP client such as the included
neuron-mcp-client.
Quick Start
Prerequisites
PostgreSQL 16 or later installed
NeuronDB extension installed and enabled
Go 1.23 or later (for building from source)
MCP-compatible client (e.g., Claude Desktop)
API keys configured (for LLM models, if using embeddings/RAG)
Database Setup
Option 1: Using Docker Compose (recommended for quick start)
If you have PostgreSQL with NeuronDB (e.g. from the neurondb repo Docker setup):
# Create extension if not already created
psql "postgresql://neurondb:neurondb@localhost:5433/neurondb" -c "CREATE EXTENSION IF NOT EXISTS neurondb;"Option 2: Native PostgreSQL Installation
createdb neurondb
psql -d neurondb -c "CREATE EXTENSION neurondb;"NeuronMCP can use an optional database schema for LLM model config, API keys, index templates, worker settings, and tool defaults. Run ./scripts/neuronmcp-setup.sh from the repository root to set it up. See neurondb-mcp-setup.md for details.
Configuration
Create mcp-config.json:
{
"database": {
"host": "localhost",
"port": 5433,
"database": "neurondb",
"user": "neurondb",
"password": "neurondb"
},
"server": {
"name": "neurondb-mcp-server",
"version": "2.0.0"
},
"logging": {
"level": "info",
"format": "text"
},
"features": {
"vector": { "enabled": true },
"ml": { "enabled": true },
"analytics": { "enabled": true }
}
}Or use environment variables:
export NEURONDB_HOST=localhost
export NEURONDB_PORT=5432
export NEURONDB_DATABASE=neurondb
export NEURONDB_USER=neurondb
export NEURONDB_PASSWORD=neurondbBuild and Run
Run the server
From the repository root:
make build
export NEURONDB_HOST=localhost NEURONDB_PORT=5432 NEURONDB_DATABASE=neurondb NEURONDB_USER=neurondb NEURONDB_PASSWORD=neurondb
./bin/neuron-mcpOptional: pass a config file with -c or set NEURONDB_MCP_CONFIG to the path of your mcp-config.json.
Test: run the included client to list tools:
./bin/neuron-mcp-client ./bin/neuron-mcp tools/listOr send a raw JSON-RPC initialize to confirm the server responds:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | ./bin/neuron-mcpAutomated Setup (recommended)
Use the setup script for database schema (optional LLM/config tables):
# From repository root
./scripts/neuronmcp-setup.sh
# With system service enabled (if supported)
./scripts/neuronmcp-setup.sh --enable-serviceUse scripts/neuronmcp-run.sh or scripts/neuronmcp-run-server.sh to run the server.
Manual build (without Makefile)
go build -o bin/neuron-mcp ./cmd/neurondb-mcp
./bin/neuron-mcpUsing Docker
This repo does not include a docker-compose.yml. Build and run the image manually:
# From repository root
docker build -f docker/Dockerfile -t neurondb-mcp:latest .
docker run -i --rm \
-e NEURONDB_HOST=localhost \
-e NEURONDB_PORT=5432 \
-e NEURONDB_DATABASE=neurondb \
-e NEURONDB_USER=neurondb \
-e NEURONDB_PASSWORD=neurondb \
neurondb-mcp:latestFor full-stack Docker (NeuronDB + NeuronMCP), use the neurondb repository or deploy each component from its repo.
Running as a Service
For systemd (Linux) or launchd (macOS), see your system documentation or the neurondb installation services guide for patterns.
MCP Protocol
NeuronMCP uses Model Context Protocol over stdio:
Communication via stdin and stdout
Messages follow JSON-RPC 2.0 format
Clients initiate all requests
Server responds with results or errors
Example request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "vector_search",
"arguments": {
"query_vector": [0.1, 0.2, 0.3],
"table": "documents",
"limit": 10
}
}
}Configuration
Environment Variables
Variable | Default | Description |
|
| Database hostname |
|
| Database port |
|
| Database name |
|
| Database username |
|
| Database password |
| - | Full connection string (overrides above) |
|
| Path to config file |
|
| Log level (debug, info, warn, error) |
|
| Log format (json, text) |
|
| Log output (stdout, stderr, file) |
|
| Enable GPU acceleration |
Configuration File
See mcp-config.json.example for complete configuration structure. Environment variables override configuration file values.
Tools
NeuronMCP provides comprehensive tools covering all NeuronDB capabilities:
Tool Category | Tools |
Vector Operations |
|
Vector Quantization |
|
Embeddings |
|
Hybrid Search |
|
Reranking |
|
ML Operations |
|
Analytics |
|
Time Series |
|
AutoML |
|
ONNX |
|
Index Management |
|
RAG Operations |
|
Workers & GPU |
|
Vector Graph |
|
Vecmap Operations |
|
Dataset Loading |
|
PostgreSQL (100+ tools) | Complete PostgreSQL control: DDL (CREATE/ALTER/DROP for databases, schemas, tables, indexes, views, functions, triggers, sequences, types, domains, materialized views, partitions, foreign tables), DML (INSERT, UPDATE, DELETE, TRUNCATE, COPY), DCL (GRANT/REVOKE), User/Role Management (CREATE/ALTER/DROP USER/ROLE), Backup/Recovery (pg_dump/pg_restore), Security (SQL validation, permission checking, audit), plus all administration, monitoring, and statistics tools |
Tool reference: Tool & Resource Catalog. PostgreSQL tools: docs/postgresql-tools.md.
For example client usage and interaction transcripts, see docs/examples/.
Dataset Loading Examples
The load_dataset tool supports multiple data sources with automatic schema detection, embedding generation, and index creation:
HuggingFace Datasets
{
"name": "load_dataset",
"arguments": {
"source_type": "huggingface",
"source_path": "sentence-transformers/embedding-training-data",
"split": "train",
"limit": 10000,
"auto_embed": true,
"embedding_model": "default"
}
}URL Datasets (CSV, JSON, Parquet)
{
"name": "load_dataset",
"arguments": {
"source_type": "url",
"source_path": "https://example.com/data.csv",
"format": "csv",
"auto_embed": true,
"create_indexes": true
}
}GitHub Repositories
{
"name": "load_dataset",
"arguments": {
"source_type": "github",
"source_path": "owner/repo/path/to/data.json",
"auto_embed": true
}
}S3 Buckets
{
"name": "load_dataset",
"arguments": {
"source_type": "s3",
"source_path": "s3://my-bucket/data.parquet",
"auto_embed": true
}
}Local Files
{
"name": "load_dataset",
"arguments": {
"source_type": "local",
"source_path": "/path/to/local/file.jsonl",
"schema_name": "my_schema",
"table_name": "my_table",
"auto_embed": true
}
}Key Features:
Automatic Schema Detection: Analyzes data types and creates optimized PostgreSQL tables
Auto-Embedding: Automatically detects text columns and generates vector embeddings using NeuronDB
Index Creation: Creates HNSW indexes for vectors, GIN indexes for full-text search
Batch Loading: Efficient bulk loading with progress tracking
Multiple Formats: Supports CSV, JSON, JSONL, Parquet, and HuggingFace datasets
Resources
NeuronMCP exposes the following resources:
Resource | Description |
| Database schema information |
| Available ML models |
| Vector index configurations |
| Server configuration |
| Background worker status |
| Database and system statistics |
Using with Claude Desktop
NeuronMCP is fully compatible with Claude Desktop on macOS, Windows, and Linux.
Create Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
See the example configuration files in this directory (claude_desktop_config.*.json) for platform-specific examples.
Example configuration:
{
"mcpServers": {
"neurondb": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--network", "neurondb-network",
"-e", "NEURONDB_HOST=neurondb-cpu",
"-e", "NEURONDB_PORT=5432",
"-e", "NEURONDB_DATABASE=neurondb",
"-e", "NEURONDB_USER=neurondb",
"-e", "NEURONDB_PASSWORD=neurondb",
"neurondb-mcp:latest"
]
}
}
}Or use local binary:
{
"mcpServers": {
"neurondb": {
"command": "/path/to/neuron-mcp",
"env": {
"NEURONDB_HOST": "localhost",
"NEURONDB_PORT": "5432",
"NEURONDB_DATABASE": "neurondb",
"NEURONDB_USER": "neurondb",
"NEURONDB_PASSWORD": "neurondb"
}
}
}
}Use the full path to your built binary (e.g. /home/user/neuron-mcp/bin/neuron-mcp).
Restart Claude Desktop after configuration changes.
Using with Other MCP Clients
Run NeuronMCP interactively for testing:
./bin/neuron-mcpSend JSON-RPC messages via stdin, receive responses via stdout.
Using neuron-mcp-client
A simple MCP client that works like Claude Desktop. It handles the full MCP protocol including the initialize handshake.
Build the client (included in make build):
make buildUsage:
# Initialize and list tools
./bin/neuron-mcp-client ./bin/neuron-mcp tools/list
# Call a tool
./bin/neuron-mcp-client ./bin/neuron-mcp tools/call '{"name":"vector_search","arguments":{}}'
# List resources
./bin/neuron-mcp-client ./bin/neuron-mcp resources/listThe client automatically:
Sends initialize request with proper headers (exactly like Claude Desktop)
Reads initialize response
Reads initialized notification
Then sends your requests and reads responses
Test script:
cd src/client
./example_usage.shOr use the Python client:
cd src/client
python neurondb_mcp_client.py -c ../tests/neuronmcp_server.json -e "list_tools"For Docker:
docker run -i --rm \
-e NEURONDB_HOST=localhost \
-e NEURONDB_PORT=5432 \
-e NEURONDB_DATABASE=neurondb \
-e NEURONDB_USER=neurondb \
-e NEURONDB_PASSWORD=neurondb \
neurondb-mcp:latestBuild the image first: docker build -f docker/Dockerfile -t neurondb-mcp:latest . from the repository root.
Documentation
Document | Description |
Dockerfile and entrypoint for container deployment | |
Model Context Protocol documentation | |
Example configurations for macOS, Linux, and Windows |
System Requirements
Component | Requirement |
PostgreSQL | 16 or later |
NeuronDB Extension | Installed and enabled (install) |
Go | 1.23 or later (for building) |
MCP Client | MCP-compatible client |
Related: NeuronDB (extension), NeuronAgent (agent runtime).
Integration with NeuronDB
NeuronMCP requires PostgreSQL 16+ with the NeuronDB extension. Install NeuronDB first: neurondb repository (Simple Start). Full-stack deployment (NeuronDB + NeuronMCP + other components) is documented in each component’s repository.
Troubleshooting
Stdio Not Working
Ensure stdin and stdout are not redirected:
./bin/neuron-mcp # Correct
./bin/neuron-mcp > output.log # Incorrect - breaks MCP protocolFor Docker, use interactive mode:
docker run -i --rm neurondb-mcp:latestDatabase Connection Failed
Verify connection parameters:
psql -h localhost -p 5432 -U neurondb -d neurondb -c "SELECT 1;"Check environment variables:
env | grep NEURONDBMCP Client Connection Issues
Verify container is running (if using Docker from another repo):
docker ps | grep neurondb-mcpTest stdio manually:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | ./bin/neuron-mcpCheck client configuration file path and format.
Configuration Issues
Verify config file path:
ls -la mcp-config.jsonCheck environment variable names (must start with NEURONDB_):
env | grep -E "^NEURONDB_"Security
Database credentials stored securely via environment variables
Supports TLS/SSL for encrypted database connections
Non-root user in Docker containers
No network endpoints (stdio only)
Support
Documentation: This README and the docs directory
GitHub Issues: Report issues
Email: support@neurondb.ai
License
See LICENSE for license information.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
NeuralBrain MCP Server - RAG, Vector Memory, LLM Routing, Agent Identity, x402 Payments
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceA universal MCP server that enables AI agents to securely manage PostgreSQL databases, make API requests, and execute SSH commands with features for database analysis, schema editing, and data operations.31-
- AlicenseNot gradedqualityCmaintenanceMCP server that bridges AI agents with external tools, APIs, databases, and services, enabling standardized tool execution and resource access.MIT
- AlicenseBqualityDmaintenanceA universal MCP server enabling AI assistants to query and manage six database engines (Postgres, Redis, Elasticsearch, MySQL, MongoDB, LDAP) through 113+ tools with read-only safety and fault tolerance.10081MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover and invoke backend tools over MCP JSON-RPC while enforcing 3-legged OAuth 2.0 identity propagation, role-based access control, and protocol transcoding to REST APIs.1Apache 2.0