Skip to main content

Model Context Protocol server for Avatar — synthetic data generation, anonymization, and privacy-preserving augmentation

Project description

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

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

octopize_avatar_mcp-0.1.4.tar.gz (391.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octopize_avatar_mcp-0.1.4-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file octopize_avatar_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: octopize_avatar_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 391.9 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for octopize_avatar_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f1536b34eafd16abdab3bc8188457c76f055ee45fe9363f9c3d89deaa29c5584
MD5 2fe42e5a576dc56b321ce3b4299ed8b3
BLAKE2b-256 8a0bf3d679b5110aa9458f4c97a307cb3e18920c5bc6a2aa1a003d146727bb33

See more details on using hashes here.

File details

Details for the file octopize_avatar_mcp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: octopize_avatar_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 79.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for octopize_avatar_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c5f8b4a9cf9b2829fd0fa73b81d481345d681b4099b60ba480a22650320bc6
MD5 325fa86513bc3b5105c1d19b80cf4f2c
BLAKE2b-256 bf4716fc3c2a4ce1b63a3f005d0cffa14056bd5458727acf4a5cd4203051cbbf

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