Metadata-Version: 2.5
Name: swarmv-mcp
Version: 1.2.0
Summary: MCP server for SwarmV: persistent vector memory for AI agents, limited to what the user may access.
Project-URL: Homepage, https://edgevec.pages.dev
Project-URL: Documentation, https://edgevec.pages.dev/docs
License-Expression: MIT
Keywords: agents,ai,mcp,memory,swarmv,vector
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp<2,>=1.1.2
Requires-Dist: swarmv>=1.2.0
Description-Content-Type: text/markdown

# swarmv-mcp

MCP server for [SwarmV](https://edgevec.pages.dev): gives an AI agent persistent vector memory, limited to what the signed-in user is allowed to see and edit.

Tools:

- `read_from_memory` returns the closest records (id, distance, metadata) from the containers the user can view.
- `write_to_memory` stores a note in a container the user can edit (put the text in `metadata.text`).

## Setup

```bash
pip install swarmv-mcp
```

Add it to your MCP client's configuration (Claude Desktop, Cursor and others):

```json
{
  "mcpServers": {
    "swarmv": {
      "command": "swarmv-mcp",
      "env": {
        "SWARMV_TOKEN_URL": "https://your-backend.example.com/swarmv-token",
        "SWARMV_TOKEN_URL_AUTH": "<the signed-in user's session credential>"
      }
    }
  }
}
```

Or without installing first: `"command": "uvx", "args": ["swarmv-mcp"]`.

## Credentials

Pick one:

| Variables | Use |
| --- | --- |
| `SWARMV_TOKEN_URL` (+ optional `SWARMV_TOKEN_URL_AUTH`) | Recommended. Your backend returns `{ "token": "..." }`, a short-lived user token it minted with your API key. |
| `SWARMV_USER_TOKEN` | A user token you already have (expires). |
| `SWARMV_API_KEY` + `SWARMV_USER_ID=user:<id>` | Local development only. Never ship your API key to end users. |

Optional: `SWARMV_DIM` (vector dimensions, default 768), `SWARMV_BASE_URL`.

Full documentation: https://edgevec.pages.dev/docs

## License

MIT
