We now have a much better way of building the MCP ...
# proj-sdk
c
We now have a much better way of building the MCP Proxy via LiteLLM! 🙂 All we need is OpenHands provider LLM Key, and it can now also connect to our tavily and perform billing correctly ($0.008 per request!) cc @elegant-branch-54423 maybe this would be an initial thing we can do for "login with OpenHands cloud" in CLI, for user: 1. select login with OpenHands cloud 2. copy API Key into SDK 3. automatically configured LLM base url/API key and MCP, just need to select the model!
Copy code
mcp_config = {
    "mcpServers": {
        "LiteLLM": {
            "url": "https://llm-proxy.app.all-hands.dev/mcp",
            "headers": {
                "x-litellm-api-key": "Bearer sk-OPENHANDS_PROVIDER_LLM_KEY"
            }
        }
    }
}
We could create an github issue and/or add to existing issue about this if you think this is a good idea
e
Oh hmm, I guess I am not connecting the dots between this and the Login w/ OH Cloud flow in CLI? IIUC, you can now call LiteLLM MCP server via MCP config - what does that allow you to do?
c
that allows you to connect to tavily search engine that you typically can only access via SaaS
previous OH provider is only for LLM
since LiteLLM supports this feature, this basically allow us to do LLM + MCP in one API key
e
Oh I see - so once we implement "Login w/ OpenHands Cloud" in CLI, it should also set the LLM key within this MCP server config so you can also get Tavily. Prob worth adding to the ticket. Maybe as a sub-ticket to: https://github.com/All-Hands-AI/OpenHands-Cloud/issues/204
👍 1
c
I left a comment -- this will hopefully simplify the MVP implementation by a lot
excited 1