memory-hub-mcp


Namememory-hub-mcp JSON
Version 1.4.2 PyPI version JSON
download
home_pageNone
SummaryLocal Memory Hub MCP Server with stdio transport for ZenCoder and MCP clients
upload_time2025-10-27 02:53:26
maintainerNone
docs_urlNone
authorMatt
requires_python>=3.11
licenseMIT
keywords ai mcp memory stdio vector-search zencoder
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Memory Hub MCP Server (UV/UVX)

A local memory hub for AI agents with MCP integration, designed for ZenCoder and other MCP clients using stdio transport.

## Quick Start with UVX

### Installation & Usage

```bash
# Install and run directly with uvx
uvx memory-hub-mcp

# Or install locally first
uv pip install memory-hub-mcp
memory-hub-mcp
```

### For ZenCoder Integration

In ZenCoder's custom MCP server configuration, you must now provide the URLs for the dependent services (Qdrant and LM Studio).

**Command:** `uvx`

**Arguments:** 
```json
[
    "memory-hub-mcp",
    "--qdrant-url",
    "http://<ip_address_of_qdrant>:6333",
    "--lm-studio-url",
    "http://<ip_address_of_lm_studio>:1234/v1"
]
```
> **Note:** Replace `<ip_address_...>` with the actual IP addresses where your services are running. If they are on the same machine, the IP will be the same for both.

## Development Setup

```bash
# Clone and setup
git clone <your-repo>
cd memory-hub
uv venv
source .venv/bin/activate
uv pip install -e .

# Run in development
memory-hub-mcp --log-level DEBUG --qdrant-url http://localhost:6333 --lm-studio-url http://localhost:1234/v1
```

## Publishing to PyPI

To publish a new version of the package to PyPI:

1.  **Update the Version**: Increment the `version` number in `pyproject.toml`. PyPI does not allow re-uploading the same version.
    
    ```toml
    # pyproject.toml
    [project]
    name = "memory-hub-mcp"
    version = "0.1.2" # Increment this
    ```

2.  **Clean and Rebuild**: Remove old builds and create the new distributions.
    
    ```bash
    rm -rf dist/
    uv build
    ```

3.  **Publish with an API Token**:
    
    The recommended way to publish is to use a PyPI API token. You can provide it directly to the command via an environment variable for security.
    
    ```bash
    # Replace <your_pypi_token> with your actual token
    UV_PUBLISH_TOKEN=<your_pypi_token> uv publish dist/*
    ```

## Available Tools

- **add_memory**: Store content with hierarchical metadata (app_id, project_id, ticket_id)
- **search_memories**: Semantic search with keyword enhancement and LLM synthesis
- **get_project_memories**: Retrieve ALL memories for a specific app_id/project_id without search queries
- **update_memory**: Update existing memories with automatic version incrementing
- **get_recent_memories**: Retrieve memories from the last N hours (perfect for resuming work)
- **list_app_ids**: List all application IDs
- **list_project_ids**: List all project IDs  
- **list_ticket_ids**: List all ticket IDs
- **list_memory_types**: List memory types currently in use (with counts and metadata)
- **get_memory_type_guide**: Get the recommended memory type conventions
- **health_check**: Server health status

## Configuration

The server expects:
- **Qdrant**: Vector database running (see docker-compose.yml)
- **LM Studio**: For embeddings and chat completions
- **Environment**: Standard .env configuration

## Key File & Directory Locations

- **`pyproject.toml`**: Defines project metadata, dependencies, and the `memory-hub-mcp` script entry point.
- **`src/memory_hub/`**: The main Python package source code.
- **`src/memory_hub/cli.py`**: The command-line interface logic that launches the server.
- **`src/memory_hub/mcp_server.py`**: Core `stdio` server implementation and tool registration.
- **`src/memory_hub/core/handlers/`**: Contains the implementation for each MCP tool (e.g., `add_memory`, `search_memories`).
- **`src/memory_hub/core/services.py`**: Handles communication with external services like Qdrant and LM Studio.
- **`src/memory_hub/core/models.py`**: Pydantic models defining the data structures used throughout the application.
- **`docker-compose.yml`**: Defines the Qdrant service dependency.

## Architecture

- **stdio transport**: Direct MCP protocol communication
- **No HTTP dependencies**: Lightweight, focused on MCP clients
- **Hierarchical memory**: Flexible app/project/ticket organization
- **Hybrid search**: Vector similarity + keyword matching + LLM synthesis
- **Version management**: Automatic versioning for memory updates
- **Time-based retrieval**: Query recent memories by hours

## Agent Usage Guide

