Metadata-Version: 2.4
Name: hive-memory-mcp
Version: 0.1.0
Summary: Hive Memory Enterprise MCP Server — team memory with PII masking and governance
Author: Hive Memory
License: Proprietary
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.6.0
Requires-Dist: python-dotenv>=1.0.1
Description-Content-Type: text/markdown

# Hive Memory Enterprise MCP

Python MCP server for Cursor, Claude Code, and other agents. Connects to a self-hosted Hive Memory API with PII masking, governance tools, and FinOps feedback.

## Install `uv`

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

## Cursor configuration

```json
{
  "mcpServers": {
    "hive-memory": {
      "command": "uvx",
      "args": ["hive-memory-mcp"],
      "env": {
        "HIVE_MEMORY_BACKEND_URL": "https://hive.yourcompany.com/api/v1",
        "HIVE_API_KEY": "hm_live_..."
      }
    }
  }
}
```

## Environment variables

| Variable | Required | Description |
|----------|----------|-------------|
| `HIVE_MEMORY_BACKEND_URL` | Yes | API base URL (e.g. `http://localhost:8000/api/v1`) |
| `HIVE_API_KEY` | Yes* | Service account API key (`hm_live_...`) |
| `HIVE_MEMORY_API_KEY` | Alt | Same as `HIVE_API_KEY` |
| `ENTERPRISE_WEBHOOK_URL` | No | Slack/Discord webhook (server-side on API, not MCP) |

\* Required for remote/production APIs. Local dev may use JWT from dashboard only for the web UI; MCP always needs an API key.

## Local development

```bash
cd mcp-server-enterprise
uv sync
export HIVE_MEMORY_BACKEND_URL=http://localhost:8000/api/v1
export HIVE_API_KEY=hm_live_your_key
uv run python main.py
```

## Tools

- `save_team_memory` — save gotcha with PII sanitization + audit log
- `search_team_memories` — vector search with utility boost
- `record_memory_feedback` — FinOps ROI ledger
- `moderate_team_memory` — approve / deprecate / edit
- `scan_duplicate_memories` / `merge_duplicate_memories`
- `get_analytics_and_roi`
- `run_memory_decay_audit`
- `synthesize_team_knowledge`

## Troubleshooting

- **401 Unauthorized** — check API key scopes (`memories:read`, `memories:write`, `governance:read`)
- **TLS errors** — ensure VPS certificate is valid; corporate proxy may need `HTTP_PROXY`
- **Connection refused** — verify `HIVE_MEMORY_BACKEND_URL` and that the backend is reachable from your machine
