Complete API documentation for the vCon MCP Server.
The vCon MCP Server provides a comprehensive API for managing virtual conversations through the Model Context Protocol (MCP). All interfaces are fully compliant with IETF vCon Core specification.
🌐 REST API
HTTP REST API for vCon ingestion:
- POST /vcons - Create/ingest a single vCon
- POST /vcons/batch - Batch ingest up to 100 vCons
- GET /vcons/:uuid - Get a vCon by UUID
- GET /vcons - List recent vCons
- DELETE /vcons/:uuid - Delete a vCon
- GET /health - Health check endpoint
🛠️ Tools
20+ MCP tools for vCon operations:
- Core Operations - Create, read, update, delete vCons
- Component Management - Add dialog, analysis, attachments
- Search & Query - Keyword, semantic, and hybrid search
- Tag Management - Organize with key-value metadata
- Database Tools - Inspect and optimize database
- Schema & Examples - Get schemas and example vCons
URI-based access to vCon data:
vcon://v1/vcons/recent- Get recent vConsvcon://v1/vcons/recent/ids- Lightweight ID listsvcon://v1/vcons/ids- Paginated ID browsingvcon://v1/vcons/{uuid}- Get specific vConvcon://v1/vcons/{uuid}/metadata- Get metadata only
💬 Prompts
9 query template prompts:
- find_by_exact_tags - Exact tag matching
- find_by_semantic_search - AI-powered meaning search
- find_by_keywords - Keyword/phrase search
- find_recent_by_topic - Recent conversations by topic
- find_by_customer - Search by party/customer
- discover_available_tags - Explore available tags
- complex_search - Multi-criteria searches
- find_similar_conversations - Find similar vCons
- help_me_search - Query strategy guidance
📘 Types
TypeScript type definitions:
- VCon - Main conversation object
- Party - Conversation participants
- Dialog - Conversation segments
- Analysis - AI/ML analysis results
- Attachment - Additional files/data
- Input/Output Types - Tool parameters and responses
PostgreSQL/Supabase schema:
- Core Tables - vcons, parties, dialog, analysis, attachments
- Search Tables - vcon_embeddings, vcon_tags_mv
- Privacy Tables - privacy_requests (GDPR/CCPA)
- RPC Functions - search_vcons_keyword, search_vcons_semantic, search_vcons_hybrid
- Indexes - Performance optimization
const result = await callTool("create_vcon", {
vcon_data: {
vcon: "0.3.0",
subject: "Customer Support Call",
parties: [
{
name: "Agent Smith",
mailto: "smith@company.com"
},
{
name: "John Doe",
tel: "+1-555-1234"
}
]
}
});
console.log("Created vCon:", result.uuid);// Keyword search
const keywordResults = await callTool("search_vcons_content", {
query: "billing issue refund",
limit: 20
});
// Semantic search
const semanticResults = await callTool("search_vcons_semantic", {
query: "frustrated customers complaining about delays",
threshold: 0.75,
limit: 20
});
// Tag search
const tagResults = await callTool("search_by_tags", {
tags: {
department: "support",
priority: "high"
},
limit: 50
});// Get recent vCons
const recent = await readResource("vcon://v1/vcons/recent/10");
// Get specific vCon
const vcon = await readResource(
"vcon://v1/vcons/123e4567-e89b-12d3-a456-426614174000"
);
// List IDs for navigation
const ids = await readResource("vcon://v1/vcons/recent/ids/50");// Get query guidance
const prompt = await getPrompt("find_by_exact_tags", {
tag_criteria: "angry customers",
date_range: "June 2024"
});
// Follow the prompt's strategy to execute search┌──────────────────────────────────────────────────────────────┐
│ Clients │
├─────────────────────────────────┬────────────────────────────┤
│ AI Assistants (MCP) │ External Systems (REST) │
│ (Claude Desktop, Custom) │ (Integrations, Pipelines)│
└───────────────┬─────────────────┴──────────────┬─────────────┘
│ MCP (stdio/HTTP) │ HTTP/JSON
│ │
┌───────────────▼─────────────────────────────────▼────────────┐
│ vCon MCP Server │
│ ┌──────────────────────────┬───────────────────────────┐ │
│ │ MCP Handlers │ REST API │ │
│ │ - Tools (30+) │ - POST /vcons │ │
│ │ - Resources │ - POST /vcons/batch │ │
│ │ - Prompts │ - GET /vcons/:uuid │ │
│ │ │ - GET /vcons │ │
│ │ │ - DELETE /vcons/:uuid │ │
│ │ │ - GET /health │ │
│ └────────────┬─────────────┴────────────┬──────────────┘ │
│ │ │ │
│ ┌────────────▼──────────────────────────▼──────────────┐ │
│ │ VCon Service │ │
│ │ - Lifecycle hooks (beforeCreate, afterCreate, ...) │ │
│ │ - Validation │ │
│ │ - Metrics │ │
│ └────────────────────────┬─────────────────────────────┘ │
│ │ │
│ ┌────────────────────────▼─────────────────────────────┐ │
│ │ Plugin Manager │ │
│ │ - Privacy plugins │ │
│ │ - Access control │ │
│ │ - Custom extensions │ │
│ └────────────────────────┬─────────────────────────────┘ │
│ │ │
└───────────────────────────┼──────────────────────────────────┘
│ Supabase Client
│
┌──────────▼───────────┐
│ PostgreSQL │
│ (Supabase) │
│ │
│ - vCon Tables │
│ - pgvector │
│ - GIN/GiST Indexes │
└──────────────────────┘
- Client Request - Client calls MCP tool/resource
- Validation - Zod schema validation
- Database Query - PostgreSQL operations
- Processing - Business logic, search, embeddings
- Response - Formatted JSON response
| Mode | Best For | Performance | Accuracy |
|---|---|---|---|
| Metadata | Exact filters | Fast (~50ms) | Exact match |
| Keyword | Specific words | Medium (~100ms) | High precision |
| Semantic | Concepts/meaning | Slower (~200ms) | Contextual |
| Hybrid | Best of both | Slower (~300ms) | Balanced |
| Tag | Categories | Fast (~50ms) | Exact match |
| Operation | Tool | Resource | Prompt |
|---|---|---|---|
| Create | ✅ | ❌ | ❌ |
| Read | ✅ | ✅ | ❌ |
| Update | ✅ | ❌ | ❌ |
| Delete | ✅ | ❌ | ❌ |
| Search | ✅ | ❌ | ✅ |
| Browse | ❌ | ✅ | ❌ |
✅ Draft IETF vCon Core 00
- All required fields supported
- Optional extensions available
- Group references implemented
- Redaction/appending supported
✅ Model Context Protocol 1.0
- Tools interface
- Resources interface
- Prompts interface
- Standard error handling
✅ PostgreSQL 15+
- Full SQL compliance
- JSONB support
- Array operations
- GIN/GiST/HNSW indexes
✅ pgvector Extension
- Vector similarity search
- Cosine distance
- HNSW indexing
The server uses Supabase authentication:
// Environment variables required
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key-hereOptional RLS policies can be enabled:
-- Enable RLS on vcons table
ALTER TABLE vcons ENABLE ROW LEVEL SECURITY;
-- Example policy: Users can only see their own vCons
CREATE POLICY "Users can view own vCons"
ON vcons FOR SELECT
USING (auth.uid() = user_id);For production deployments:
- Use service role key for server
- Use anon key for clients
- Implement RLS policies
- Enable database audit logging
All API responses include error information:
interface ErrorResponse {
success: false;
error: string;
details?: any;
}VALIDATION_ERROR- Invalid input parametersNOT_FOUND- vCon or resource not foundDATABASE_ERROR- Database operation failedPERMISSION_DENIED- Insufficient permissions
Current: 1.0.0
The API follows semantic versioning:
- Major - Breaking changes
- Minor - New features (backward compatible)
- Patch - Bug fixes
Current: 0.3.0
Follows IETF vCon specification versions.