Skip to content

MCPHost Anywhere: Remote Ollama & Standardized Provider Interface #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Sellto
Copy link

@Sellto Sellto commented May 20, 2025

Features Added for Pull Request

Here's a summary of the features I've added to mcphost:

  1. Remote Ollama Instance Support

    • Added support for connecting to remote Ollama servers via customizable URL
    • Fixed critical bug in remote Ollama connectivity (nil pointer dereference)
    • Added proper HTTP client initialization for remote connections
  2. Unified Command Line Interface

    • Simplified the CLI by introducing generic arguments:
      • --llm-url: Universal URL parameter for all providers
      • --api-key: Universal API key parameter for all LLM providers
    • Removed redundant provider-specific flags for better consistency:
      • Removed --anthropic-url, --openai-url, and --ollama-url
      • Removed --anthropic-api-key and --openai-api-key
  3. Improved Error Handling

    • Better error messages for missing API keys
    • Better validation of provided URLs
    • Added logging of custom URL usage
  4. Add server Mode

    • Implemented http server mode.
    • Added read timeout (30 seconds), write timeout (90 seconds), and idle timeout (120 seconds)
    • Improved server shutdown with a 10-second grace period for active connections
    • Enhanced error handling for server endpoints
  5. Documentation Updates

    • Updated README with new argument structure
    • Added examples for using remote Ollama instances
    • Added examples for using the generic arguments
    • Updated server mode examples with the new flags
    • Translated all documentation to English for consistency
  6. Code Refinements

    • Added timeout settings for HTTP clients (180 seconds)
    • Cleaned up parameter handling in provider creation
    • Improved default value management for URLs
    • Enhanced error handling across the codebase

These changes make mcphost more user-friendly, especially when working with different LLM providers, and significantly improve its ability to work with remote Ollama servers in distributed setups. The server mode is robust with proper timeout handling, making it suitable for production environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant