MCP Server for IETF vCon - Open Source Core
npm install vcon-mcp> A Model Context Protocol (MCP) server for storing, managing, and analyzing IETF vCon (Virtual Conversation) data with AI assistants.
This MCP server provides a standardized way for AI assistants like Claude to interact with conversation data using the IETF vCon (Virtual Conversation) format. It combines the Model Context Protocol's tool-based interaction model with Supabase's powerful PostgreSQL backend to create a fully spec-compliant conversation data management system.
vCon (Virtual Conversation) is an IETF standard for representing conversations in a portable, interoperable format. Think of it as "PDF for conversations" - a standardized container for:
- Conversations from any medium (voice, video, text, email)
- Participants with identity and privacy controls
- AI Analysis from transcription, sentiment, summarization, etc.
- Attachments like documents, images, or related files
- Privacy markers for consent and redaction
The Model Context Protocol (MCP) enables AI assistants to use external tools and data sources. This server implements MCP to give AI assistants the ability to create, search, analyze, and manage conversation data.
- ✅ IETF vCon Compliant - Implements draft-ietf-vcon-vcon-core-00 specification
- ✅ MCP Integration - 27+ tools for AI assistants to manage conversation data
- ✅ Database Analytics - Comprehensive analytics for size, growth, content patterns, and health monitoring
- ✅ Large Database Support - Smart response limiting, metadata-only options, and memory-safe queries
- ✅ OpenTelemetry Observability - Full traces, metrics, and structured logs with console or OTLP export
- ✅ Query Prompts - 9 pre-built prompts to guide effective searching and retrieval:
- Exact tag matching (e.g., "find angry customers from June")
- Semantic search (e.g., "find frustrated users")
- Keyword search (e.g., "find conversations mentioning refund")
- Multi-criteria queries with step-by-step guidance
- ✅ Supabase Backend - Powerful PostgreSQL database with REST API
- ✅ Redis Caching - Optional high-performance cache layer for 20-50x faster reads
- ✅ Type-Safe - Full TypeScript implementation with Zod validation
- ✅ Plugin Architecture - Extensible plugin system for custom functionality
- ✅ Privacy-Ready - Plugin hooks for implementing consent, redaction, and compliance
- ✅ Advanced Search - Four search tools for different use cases:
- Basic filtering (subject, parties, dates)
- Full-text keyword search (dialog, analysis, parties)
- Semantic search (AI embeddings for meaning-based search)
- Hybrid search (combines keyword and semantic)
- ✅ Tag Filtering - Filter search results by tags via attachments of type tags
- ✅ Content Indexing - Searches dialog bodies and analysis content (encoding='none')
- ✅ Real-time - Supabase realtime subscriptions for live updates
- ✅ Conserver Integration - Compatible with vCon conserver for chain processing
- Node.js 18+
- npm or yarn
- Supabase account (sign up free)
``bashClone the repository
git clone https://github.com/vcon-dev/vcon-mcp.git
cd vcon-mcp
$3
Add to
~/Library/Application Support/Claude/claude_desktop_config.json:`json
{
"mcpServers": {
"vcon": {
"command": "node",
"args": ["/path/to/vcon-mcp/dist/index.js"],
"env": {
"SUPABASE_URL": "your-project-url",
"SUPABASE_ANON_KEY": "your-anon-key",
"REDIS_URL": "redis://localhost:6379"
}
}
}
}
`Note:
REDIS_URL is optional. If provided, enables high-performance caching for 20-50x faster reads. See Redis-Supabase Integration Guide.Restart Claude Desktop and start using vCon tools!
Common Operations
The project includes npm scripts for common database and data management operations:
$3
`bash
Comprehensive database status (recommended)
npm run db:statusQuick vCon count check
npm run db:checkDaily count analysis to identify gaps
npm run db:analyze
`$3
`bash
Load recent vCons from S3
npm run load:s3:recentLoad from S3 with default settings
npm run load:s3Load from local directory
npm run load:local
`$3
`bash
Backup database
npm run db:backupRestore from backup
npm run db:restore
`$3
`bash
Backfill missing embeddings
npm run embeddings:backfillGenerate embeddings locally
npm run embeddings:generateCheck embedding coverage
npm run embeddings:check
`$3
`bash
Test database tools
npm run test:dbTest search functionality
npm run test:searchTest tag system
npm run test:tags
`For more details on scripts and advanced options, see scripts/README.md.
Transport Options
The vCon MCP Server supports multiple transport mechanisms for connecting AI assistants:
$3
Standard input/output transport for CLI-based AI assistants like Claude Desktop.
`bash
Default mode - no configuration needed
npm run dev
`Or explicitly in
.env:
`bash
MCP_TRANSPORT=stdio
`$3
HTTP server mode enables browser-based clients and remote connections using the MCP Streamable HTTP specification (2025-03-26).
Features:
- ✅ Stateful or stateless session management
- ✅ SSE streaming for real-time responses
- ✅ JSON-only mode for simple request/response
- ✅ CORS support for browser clients
- ✅ DNS rebinding protection for security
- ✅ Session resumability (optional)
Configuration:
`bash
.env
MCP_TRANSPORT=http
MCP_HTTP_HOST=127.0.0.1
MCP_HTTP_PORT=3000Optional: Stateless mode (no session tracking)
MCP_HTTP_STATELESS=true
Optional: JSON-only responses (no SSE streaming)
MCP_HTTP_JSON_ONLY=true
Optional: CORS for browser clients
MCP_HTTP_CORS=true
MCP_HTTP_CORS_ORIGIN=*
Optional: DNS rebinding protection
MCP_HTTP_DNS_PROTECTION=true
MCP_HTTP_ALLOWED_HOSTS=localhost,127.0.0.1
MCP_HTTP_ALLOWED_ORIGINS=http://localhost:3000
`Starting the HTTP Server:
`bash
npm run dev
`The server will start on
http://127.0.0.1:3000 (default) and log:
`
✅ vCon MCP Server running on HTTP
🌐 Listening on: http://127.0.0.1:3000
📡 Mode: Stateful
`Client Connection:
`bash
Step 1: Initialize MCP connection
curl -i -X POST http://127.0.0.1:3000 \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}}}'Extract the Mcp-Session-Id from response headers
Step 2: Send MCP requests with session ID
curl -X POST http://127.0.0.1:3000 \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: " \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'GET request to establish SSE stream (for notifications)
curl -X GET http://127.0.0.1:3000 \
-H "Mcp-Session-Id: "DELETE request to close session
curl -X DELETE http://127.0.0.1:3000 \
-H "Mcp-Session-Id: "
`Session Management:
- Stateful mode (default): Server generates and tracks session IDs
- Stateless mode (
MCP_HTTP_STATELESS=true): No session tracking, each request is independentSee MCP Streamable HTTP Specification for protocol details.
Available MCP Tools
$3
Create a new vCon with parties and optional initial data.
`
Create a vCon for a customer support call between Alice and Bob
`$3
Retrieve a complete vCon by UUID.
`
Get the vCon with UUID abc-123-def
`$3
Search vCons by subject, party name, or date range (basic filtering).
`
Find all vCons from last week about billing
`$3
Full-text keyword search across dialog, analysis, and party content.
`
Search for conversations mentioning "refund request"
`$3
AI-powered semantic search to find conversations by meaning (requires embeddings).
`
Find conversations where customers were frustrated with delivery times
`$3
Combined keyword and semantic search for comprehensive results.
`
Search for billing disputes using both exact matches and similar concepts
`$3
Add AI/ML analysis results to a vCon.
`
Add sentiment analysis showing positive sentiment to vCon abc-123
`$3
Add a conversation segment (recording, text, video, etc.).
`
Add a text dialog from Alice saying "Hello, how can I help you?"
`$3
Attach files, documents, or supporting materials.
`
Attach the customer's invoice PDF to this vCon
`$3
Delete a vCon and all related data.
`
Delete the vCon abc-123
`$3
Get comprehensive database analytics including size, growth trends, and content distribution.
`
Get database analytics for the last 6 months
`$3
Get detailed monthly growth patterns and projections.
`
Show me monthly growth trends for the past year
`$3
Analyze attachment types, sizes, and storage patterns.
`
What types of files are being stored and how much space do they use?
`$3
Analyze tag usage patterns and value distribution.
`
Show me the most commonly used tags and their values
`$3
Get insights into conversation content, dialog types, and party patterns.
`
Analyze the types of conversations and content being stored
`$3
Monitor database performance and get optimization recommendations.
`
Check database health and performance metrics
`$3
Get database size information and smart recommendations for large datasets.
`
Get database size info and recommendations for query limits
`$3
Get smart search limits based on database size to prevent memory issues.
`
Get recommended limits for content search on this large database
`$3
Update top-level vCon metadata (subject, extensions, must_support).
`
Update vCon 01f3-... with subject "Updated Subject"
`$3
Create a new vCon from a predefined template (phone_call, chat_conversation, email_thread, video_meeting, custom).
`
Create a phone_call vCon with two parties and subject "Onboarding"
`$3
Get vCon schema (json_schema or typescript).
`
Get the vCon JSON Schema
`$3
Get example vCons (minimal, phone_call, chat, email, video, full_featured) in JSON or YAML.
Database Inspection Tools
$3
Get comprehensive database structure information including tables, indexes, sizes, and relationships. Useful for debugging and understanding your database schema.
$3
Get database performance and usage statistics including cache hit ratios, table access patterns, and index usage. Essential for performance monitoring and optimization.
$3
Analyze SQL query execution plans for performance optimization (limited support).
`
Show a minimal example vCon as JSON
`Available MCP Resources
The server exposes URI-based resources for direct reads:
-
vcon://v1/vcons/{uuid} – full vCon JSON
- vcon://v1/vcons/{uuid}/metadata – metadata only
- vcon://v1/vcons/{uuid}/parties – parties array
- vcon://v1/vcons/{uuid}/dialog – dialog array
- vcon://v1/vcons/{uuid}/attachments – attachments array
- vcon://v1/vcons/{uuid}/analysis – analysis array
- vcon://v1/vcons/{uuid}/transcript – transcript analysis (filtered)
- vcon://v1/vcons/{uuid}/summary – summary analysis (filtered)
- vcon://v1/vcons/{uuid}/tags – tags as object (parsed)Use Cases
$3
- Capture and analyze customer calls
- Generate automatic transcripts
- Track agent performance and sentiment
- Maintain compliance audit trails
$3
- Record sales conversations
- Extract action items and follow-ups
- Analyze conversation patterns
- Generate meeting summaries
$3
- Collect conversation datasets
- Analyze communication patterns
- Generate insights from dialogue
- Build ML training data
$3
- Maintain conversation archives
- Apply redaction for privacy
- Track consent and permissions
- Generate audit reports
Architecture
$3
`
┌─────────────────────┐
│ AI Assistant │ (Claude, ChatGPT, etc.)
│ (Client) │
└──────────┬──────────┘
│ MCP Protocol (stdio)
│
┌──────────▼──────────┐
│ vCon MCP Server │ (This project)
│ │
│ ┌───────────────┐ │
│ │ MCP Tools │ │ - create_vcon
│ │ │ │ - add_analysis
│ └───────┬───────┘ │ - search_vcons
│ │ │ - etc.
│ ┌───────▼───────┐ │
│ │ vCon Queries │ │ - CRUD operations
│ │ │ │ - Validation
│ └───────┬───────┘ │ - Type checking
│ │ │
└──────────┼──────────┘
│ Supabase Client
│
┌──────────▼──────────┐
│ Supabase │
│ (PostgreSQL) │
│ │
│ ┌───────────────┐ │
│ │ vCon Tables │ │ - vcons
│ │ │ │ - parties
│ └───────────────┘ │ - dialog
│ ┌───────────────┐ │ - analysis
│ │ pgvector │ │ - attachments
│ │ (embeddings) │ │
│ └───────────────┘ │
└─────────────────────┘
`$3
For high-performance deployments, add Redis as a cache layer:
`
┌─────────────────────────────────────────────────┐
│ AI Assistant │
└─────────────────────┬───────────────────────────┘
│ MCP Protocol
┌─────────────────────▼───────────────────────────┐
│ vCon MCP Server │
│ │
│ ┌───────────────────────────────────────────┐ │
│ │ Cache-First Reads │ │
│ │ Redis (hot) → Supabase (cold fallback) │ │
│ └───────────────────────────────────────────┘ │
└─────────────┬───────────────────┬───────────────┘
│ │
┌───────▼───────┐ ┌───────▼───────┐
│ Redis Cache │ │ Supabase │
│ (Optional) │ │ (Permanent) │
│ │ │ │
│ - Fast reads │ │ - Source of │
│ - TTL expiry │ │ truth │
│ - Auto cache │ │ - Full CRUD │
└───────────────┘ └───────────────┘
`Enable caching by setting
REDIS_URL environment variable. See Redis-Supabase Integration Guide for details.Performance: Redis caching provides 20-50x faster reads for frequently accessed vCons.
Observability
Built-in OpenTelemetry instrumentation provides production-ready monitoring:
$3
- Distributed Tracing: Full request lifecycle tracing with spans for every operation
- Business Metrics: Track vCon operations, search patterns, and usage
- Performance Metrics: Monitor query duration, cache hit rates, and latency
- Structured Logging: JSON logs with automatic trace context correlation
- Flexible Export: Console (development) or OTLP (production) exporters
$3
`bash
Development (console export)
OTEL_ENABLED=true
OTEL_EXPORTER_TYPE=consoleProduction (OTLP collector)
OTEL_ENABLED=true
OTEL_EXPORTER_TYPE=otlp
OTEL_ENDPOINT=http://localhost:4318
`$3
-
vcon.created.count - vCons created
- vcon.deleted.count - vCons deleted
- vcon.search.count - Searches performed (by type)
- tool.execution.duration - Tool execution time
- db.query.count - Database queries
- cache.hit / cache.miss - Cache performance$3
Testing Setup (Recommended):
`bash
Start Jaeger backend using docker-compose
./jaeger/start-jaeger.shConfigure .env
OTEL_ENABLED=true
OTEL_EXPORTER_TYPE=otlp
OTEL_ENDPOINT=http://localhost:4318View traces at http://localhost:16686
`Manual Docker Setup:
`bash
Jaeger (all-in-one)
docker run -d -p 4318:4318 -p 16686:16686 jaegertracing/all-in-one:latestView traces at http://localhost:16686
`See Observability Guide for complete documentation.
Project Structure
`
vcon-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── types/
│ │ └── vcon.ts # IETF vCon type definitions
│ ├── db/
│ │ ├── client.ts # Supabase client
│ │ └── queries.ts # Database operations
│ ├── tools/
│ │ └── vcon-crud.ts # MCP tool definitions
│ └── utils/
│ └── validation.ts # vCon validation
├── supabase/
│ └── migrations/ # Database migrations
├── tests/
│ └── vcon-compliance.test.ts
├── docs/
│ └── reference/ # Technical reference docs
│ ├── QUICK_REFERENCE.md
│ ├── IMPLEMENTATION_CORRECTIONS.md
│ ├── CORRECTED_SCHEMA.md
│ └── MIGRATION_GUIDE.md
├── background_docs/ # IETF specs & references
├── BUILD_GUIDE.md # Step-by-step implementation guide
├── GETTING_STARTED.md # Quick start for developers
├── OPEN_SOURCE_FEATURES.md # Open source feature set
├── PORPRIETARY_FEATURES.md # Enterprise features
├── SUPABASE_SEMANTIC_SEARCH_GUIDE.md
└── README.md # This file
`Documentation
$3
- Getting Started - Quick start guide for using the server
- Query Prompts Guide - How to use search and retrieval prompts
- Search Tools Guide - Search strategies and tools
- Tag Management Guide - Tagging and organization
- RLS Multi-Tenant Guide - Row Level Security setup for multi-tenant isolation
- Open Source Features - Complete feature reference
- Proprietary Features - Enterprise and advanced features
$3
- Build Guide - Step-by-step implementation from scratch
- Supabase Semantic Search - Vector search setup
- Plugin Development - Creating custom plugins
$3
- Database Documentation Index - Start here - Overview of all LLM documentation
- Database Architecture for LLMs - Complete database design and structure
- Database Quick Start for LLMs - Practical code examples and patterns
- Database Schema Visual Reference - Visual entity relationship diagrams
$3
- Tools API - MCP tools reference
- Prompts API - MCP prompts reference
- Resources API - MCP resources reference
- Types - TypeScript type definitions
$3
- Quick Reference - Critical spec corrections checklist
- Implementation Corrections - Detailed spec compliance guide
- Corrected Schema - Database schema reference
- Migration Guide - Migrating existing code
$3
- IETF vCon Core Spec - Official specification
- vCon Consent Draft - Privacy and consent
- vCon Lifecycle Draft - Lifecycle management
- vCon Quick Start - vCon basics
- vCon Adapter Guide - Building adapters
Development
$3
`bash
Start Supabase (if using local)
supabase startRun in development mode
npm run devRun tests
npm testRun spec compliance tests
npm run test:complianceLaunch MCP test console (interactive)
npm run test:consoleBuild for production
npm run buildLint code
npm run lint
`$3
The project includes comprehensive tests:
- Unit tests - Type validation, query functions
- Integration tests - End-to-end vCon operations
- Compliance tests - IETF spec conformance
`bash
Run all tests
npm testRun with coverage
npm test -- --coverageRun specific test file
npm test tests/vcon-compliance.test.ts
`$3
The project uses Supabase with a carefully designed schema:
- 8 tables for vCon data model
- 25 indexes for query performance
- Row Level Security for multi-tenancy (configurable tenant extraction from attachments)
- pgvector for semantic search
- Realtime subscriptions enabled
See BUILD_GUIDE.md for complete database setup instructions.
See RLS Multi-Tenant Guide for enabling multi-tenant isolation.
IETF vCon Specification Compliance
This implementation is fully compliant with
draft-ietf-vcon-vcon-core-00, including:$3
- ✅ vCon container with all required fields
- ✅ Party objects with complete metadata
- ✅ Dialog objects (recording, text, transfer, incomplete)
- ✅ Analysis objects with vendor and schema fields
- ✅ Attachment objects with proper references
- ✅ Group objects for multi-party conversations
$3
- ✅ Correct field names (e.g.,
schema not schema_version)
- ✅ Required vs optional fields properly enforced
- ✅ String-based body fields (not object types)
- ✅ No default encoding values
- ✅ Proper type constraints$3
- ✅ Redaction support
- ✅ Consent tracking
- ✅ Party privacy markers
- ✅ Secure attachment handling
API Examples
$3
`typescript
const vcon = await createVCon({
subject: "Customer Support Call",
parties: [
{
name: "Alice Agent",
mailto: "alice@support.example.com",
role: "agent"
},
{
name: "Bob Customer",
tel: "+1-555-0100",
role: "customer"
}
]
});
`$3
`typescript
await addAnalysis(vconUuid, {
type: "transcript",
vendor: "OpenAI",
product: "Whisper-1",
schema: "v1.0",
body: "Full transcript text...",
encoding: "none",
dialog: [0] // References first dialog
});
`$3
`typescript
const results = await searchVCons({
subject: "billing",
partyName: "Alice",
startDate: "2025-01-01",
endDate: "2025-01-31"
});
`Roadmap
$3
- [X] IETF vCon type definitions
- [X] Supabase database schema
- [X] Basic CRUD operations
- [X] MCP server implementation
- [X] Validation and testing
$3
- [X] Semantic search with pgvector
- [ ] Real-time subscriptions
- [ ] Batch operations
- [ ] Export/import formats
$3
- [X] Multi-tenant support (RLS with configurable tenant extraction)
- [ ] Advanced privacy controls
- [ ] Audit logging
- [ ] Performance optimization
$3
- [ ] Twilio adapter
- [ ] Zoom adapter
- [ ] Slack adapter
- [ ] Microsoft Teams adapter
Extending the Server
The vCon MCP Server is highly extensible, supporting multiple ways to add custom functionality:
$3
| Extension Type | Purpose | Use Case | Packaging |
| ------------------- | ------------------------- | ----------------------------------- | ---------------- |
| Resources | Discoverable data access | Browse recent vCons, statistics | Direct or plugin |
| Prompts | Guided query templates | Help users search effectively | Direct only |
| Tools | Executable operations | Analytics, exports, custom searches | Direct or plugin |
| Plugins | Package multiple features | Privacy suite, compliance module | Plugin |
| Hooks | Modify core behavior | Audit logging, access control | Plugin only |
$3
`typescript
// src/resources/index.ts
export function getCoreResources(): ResourceDescriptor[] {
return [
// ... existing resources ...
{
uri: 'vcon://v1/analytics/summary',
name: 'Analytics Summary',
description: 'Overall conversation analytics',
mimeType: 'application/json'
}
];
}
`$3
`typescript
// src/tools/analytics-tools.ts
export const analyticsTool = {
name: 'get_analytics',
description: 'Get conversation analytics',
inputSchema: {
type: 'object' as const,
properties: {
period: { type: 'string', enum: ['7d', '30d', '90d'] }
},
required: ['period']
}
};export async function handleGetAnalytics(input: any): Promise {
// Implementation
}
`$3
`typescript
import { VConPlugin, RequestContext } from '@vcon/mcp-server/hooks';export default class MyPlugin implements VConPlugin {
name = 'my-plugin';
version = '1.0.0';
// Register custom tools
registerTools(): Tool[] {
return [/ your tools /];
}
// Register custom resources
registerResources(): Resource[] {
return [/ your resources /];
}
// Lifecycle hook example
async afterCreate(vcon: VCon, context: RequestContext): Promise {
console.log(
Created vCon: ${vcon.uuid});
}
}
`$3
`bash
Set environment variable
VCON_PLUGINS_PATH=@mycompany/vcon-plugin,./local-plugin.js
VCON_LICENSE_KEY=your-license-key-if-requiredRun server with plugins
npm run dev
`$3
- Extension Guide - Comprehensive guide with examples
- Extension Quick Reference - Fast lookup and decision guide
- Plugin Development - Complete plugin documentation
- Custom Tools - Tool development guide
Contributing
We welcome contributions! Here's how to get started:
1. Fork the repository
2. Create a feature branch (
git checkout -b feature/amazing-feature)
3. Make your changes
4. Run tests (npm test)
5. Commit your changes (git commit -m 'Add amazing feature')
6. Push to the branch (git push origin feature/amazing-feature`)- Follow the existing code style
- Add tests for new features
- Update documentation
- Ensure IETF spec compliance
- Reference spec sections in comments
MIT License - see LICENSE file for details
- GitHub: vcon-mcp
- Issues: Bug reports & feature requests
- Discussions: Community discussions
- IETF vCon Working Group: datatracker.ietf.org/wg/vcon
- Model Context Protocol: modelcontextprotocol.io
- Supabase: supabase.com
- vCon GitHub: github.com/vcon-dev
- 📧 Email: ohjesus@doesanyoneemail.anymore
- 💬 Discord: Join our community
- 📖 Documentation: Full docs
- 🐛 Bug Reports: GitHub Issues
- IETF vCon Working Group for the specification
- Anthropic for the Model Context Protocol
- Supabase for the amazing PostgreSQL platform
- Contributors who helped build and improve this project
---
Built with ❤️ for the conversation intelligence community
Making conversations accessible, analyzable, and actionable with AI