### Saving Agent Progress
```python
# Save initial work
add_memory(
    content="Implemented user authentication with JWT tokens...",
    metadata={
        "app_id": "eatzos",
        "project_id": "next",
        "type": "feature_implementation"
    }
)

# Update existing memory
update_memory(
    app_id="eatzos",
    project_id="next", 
    memory_type="feature_implementation",
    new_content="Completed authentication with JWT tokens and added refresh token logic..."
)
```

### Resuming Agent Work
```python
# Get ALL context for a project (no search guessing!)
get_project_memories(
    app_id="eatzos",
    project_id="next",
    limit=50
)

# See what changed recently
get_recent_memories(
    app_id="eatzos",
    hours=24,
    include_summary=True
)
```

## Differences from HTTP Version

This UV/UVX version:
- ✅ Uses stdio transport (ZenCoder compatible)
- ✅ No FastAPI dependencies
- ✅ Lightweight packaging
- ✅ Direct MCP protocol
- ❌ No web interface
- ❌ No HTTP endpoints 
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "memory-hub-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "ai, mcp, memory, stdio, vector-search, zencoder",
    "author": "Matt",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/12/9a/669ed1f560f049a535da33155569efe4fcf32a74190af9bce49defc2d236/memory_hub_mcp-1.4.2.tar.gz",
    "platform": null,
    "description": "# Memory Hub MCP Server (UV/UVX)\n\nA local memory hub for AI agents with MCP integration, designed for ZenCoder and other MCP clients using stdio transport.\n\n## Quick Start with UVX\n\n### Installation & Usage\n\n```bash\n# Install and run directly with uvx\nuvx memory-hub-mcp\n\n# Or install locally first\nuv pip install memory-hub-mcp\nmemory-hub-mcp\n```\n\n### For ZenCoder Integration\n\nIn ZenCoder's custom MCP server configuration, you must now provide the URLs for the dependent services (Qdrant and LM Studio).\n\n**Command:** `uvx`\n\n**Arguments:** \n```json\n[\n    \"memory-hub-mcp\",\n    \"--qdrant-url\",\n    \"http://<ip_address_of_qdrant>:6333\",\n    \"--lm-studio-url\",\n    \"http://<ip_address_of_lm_studio>:1234/v1\"\n]\n```\n> **Note:** Replace `<ip_address_...>` with the actual IP addresses where your services are running. If they are on the same machine, the IP will be the same for both.\n\n## Development Setup\n\n```bash\n# Clone and setup\ngit clone <your-repo>\ncd memory-hub\nuv venv\nsource .venv/bin/activate\nuv pip install -e .\n\n# Run in development\nmemory-hub-mcp --log-level DEBUG --qdrant-url http://localhost:6333 --lm-studio-url http://localhost:1234/v1\n```\n\n## Publishing to PyPI\n\nTo publish a new version of the package to PyPI:\n\n1.  **Update the Version**: Increment the `version` number in `pyproject.toml`. PyPI does not allow re-uploading the same version.\n    \n    ```toml\n    # pyproject.toml\n    [project]\n    name = \"memory-hub-mcp\"\n    version = \"0.1.2\" # Increment this\n    ```\n\n2.  **Clean and Rebuild**: Remove old builds and create the new distributions.\n    \n    ```bash\n    rm -rf dist/\n    uv build\n    ```\n\n3.  **Publish with an API Token**:\n    \n    The recommended way to publish is to use a PyPI API token. You can provide it directly to the command via an environment variable for security.\n    \n    ```bash\n    # Replace <your_pypi_token> with your actual token\n    UV_PUBLISH_TOKEN=<your_pypi_token> uv publish dist/*\n    ```\n\n## Available Tools\n\n- **add_memory**: Store content with hierarchical metadata (app_id, project_id, ticket_id)\n- **search_memories**: Semantic search with keyword enhancement and LLM synthesis\n- **get_project_memories**: Retrieve ALL memories for a specific app_id/project_id without search queries\n- **update_memory**: Update existing memories with automatic version incrementing\n- **get_recent_memories**: Retrieve memories from the last N hours (perfect for resuming work)\n- **list_app_ids**: List all application IDs\n- **list_project_ids**: List all project IDs  \n- **list_ticket_ids**: List all ticket IDs\n- **list_memory_types**: List memory types currently in use (with counts and metadata)\n- **get_memory_type_guide**: Get the recommended memory type conventions\n- **health_check**: Server health status\n\n## Configuration\n\nThe server expects:\n- **Qdrant**: Vector database running (see docker-compose.yml)\n- **LM Studio**: For embeddings and chat completions\n- **Environment**: Standard .env configuration\n\n## Key File & Directory Locations\n\n- **`pyproject.toml`**: Defines project metadata, dependencies, and the `memory-hub-mcp` script entry point.\n- **`src/memory_hub/`**: The main Python package source code.\n- **`src/memory_hub/cli.py`**: The command-line interface logic that launches the server.\n- **`src/memory_hub/mcp_server.py`**: Core `stdio` server implementation and tool registration.\n- **`src/memory_hub/core/handlers/`**: Contains the implementation for each MCP tool (e.g., `add_memory`, `search_memories`).\n- **`src/memory_hub/core/services.py`**: Handles communication with external services like Qdrant and LM Studio.\n- **`src/memory_hub/core/models.py`**: Pydantic models defining the data structures used throughout the application.\n- **`docker-compose.yml`**: Defines the Qdrant service dependency.\n\n## Architecture\n\n- **stdio transport**: Direct MCP protocol communication\n- **No HTTP dependencies**: Lightweight, focused on MCP clients\n- **Hierarchical memory**: Flexible app/project/ticket organization\n- **Hybrid search**: Vector similarity + keyword matching + LLM synthesis\n- **Version management**: Automatic versioning for memory updates\n- **Time-based retrieval**: Query recent memories by hours\n\n## Agent Usage Guide\n\n### Saving Agent Progress\n```python\n# Save initial work\nadd_memory(\n    content=\"Implemented user authentication with JWT tokens...\",\n    metadata={\n        \"app_id\": \"eatzos\",\n        \"project_id\": \"next\",\n        \"type\": \"feature_implementation\"\n    }\n)\n\n# Update existing memory\nupdate_memory(\n    app_id=\"eatzos\",\n    project_id=\"next\", \n    memory_type=\"feature_implementation\",\n    new_content=\"Completed authentication with JWT tokens and added refresh token logic...\"\n)\n```\n\n### Resuming Agent Work\n```python\n# Get ALL context for a project (no search guessing!)\nget_project_memories(\n    app_id=\"eatzos\",\n    project_id=\"next\",\n    limit=50\n)\n\n# See what changed recently\nget_recent_memories(\n    app_id=\"eatzos\",\n    hours=24,\n    include_summary=True\n)\n```\n\n## Differences from HTTP Version\n\nThis UV/UVX version:\n- \u2705 Uses stdio transport (ZenCoder compatible)\n- \u2705 No FastAPI dependencies\n- \u2705 Lightweight packaging\n- \u2705 Direct MCP protocol\n- \u274c No web interface\n- \u274c No HTTP endpoints ",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Local Memory Hub MCP Server with stdio transport for ZenCoder and MCP clients",
    "version": "1.4.2",
    "project_urls": null,
    "split_keywords": [
        "ai",
        " mcp",
        " memory",
        " stdio",
        " vector-search",
        " zencoder"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aedd6b94c977bf27a81440d5ffcb7691c982f838c7e2ebcd4bb3236595cdd7e4",
                "md5": "2acff314921bb09f4bc8a4726c5cafa7",
                "sha256": "82c6d7f0b6df15ee606787da7ff38e76a98ec42c3740069e8c335183abcadcae"
            },
            "downloads": -1,
            "filename": "memory_hub_mcp-1.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2acff314921bb09f4bc8a4726c5cafa7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 33818,
            "upload_time": "2025-10-27T02:53:25",
            "upload_time_iso_8601": "2025-10-27T02:53:25.242229Z",
            "url": "https://files.pythonhosted.org/packages/ae/dd/6b94c977bf27a81440d5ffcb7691c982f838c7e2ebcd4bb3236595cdd7e4/memory_hub_mcp-1.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "129a669ed1f560f049a535da33155569efe4fcf32a74190af9bce49defc2d236",
                "md5": "b8e970f241b8ad2852bb13328e2f38cb",
                "sha256": "299436895957230f08dfe931c1affa6f39d3e2276b9696eb212ae1e29fc1a78e"
            },
            "downloads": -1,
            "filename": "memory_hub_mcp-1.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b8e970f241b8ad2852bb13328e2f38cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 83459,
            "upload_time": "2025-10-27T02:53:26",
            "upload_time_iso_8601": "2025-10-27T02:53:26.781561Z",
            "url": "https://files.pythonhosted.org/packages/12/9a/669ed1f560f049a535da33155569efe4fcf32a74190af9bce49defc2d236/memory_hub_mcp-1.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-27 02:53:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "memory-hub-mcp"
}
        
Elapsed time: 2.30251s