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.3.tar.gz (391.8 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.3-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octopize_avatar_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 391.8 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.3.tar.gz
Algorithm Hash digest
SHA256 5c6e070134cccea70ce6bf9163e22523ed22c0cdf68738dc8a70dc2abae27827
MD5 e4ea7701a273c58fa4521aeee0a8eeaa
BLAKE2b-256 cadabe7dd05ac51e4ffb3b87f124fc0a40faeaf7144d5764380c65007bf961b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: octopize_avatar_mcp-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 963c0e33e7fd859397e5efc70079be228cbf5bc71f1976901397ec1e2674ad66
MD5 44d691f1671be292dc636f279f8aced0
BLAKE2b-256 57d72455995d3c89662bc60a5b0c9fd06b1602ff133a1a3e70cc9863ef0efb7b

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