Skip to main content

Avatar MCP Server

MCP server for the Avatar data anonymization platform with multi-tenant authentication and secure file handling.

Features

  • 🔐 Multi-Tenant Auth: Bearer token authentication with per-user data isolation
  • 📁 Secure File Upload: Path-based uploads, file content never exposed to LLM
  • 📊 Avatar Tools: Create projects, anonymize data, generate synthetic data, download reports
  • ⚡ Performance Profiling: Optional timing analysis for optimization
  • 🧪 184 Tests: Comprehensive test coverage for reliability

See specs/ directory for detailed feature specifications.

Roadmap

Upcoming features:

  • 🔄 Data Augmentation: Generate synthetic data variations
  • 🔗 Multi-Table Support: Handle relational datasets with foreign keys
  • ⏰ Time-Series: Specialized anonymization for temporal data

Quick Start

just install    # Install dependencies
just start      # Start server on port 8081
just test       # Run all 184 tests
just lci        # Run full CI (lint + typecheck + test)

Run just without arguments to see all available commands.

VSCode Configuration

First, start the server:

just start  # starts on http://localhost:8081

Then create a .vscode/mcp.json file in your project:

{
  "servers": {
    "avatar-mcp": {
      "type": "http",
      "url": "http://localhost:8081/sse",
      "headers": {
        "Authorization": "Bearer octopize_apikey.xxxxxxxxx"
      }
    }
  }
}

Note: Replace octopize_apikey.xxxxxxxxx with your real Avatar API key from avatar.octopize.io. API keys start with octopize_apikey..

Usage Examples

Using MCP Tools

Once configured in VSCode, ask Copilot to use Avatar tools:

"Create a new Avatar project called 'patient-data' with the file ./data/patients.csv"
"Anonymize the data with k=5 and epsilon=1.0"
"Download the anonymized dataset to ./output/patients_avatarized.csv"
"Show me the privacy metrics"

HTTP API (Programmatic Access)

curl -X POST http://localhost:8081/mcp/v1/tools/call \
  -H "Authorization: Bearer octopize_apikey.xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "create_project",
    "arguments": {
      "project_name": "patient-data",
      "primary_table_path": "./data/patients.csv"
    }
  }'

Architecture

  • Multi-Tenant: Each API key gets isolated session storage (/tmp/avatar-mcp/{tenant_id}/)
  • File Security: Files uploaded via path reference, content never exposed to LLM (<2KB responses)
  • Tool → Core → SDK: Tools validate params, core modules handle logic, Avatar SDK does anonymization
  • Resource URIs: All artifacts use avatar:// URIs served via MCP resource protocol

See .github/copilot-instructions.md for detailed conventions.

Development

This is a development repository for feature specifications and experimental implementations. Production code lives in avatar.git/services/mcp/.

Workflow:

  1. Write spec in specs/{number}-{feature}/
  2. Implement in src/ with tests in tests/
  3. Validate with just lci
  4. Integrate into production codebase

Project Structure

specs/                # Feature specifications
src/
  ├── tools/          # MCP tool definitions
  ├── core/           # Business logic
  ├── auth/           # Authentication & tenant management
  ├── storage/        # File handling
  └── resources/      # MCP resource handlers
tests/
  ├── unit/           # Unit tests
  └── integration/    # Integration tests

Related

  • Production: avatar.git/services/mcp/ - Production MCP server with HTTPS support
  • Avatar SDK: avatar.git/services/client/ - Python SDK for avatarization
  • Avatar Engine: avatar.git/avatar/ - Core anonymization engine

Metadata

Release files for octopize.avatar-mcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for octopize.avatar-mcp 0.1.4
File Size Uploaded Provenance
octopize_avatar_mcp-0.1.4.tar.gz 391.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for octopize.avatar-mcp 0.1.4
File Interpreter ABI Platform
octopize_avatar_mcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 471.7 kB

Release files / octopize_avatar_mcp-0.1.4.tar.gz

Download URL octopize_avatar_mcp-0.1.4.tar.gz
Size 391.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f1536b34eafd16abdab3bc8188457c76f055ee45fe9363f9c3d89deaa29c5584
BLAKE2b-256 checksum
How to use checksums
8a0bf3d679b5110aa9458f4c97a307cb3e18920c5bc6a2aa1a003d146727bb33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / octopize_avatar_mcp-0.1.4-py3-none-any.whl

Download URL octopize_avatar_mcp-0.1.4-py3-none-any.whl
Size 79.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5c5f8b4a9cf9b2829fd0fa73b81d481345d681b4099b60ba480a22650320bc6
BLAKE2b-256 checksum
How to use checksums
bf4716fc3c2a4ce1b63a3f005d0cffa14056bd5458727acf4a5cd4203051cbbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for octopize.avatar-mcp 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page