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.1.tar.gz (2.8 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.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: usermcp-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 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.1.tar.gz
Algorithm Hash digest
SHA256 fdc24e5033461a69f1c15403e7bb4b688f19d64f9f23a226505070342967cc5e
MD5 2a43d865243ba6c4e4a7750c3077fee6
BLAKE2b-256 c656fb4b0deb0eb38ac632011e498a13d5b9597118ec0b04d4c4f42b3ca22c26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: usermcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6b5ce740968686a58a3b7caa628d925ab02e249e0e7598a494e3dc883a7b13
MD5 7f86295e141ddf1efef881a4d0ad00c9
BLAKE2b-256 2ef37be05ab5b504f66fc4256ed9759291da761baeb954d92c41a86779d934b9

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