inoyu-mcp-unomi-server
inoyu-mcp-unomi-server: An MCP server connecting Claude to Apache Unomi for persistent user context.

inoyu-mcp-unomi-server Solution Overview
The inoyu-mcp-unomi-server is an MCP server designed to seamlessly integrate Anthropic's Claude with Apache Unomi, a Customer Data Platform (CDP), enabling persistent user context across conversations. This server empowers Claude to remember user preferences by leveraging Unomi's profile management capabilities. Key features include user recognition via email or profile ID, context management for storing and retrieving user preferences, and scope-based context isolation.
This solution allows developers to build AI applications with a more personalized user experience. By connecting Claude to Unomi, the server facilitates consistent user context between sessions, enhancing AI model functionality. It offers tools for profile lookup, creation, and property updates, using standard environment variables for easy configuration. The server automatically manages scopes, ensuring proper context isolation. This integration is achieved through standard HTTP communication with the Unomi server, making it a valuable asset for developers seeking to create context-aware AI applications.
inoyu-mcp-unomi-server Key Capabilities
Persistent User Context
The inoyu-mcp-unomi-server enables AI models like Claude to maintain a persistent understanding of users across multiple conversations. It achieves this by leveraging Apache Unomi, a Customer Data Platform (CDP), to store and retrieve user profiles. When a user interacts with the AI, the server uses the user's email (if provided) or a pre-existing profile ID to fetch their Unomi profile. This profile contains valuable information such as preferences, past interactions, and other relevant data. This allows the AI to personalize responses, remember past conversations, and provide a more consistent and relevant experience. For example, if a user previously indicated a preference for a specific type of product, the AI can proactively suggest similar items in future interactions. The server uses the get_my_profile
tool to retrieve the profile and the UNOMI_EMAIL
or UNOMI_PROFILE_ID
environment variables for identification.
Dynamic Profile Updates
This server allows AI models to dynamically update user profiles in Apache Unomi based on real-time interactions. Using the update_my_profile
tool, the AI can modify profile properties such as preferences, interests, or demographic information. This ensures that the user profile remains up-to-date and accurately reflects their current state. For instance, if a user expresses interest in a particular topic during a conversation, the AI can update their profile to reflect this interest. This updated profile can then be used to personalize future interactions and provide more relevant content. The server supports various data types for profile properties, including strings, numbers, booleans, and null values, providing flexibility in capturing different types of user information. This dynamic update capability allows for a continuous learning loop, where the AI learns more about the user with each interaction and uses this knowledge to improve the overall experience.
Scope-Based Context Isolation
The inoyu-mcp-unomi-server implements scope management to isolate user context across different applications or contexts. This is achieved through the use of Apache Unomi scopes, which allow for the creation of separate namespaces for user data. By assigning different scopes to different applications, the server ensures that data from one application does not interfere with data from another. For example, a user's preferences in a shopping application would be stored in a different scope than their preferences in a customer support application. This prevents the AI from inadvertently using information from one context in another, ensuring a more relevant and accurate experience. The server automatically creates a default scope (claude-desktop
) and provides the create_scope
tool for creating custom scopes. This feature is crucial for maintaining data privacy and ensuring that the AI uses the correct context when interacting with users.
Simplified User Identification
The server simplifies user identification by providing a flexible mechanism for resolving profile IDs. It first attempts to identify the user by their email address (if provided via the UNOMI_EMAIL
environment variable). If a profile is found with the matching email, that profile's ID is used. If no matching email is found, the server falls back to using the UNOMI_PROFILE_ID
environment variable. This two-step process ensures that a profile is always available, even if the user's email is not known. This is particularly useful in scenarios where users may not always be logged in or where email addresses are not consistently available. The server indicates which method was used to resolve the profile ID via the source
field in the response, providing transparency and allowing developers to track how users are being identified. This simplified user identification process streamlines the integration of the server with AI models and simplifies the development of personalized experiences.