Labsco
agentience logo

Expert Registry MCP Server

from agentience

An MCP server for expert discovery, registration, and context injection, utilizing vector and graph databases.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

Expert Registry MCP Server

Last Updated: 2025-06-30

A high-performance MCP server for expert discovery, registration, and context injection built with FastMCP v2, featuring vector and graph database integration for enhanced semantic search and relationship modeling.

Features

  • πŸš€ High Performance: Multi-layer caching with vector indices for sub-millisecond queries
  • πŸ“ File-Based Updates: Hot reload on registry/context file changes
  • πŸ” Semantic Search: Vector database integration for meaning-based expert discovery
  • πŸ”— Relationship Modeling: Graph database for expert networks and team formation
  • πŸ’‰ Context Injection: AI-powered prompt enhancement with expert knowledge
  • πŸ“Š Analytics: Performance tracking with collaborative filtering
  • 🧠 Hybrid Discovery: Combined vector similarity and graph connectivity scoring
  • 🐍 Python-First: Built with FastMCP v2 for clean, Pythonic code

Available Tools

Registry Management

  • expert_registry_list - List experts with filtering
  • expert_registry_get - Get expert details
  • expert_registry_search - Search experts by query

Expert Selection

  • expert_detect_technologies - Detect project technologies
  • expert_select_optimal - Select best expert for task
  • expert_assess_capability - Assess expert capability
  • expert_smart_discover - AI-powered hybrid search (vector + graph)

Semantic Search

  • expert_semantic_search - Search using natural language
  • expert_find_similar - Find similar experts

Graph Operations

  • expert_explore_network - Explore expert relationships
  • expert_find_combinations - Find complementary expert teams

Context Operations

  • expert_load_context - Load expert knowledge
  • expert_inject_context - Enhance prompts with expertise

Analytics

  • expert_track_usage - Record expert performance
  • expert_get_analytics - Get performance metrics

Expert Registry Format

{
  "version": "1.0.0",
  "last_updated": "2025-06-30T00:00:00Z",
  "experts": [
    {
      "id": "aws-amplify-gen2",
      "name": "AWS Amplify Gen 2 Expert",
      "version": "1.0.0",
      "description": "Expert in AWS Amplify Gen 2 development",
      "domains": ["backend", "cloud", "serverless"],
      "specializations": [
        {
          "technology": "AWS Amplify Gen 2",
          "frameworks": ["AWS CDK", "TypeScript"],
          "expertise_level": "expert"
        }
      ],
      "workflow_compatibility": {
        "feature": 0.95,
        "bug-fix": 0.85,
        "refactoring": 0.80,
        "investigation": 0.70,
        "article": 0.60
      },
      "constraints": [
        "Use TypeScript-first approach",
        "Follow AWS Well-Architected Framework"
      ],
      "patterns": [
        "Infrastructure as Code",
        "Serverless-first architecture"
      ],
      "quality_standards": [
        "100% type safety",
        "Comprehensive error handling"
      ]
    }
  ]
}

Expert Context Format

Expert context files are markdown documents in expert-contexts/:

# AWS Amplify Gen 2 Expert Context

## Constraints

- Use TypeScript for all backend code
- Follow AWS Well-Architected Framework principles
- Implement proper error handling and logging

## Patterns

- Infrastructure as Code using CDK
- Serverless-first architecture
- Event-driven communication

## Quality Standards

- 100% TypeScript type coverage
- Comprehensive error handling
- Unit test coverage > 80%

Development

Setup Development Environment

# Clone repository
git clone https://github.com/agentience/expert-registry-mcp
cd expert-registry-mcp

# Create virtual environment with uv
uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows

# Install in development mode
uv pip install -e ".[dev]"

Run Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=expert_registry_mcp

# Run specific test file
pytest tests/test_registry.py

Code Quality

# Format code
black src tests

# Lint code
ruff check src tests

# Type checking
mypy src

Architecture

Multi-Layer Caching

  • Registry Cache: 24-hour TTL for expert definitions
  • Vector Cache: Embeddings cached until expert updates
  • Graph Cache: Relationship queries cached for 10 minutes
  • Selection Cache: 5-minute TTL for technology detection
  • Context Cache: LRU cache for expert contexts (50 entries)

Database Integration

  • ChromaDB: Embedded vector database for semantic search
    • Multiple collections for different embedding types
    • Automatic embedding generation with sentence-transformers
  • Neo4j: Graph database for relationship modeling
    • Expert-Technology-Task relationships
    • Team synergy calculations
    • Evolution tracking

Performance Features

  • Vector Indices: Annoy indices for ultra-fast similarity search
  • Precomputed Combinations: Common expert pairs cached
  • Batch Operations: Efficient bulk processing
  • Smart Invalidation: Targeted cache updates

File Watching

  • Uses watchdog for cross-platform file monitoring
  • Automatic registry reload and database sync
  • No server restart required for updates

Advanced Features

Semantic Search

The system uses ChromaDB to enable natural language queries:

# Find experts by meaning, not just keywords
results = await expert_semantic_search(
    query="implement secure authentication with cloud integration",
    search_mode="hybrid"
)

Relationship Exploration

Neo4j powers sophisticated relationship queries:

# Explore expert networks
network = await expert_explore_network(
    start_expert_id="aws-amplify-gen2",
    depth=2,
    relationship_types=["SPECIALIZES_IN", "COMPATIBLE_WITH"]
)

Team Formation

AI-powered team composition:

# Find complementary expert teams
teams = await expert_find_combinations(
    requirements=["AWS Amplify", "React", "DynamoDB"],
    team_size=3
)

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Run tests and linting
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

MIT License - see LICENSE file for details

Support