Senzing MCP Server
Model Context Protocol (MCP) server for the Senzing SDK, providing entity resolution capabilities to Claude and other MCP clients.
Overview
This MCP server exposes Senzing SDK functionality through the Model Context Protocol, enabling AI assistants like Claude to:
Search for entities by attributes
Add and manage entity records
Analyze relationships and networks
Explain entity resolution decisions
Perform bulk data imports with multithreading
Features
Entity Search & Retrieval
search_entities: Search by name, address, phone, email, etc.
get_entity: Retrieve detailed entity information by ID
Record Management
add_record: Add single entity records
add_records_from_file: Bulk import from JSONL files with multithreading
delete_record: Remove records from the repository
Relationship Analysis
find_relationship_path: Discover paths between entities
find_network: Analyze networks of related entities
explain_relationship: Understand why entities are related
explain_entity_resolution: See how entities were resolved
Configuration & Diagnostics
get_stats: View engine statistics and metrics
get_config_info: Check configuration and version info
Installation
Prerequisites
Python 3.10 or higher
Senzing SDK v4beta installed at
/data/etl/senzing/er/v4beta/sdk/pythonSenzing database configured and accessible
Setup
Clone or navigate to the project directory:
Install the package:
Configure environment variables:
Required environment variables:
SENZING_ENGINE_CONFIGURATION_JSON: JSON string with database and resource paths
Optional environment variables:
SENZING_MODULE_NAME: Module identifier (default: "senzing-mcp")SENZING_INSTANCE_NAME: Instance name (default: "senzing-mcp-server")SENZING_LOG_LEVEL: Verbosity level (default: 0)
Usage
Running the Server
Start the MCP server:
Or run directly:
Configuration for AI Assistants
This MCP server can be used with multiple AI assistants:
Claude Desktop: See installation instructions below
ChatGPT Desktop: See CHATGPT_SETUP.md
Amazon Q Developer: See AMAZON_Q_SETUP.md
Remote Setup (Mac to Linux): See MAC_SETUP_INSTRUCTIONS.md
Claude Desktop Configuration
Add to your Claude Desktop MCP settings file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Example Queries in Claude
Once configured, you can ask Claude:
File Format for Bulk Import
The add_records_from_file tool expects JSONL format (one JSON object per line):
Architecture
Key Components
server.py: MCP server implementation using the official
mcppackageDefines 11 tools for entity resolution operations
Handles tool calls and routes to SDK wrapper
Uses stdio transport for Claude Desktop integration
sdk_wrapper.py: Async wrapper for synchronous Senzing SDK
Initializes SDK from environment variables
Provides async interface using ThreadPoolExecutor
Handles error translation and bulk operations
Development
Running Tests
Debugging
Set log level for more verbose output:
Common Issues
SDK Initialization Failed
Check that
SENZING_ENGINE_CONFIGURATION_JSONis properly formattedVerify database connection settings
Ensure Senzing resources are accessible at specified paths
Import Path Issues
Verify Senzing SDK is installed at
/data/etl/senzing/er/v4beta/sdk/pythonCheck that the path is accessible and contains the senzing module
Performance Issues with Bulk Import
Adjust
max_workersparameter (default: 5)Monitor system resources during large imports
Consider breaking very large files into smaller batches
License
This MCP server implementation is provided as-is. Senzing SDK usage is subject to Senzing licensing terms.
Support
For issues with:
MCP Server: Check server logs and environment configuration
Senzing SDK: Consult Senzing documentation
Claude Integration: Verify MCP configuration in Claude Desktop settings
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables entity resolution capabilities through the Senzing SDK, allowing AI assistants to search entities, manage records, analyze relationships between entities, and perform bulk data imports with multithreading.