Skip to content

Latest commit

 

History

History
96 lines (78 loc) · 2.69 KB

TODO.md

File metadata and controls

96 lines (78 loc) · 2.69 KB

MCP Server for Replicate - Simplified Implementation Plan

Core Philosophy

  • Minimize complexity by focusing on tools over resources
  • Follow MCP spec for core functionality
  • Keep transport layer simple (stdio for local, SSE for remote)
  • Implement only essential features

Current Status

✓ Basic functionality implemented:

  • Tool-based access to models and predictions
  • Type-safe interactions with protocol compliance
  • Simple error handling
  • Basic rate limiting
  • SSE transport layer for remote connections

Implementation Plan

Phase 1: Core Simplification (✓ Complete)

  1. Replace Resource System with Tools

    • Convert model listing to search_models tool
    • Convert prediction access to get_prediction tool
    • Remove resource-based URI schemes
    • Simplify server initialization
  2. Streamline Client Implementation

    • Simplify ReplicateClient class
    • Remove complex caching layers
    • Implement basic error handling
    • Add simple rate limiting
  3. Transport Layer

    • Keep stdio for local communication
    • Implement basic SSE for remote (no complex retry logic)
    • Remove unnecessary transport abstractions

Phase 2: Essential Tools (✓ Complete)

  1. Model Management

    • search_models - Find models by query
    • get_model - Get model details
    • list_versions - List model versions
  2. Prediction Handling

    • create_prediction - Run model inference
    • get_prediction - Check prediction status
    • cancel_prediction - Stop running prediction
  3. Image Tools

    • view_image - Display result in browser
    • save_image - Save to local filesystem

Phase 3: Testing & Documentation (🚧 In Progress)

  1. Testing

    • Add basic protocol compliance tests
    • Test core tool functionality
    • Add integration tests
  2. Documentation

    • Update API reference for simplified interface
    • Add clear usage examples
    • Create troubleshooting guide

Phase 4: Optional Enhancements (🚧 In Progress)

  1. Webhook Support

    • Simple webhook configuration
    • Basic retry logic
    • Event formatting
  2. Template System

    • Basic parameter templates
    • Simple validation
    • Example presets

Next Steps

  1. Documentation:

    • Add clear usage examples
    • Create troubleshooting guide
    • Document common error cases
  2. Template System:

    • Design parameter template format
    • Implement validation logic
    • Create example presets
  3. Testing:

    • Add more edge case tests
    • Improve error handling coverage
    • Add performance benchmarks

Legend:

  • Completed
  • Not started
  • ✓ Phase complete
  • 🚧 Phase in progress
  • ❌ Phase not started