MCP Protocol
Overview
NeuronMCP implements the Model Context Protocol (MCP) with full JSON-RPC 2.0 support, providing a standardized interface for MCP-compatible clients to interact with NeuronDB.
Key Features
- JSON-RPC 2.0: Full protocol implementation with stdio, HTTP, and SSE transport
- Batch Operations: Transactional batch tool calls for efficient bulk operations
- Progress Tracking: Long-running operation progress with progress/get for monitoring
- Tool Discovery: Search and filter tools with categorization and metadata
- Prompts Protocol: Full prompts/list and prompts/get with template engine support
- Sampling/Completions: sampling/createMessage with streaming support for LLM interactions
JSON-RPC 2.0
NeuronMCP implements the JSON-RPC 2.0 specification, providing a standardized protocol for remote procedure calls.
Protocol Features
- Request/Response: Standard JSON-RPC request/response format
- Error Handling: Comprehensive error codes and messages
- Notifications: Support for notification messages
- Batching: Batch request support for multiple operations
Transport Modes
NeuronMCP supports multiple transport modes, enabling flexible deployment and integration patterns.
stdio Transport
Standard input/output transport for direct process communication, ideal for local deployments and CLI integration.
HTTP Transport
HTTP-based transport for remote access and web integration, supporting RESTful API patterns.
SSE Transport
Server-Sent Events transport for real-time streaming and progress updates, enabling live monitoring of long-running operations.
Batch Operations
Batch operations enable efficient bulk processing by executing multiple tool calls in a single transaction.
Batch Tool Calls
The tools/call_batch method enables transactional batch execution of multiple tool calls, improving efficiency and ensuring consistency.
Transaction Support
Batch operations are executed within transactions, ensuring atomicity and rollback on failure.
Progress Tracking
Progress tracking enables monitoring of long-running operations through theprogress/get method.
Progress Updates
Long-running operations emit progress updates, providing visibility into operation status and completion.
Progress Monitoring
Clients can poll or subscribe to progress updates, enabling real-time monitoring of operation progress.
Tool Discovery
Tool discovery enables clients to search and filter available tools based on categories, metadata, and capabilities.
Tool Metadata
Each tool includes comprehensive metadata including name, description, parameters, categories, and capabilities.
Tool Filtering
Tools can be filtered by category, capability, or metadata, enabling clients to discover relevant tools efficiently.
Resources & Subscriptions
NeuronMCP provides resources and subscriptions for real-time updates on schema, models, indexes, configuration, workers, and statistics.
Resource Types
- Schema Resources: Database schema information with real-time updates
- Model Resources: ML model information and status
- Index Resources: Vector index configurations and statistics
- Config Resources: Server configuration and settings
- Worker Resources: Background worker status and metrics
- Stats Resources: Database and system statistics with subscriptions
Subscriptions
Resources support real-time subscriptions, enabling clients to receive updates when resources change.