A Model Context Protocol server enabling Claude to maintain user context through Apache Unomi profile management. This implementation provides: - Profile lookup and creation using email - Profile property management - Basic session handling - Scope management for context isolation Other Unomi features (events, segments, session properties, etc.) are not currently implemented. Community feedback we
Add this skill
npx mdskills install sergehuber/inoyu-mcp-unomi-serverWell-documented MCP server enabling user context management through Apache Unomi with clear setup instructions
A Model Context Protocol server enabling Claude to maintain user context through Apache Unomi profile management.
⚠️ Early Implementation Notice
This is an early implementation intended for demonstration purposes:
- Not validated for production use
- Subject to changes
- Not (yet) officially supported
- For learning and experimentation only
This implementation provides:
Other Unomi features (events, segments, session properties, etc.) are not currently implemented. Community feedback welcome on future development priorities.
Watch how the MCP server enables Claude to maintain context and manage user profiles:
To use with Claude Desktop, add the server config and environment variables:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"unomi-server": {
"command": "npx",
"args": ["@inoyu/mcp-unomi-server"],
"env": {
"UNOMI_BASE_URL": "http://your-unomi-server:8181",
"UNOMI_VERSION": "3", // Use "2" for Unomi V2, "3" for Unomi V3 (default)
"UNOMI_USERNAME": "your-username", // Required for V2, fallback for V3
"UNOMI_PASSWORD": "your-password", // Required for V2, fallback for V3
"UNOMI_PROFILE_ID": "your-profile-id",
"UNOMI_KEY": "your-unomi-key", // Required for V2 only
"UNOMI_EMAIL": "your-email@example.com",
"UNOMI_SOURCE_ID": "claude-desktop",
"UNOMI_TENANT_ID": "your-tenant-id", // Required for V3
"UNOMI_PUBLIC_KEY": "your-public-key", // Required for V3
"UNOMI_PRIVATE_KEY": "your-private-key" // Required for V3
}
}
}
}
The env section in the configuration allows you to set the required environment variables for the server. Replace the values with your actual Unomi server details.
Make sure to restart Claude Desktop after updating the configuration. You can then click on the tools icon on the lower right of the chat window to make sure it has found all the tools provided by this server.
get_my_profile - Get your profile using environment variables
update_my_profile - Update properties of your profile
{
"properties": {
"firstName": "John",
"age": 30,
"isSubscribed": true,
"oldProperty": null
}
}
get_profile - Retrieve a specific profile by ID
search_profiles - Search for profiles
create_scope - Create a new Unomi scope
{
"scope": "my-app",
"name": "My Application",
"description": "Scope for my application events"
}
get_tenant_info - Get information about the current tenant (V3 only)
update_consent - Update a user's consent status using the modifyConsent event
{
"consentId": "marketing-consent",
"status": "GRANTED",
"typeIdentifier": "marketing",
"scope": "claude-desktop",
"metadata": {
"source": "claude-desktop",
"timestamp": "2024-01-15T10:30:00Z"
}
}
get_consent - Get specific consent information for a profile
{
"consentId": "marketing-consent"
}
list_consents - List all consents for a profile with optional filtering
{
"status": "GRANTED",
"scope": "claude-desktop"
}
The server automatically manages scopes for you:
Default Scope:
claude-desktop is used for all operationsCustom Scopes:
create_scope toolAutomatic Scope Creation:
Note: While scopes are created automatically when needed, you can still create them manually with custom names and descriptions using the
create_scopetool.
This MCP server supports both Apache Unomi V2 and V3 with automatic version detection and appropriate authentication methods.
The server automatically detects the Unomi version based on the UNOMI_VERSION environment variable:
UNOMI_VERSION=2 - Uses V2 authentication (system administrator)UNOMI_VERSION=3 - Uses V3 authentication (tenant-based) - DefaultV2 (Legacy):
karaf/karaf by default)UNOMI_USERNAME, UNOMI_PASSWORD, and UNOMI_KEYV3 (Multi-tenant):
/context.json): Uses X-Unomi-Api-Key header with public keytenantId:privateKey)UNOMI_TENANT_ID, UNOMI_PUBLIC_KEY, and UNOMI_PRIVATE_KEYUpdate environment variables:
# Remove V2-specific variables
# UNOMI_KEY (no longer needed)
# Add V3-specific variables
UNOMI_VERSION=3
UNOMI_TENANT_ID=your-tenant-id
UNOMI_PUBLIC_KEY=your-public-key
UNOMI_PRIVATE_KEY=your-private-key
Benefits of V3:
This MCP server enables Claude to maintain context about users through Apache Unomi's profile management system. Here's what you can achieve with it:
User Recognition:
Context Management:
Consent Management:
Integration Features:
The server requires the following environment variables:
UNOMI_BASE_URL=http://your-unomi-server:8181
UNOMI_USERNAME=your-username
UNOMI_PASSWORD=your-password
UNOMI_PROFILE_ID=your-profile-id
UNOMI_SOURCE_ID=your-source-id
UNOMI_KEY=your-unomi-key
UNOMI_EMAIL=your-email
The server uses a two-step process to resolve the profile ID:
Email Lookup (if UNOMI_EMAIL is set):
Fallback Profile ID:
UNOMI_EMAIL is not setUNOMI_PROFILE_ID from environmentThe response will indicate which method was used via the source field:
"email_lookup": Profile found via email"environment": Using fallback profile IDConfigure protected events in etc/org.apache.unomi.cluster.cfg:
# Required for protected events like property updates
org.apache.unomi.cluster.authorization.key=your-unomi-key
# Required to allow Claude Desktop to access Unomi
# Replace your-claude-desktop-ip with your actual IP
org.apache.unomi.ip.ranges=127.0.0.1,::1,your-claude-desktop-ip
Ensure your Unomi server has CORS properly configured in etc/org.apache.unomi.cors.cfg:
# Add your Claude Desktop origin if needed
org.apache.unomi.cors.allowed.origins=http://localhost:*
Restart Unomi server to apply changes
Important: The Unomi key must match exactly between your server configuration and the UNOMI_KEY environment variable in Claude Desktop.
The server requires the following environment variables:
UNOMI_BASE_URL=http://your-unomi-server:8181
UNOMI_USERNAME=your-username
UNOMI_PASSWORD=your-password
UNOMI_PROFILE_ID=your-profile-id
UNOMI_SOURCE_ID=your-source-id
UNOMI_KEY=your-unomi-key
UNOMI_EMAIL=your-email
The server uses a two-step process to resolve the profile ID:
Email Lookup (if UNOMI_EMAIL is set):
Fallback Profile ID:
UNOMI_EMAIL is not setUNOMI_PROFILE_ID from environmentThe response will indicate which method was used via the source field:
"email_lookup": Profile found via email"environment": Using fallback profile IDConfigure protected events in etc/org.apache.unomi.cluster.cfg:
# Required for protected events like property updates
org.apache.unomi.cluster.authorization.key=your-unomi-key
# Required to allow Claude Desktop to access Unomi
# Replace your-claude-desktop-ip with your actual IP
org.apache.unomi.ip.ranges=127.0.0.1,::1,your-claude-desktop-ip
Ensure your Unomi server has CORS properly configured in etc/org.apache.unomi.cors.cfg:
# Add your Claude Desktop origin if needed
org.apache.unomi.cors.allowed.origins=http://localhost:*
Restart Unomi server to apply changes
Important: The Unomi key must match exactly between your server configuration and the UNOMI_KEY environment variable in Claude Desktop.
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
You can also tail the Claude Desktop logs to see MCP requests and responses:
# Follow logs in real-time
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
When using get_my_profile, the session ID is automatically generated using the format:
[profileId]-YYYYMMDD
For example, if your profile ID is "user123" and today is March 15, 2024, the session ID would be:
user123-20240315
Protected Events Failing
Profile Not Found
Session Issues
profileId-YYYYMMDDConnection Problems
Claude Desktop Logs:
# MacOS
~/Library/Logs/Claude/mcp*.log
# Windows
%APPDATA%\Claude\mcp*.log
Unomi Server Logs:
# Usually in
$UNOMI_HOME/logs/karaf.log
Reset State:
# Stop Claude Desktop
# Clear logs
rm ~/Library/Logs/Claude/mcp*.log
# Restart Claude Desktop
Verify Configuration:
# Check Unomi connection
curl -u username:password http://your-unomi-server:8181/cxs/cluster
# Test scope exists
curl -u username:password http://your-unomi-server:8181/cxs/scopes/claude-desktop
Create or edit your Claude Desktop configuration:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonAdd the server configuration using NPX:
{
"mcpServers": {
"unomi-server": {
"command": "npx",
"args": ["@inoyu/mcp-unomi-server"],
"env": {
"UNOMI_BASE_URL": "http://your-unomi-server:8181",
"UNOMI_USERNAME": "your-username",
"UNOMI_PASSWORD": "your-password",
"UNOMI_PROFILE_ID": "your-profile-id",
"UNOMI_KEY": "your-unomi-key",
"UNOMI_EMAIL": "your-email@example.com",
"UNOMI_SOURCE_ID": "claude-desktop"
}
}
}
}
Note: Using NPX ensures you're always running the latest published version of the server.
Alternatively, if you want to use a specific version:
{
"mcpServers": {
"unomi-server": {
"command": "npx",
"args": ["@inoyu/mcp-unomi-server@0.1.0"],
"env": {
// ... environment variables ...
}
}
}
}
For development or local installations:
{
"mcpServers": {
"unomi-server": {
"command": "node",
"args": ["/path/to/local/mcp-unomi-server/build/index.js"],
"env": {
// ... environment variables ...
}
}
}
}
Install via CLI
npx mdskills install sergehuber/inoyu-mcp-unomi-serverInoyu Apache Unomi MCP Server is a free, open-source AI agent skill. A Model Context Protocol server enabling Claude to maintain user context through Apache Unomi profile management. This implementation provides: - Profile lookup and creation using email - Profile property management - Basic session handling - Scope management for context isolation Other Unomi features (events, segments, session properties, etc.) are not currently implemented. Community feedback we
Install Inoyu Apache Unomi MCP Server with a single command:
npx mdskills install sergehuber/inoyu-mcp-unomi-serverThis downloads the skill files into your project and your AI agent picks them up automatically.
Inoyu Apache Unomi MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Codex, Gemini Cli, Amp, Roo Code, Goose, Opencode, Trae, Qodo, Command Code. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.