Skip to main content

Add your description here

Project description

usermcp

With just one line of code, your MCP or agent can record and manage user preferences with the user profile MCP, without requiring any database dependencies.

Introduction

usermcp is a lightweight user preference management component designed to simplify the process of recording and managing user preferences for MCPs or agents. It provides simple interfaces for recording, querying, updating, and deleting user preferences without requiring any database dependencies.

Features

  • No Database Dependencies: Manage user preferences without installing or configuring a database
  • One-line Integration: Integrate user preference management into your MCP or agent with just one line of code
  • Full CRUD Operations: Supports Create, Read, Update, Delete operations for user preferences
  • Automatic Prompt Management: Built-in prompt management for user preferences

Installation

pip install usermcp

Usage

Basic Usage

from mcp.server.fastmcp import FastMCP
from usermcp import register_user_profile_mcp

# Create FastMCP instance
mcp = FastMCP('Your MCP Name')

# ...
# implement your MCP logic here
# ...

# Register user profile management functions
register_user_profile_mcp(mcp)

# Run MCP service
mcp.run()

Core Functions

usermcp provides the following tool functions:

  • usermcp_query_user_profile: Query user preferences
  • usermcp_insert_user_profile: Insert user preferences
  • usermcp_delete_user_profile: Delete user preferences

Prompt Management

usermcp includes built-in prompt management that automatically invokes the appropriate tool functions based on context:

  • Actively invoke usermcp_query_user_profile when the context contains relevant tokens like the user's name or other personal information
  • Invoke usermcp_insert_user_profile when the relevant information is triggered in your context
  • Invoke usermcp_delete_user_profile when the user's feedback is different from what you expected

Dependencies

  • Python >= 3.10
  • mcp >= 1.12.3

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usermcp-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usermcp-0.1.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file usermcp-0.1.2.tar.gz.

File metadata

  • Download URL: usermcp-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for usermcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c249dd647752b7a2383900df7d7b363baaf34273bec777fb87c7641649beff07
MD5 76cc09f55dcda71c28bf0f57c49f0a7e
BLAKE2b-256 ee2bd2d1eb0ed7de8ee6806cc5bb424a70c2a59743a10ab7e39862ea358282b1

See more details on using hashes here.

File details

Details for the file usermcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: usermcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for usermcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3218d51137a03315484f9db54bbe7ee0b1a8a48566445e106a7eae43b674408
MD5 15e10c5ea70af05f4e3ccc42113f8557
BLAKE2b-256 dd00036479ad3d61c9236a02c7c74948e644af055977f6f6523317cbb9c8d1b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page