ollama - ✅(Solved) Fix ollama launch claude wrapper doesn't register MCP tools despite showing '✓ Connected' [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15677Fetched 2026-04-19 15:04:20
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #124: feat: add ollama cloud proxy + claude-with CLI for ephemeral switching

Description (problem / solution / changelog)

Summary

  • Add ollama cloud/local providers with Anthropic-compatible pass-through (no format translation needed)
  • Add claude-with CLI for ephemeral provider switching with multi-tier model routing
  • Support named profiles and project-local config for model tier configuration
  • Add integration tests and documentation

Context

Workaround for ollama/ollama#15677 — MCP tools don't register properly through ollama launch claude wrapper. This proxy exposes Anthropic-compatible endpoints for ollama cloud models while preserving Claude Code's multi-tier architecture.

Test plan

  • just test passes (881 tests)
  • claude-with ollama --large glm5 --medium kimi-k2.5 sets correct env vars
  • Proxy routes ollama_cloud/* models to ollama.com/v1
  • Proxy routes ollama_local/* models to localhost:11434

Changed files

  • .env.example (modified, +12/-4)
  • .gitignore (modified, +3/-0)
  • .python-version (modified, +1/-1)
  • README.md (modified, +38/-22)
  • SECURITY.md (added, +631/-0)
  • ZSHRC-ALIASES.md (added, +10/-0)
  • api/dependencies.py (modified, +20/-2)
  • api/models/anthropic.py (modified, +2/-0)
  • api/request_utils.py (modified, +1/-1)
  • api/routes.py (modified, +2/-1)
  • claude-pick (modified, +1/-1)
  • claude-switch.sh (added, +254/-0)
  • cli/entrypoints.py (modified, +4/-4)
  • config/logging_config.py (modified, +2/-0)
  • config/settings.py (modified, +11/-3)
  • justfile (added, +113/-0)
  • messaging/handler.py (modified, +2/-0)
  • messaging/limiter.py (modified, +2/-0)
  • messaging/platforms/base.py (modified, +2/-0)
  • messaging/platforms/discord.py (modified, +4/-2)
  • messaging/platforms/telegram.py (modified, +2/-0)
  • messaging/rendering/discord_markdown.py (modified, +2/-2)
  • messaging/rendering/telegram_markdown.py (modified, +2/-2)
  • messaging/session.py (modified, +2/-0)
  • messaging/trees/data.py (modified, +2/-0)
  • messaging/trees/queue_manager.py (modified, +2/-0)
  • messaging/trees/repository.py (modified, +2/-0)
  • models_comparison.md (added, +125/-0)
  • providers/common/sse_builder.py (modified, +2/-0)
  • providers/modal/__init__.py (added, +5/-0)
  • providers/modal/client.py (added, +26/-0)
  • providers/modal/request.py (added, +35/-0)
  • providers/rate_limit.py (modified, +2/-0)
  • pyproject.toml (modified, +4/-3)
  • tests/cli/test_entrypoints.py (modified, +6/-6)
  • tests/providers/test_modal.py (added, +102/-0)
  • uv.lock (modified, +1466/-537)
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code: 2.1.114
  • Ollama: 0.20.4
  • OS: macOS
  • Command: ollama launch claude

Describe the bug When launching Claude Code via ollama launch claude, MCP servers show as "✓ Connected" in claude mcp list but their tools are not registered and cannot be called.

Steps to reproduce

  1. Configure ~/.mcp.json with one or more MCP servers
  2. Launch Claude Code via ollama launch claude
  3. Run claude mcp list → servers show "✓ Connected"
  4. Attempt to call a tool (e.g. mcp__token-enhancer__fetch_clean) → "No such tool available"

Expected behavior Tools should be available when server reports connected.

Actual behavior Server connects, but tools are not registered in the session.

Confirmed working Launching claude directly (native CLI) with the same ~/.mcp.json — all MCP tools register and work correctly. Direct JSON-RPC calls to the MCP server also succeed.

Conclusion The ollama launch wrapper appears to skip or not propagate MCP tool registration during session init.

extent analysis

TL;DR

The issue can likely be worked around by launching Claude Code directly instead of using the ollama launch wrapper, ensuring MCP tool registration during session initialization.

Guidance

  • Verify that the ~/.mcp.json configuration is correct and tools are properly defined for the MCP servers.
  • Check if there are any differences in the environment or configuration when launching Claude Code via ollama launch compared to launching it directly.
  • Investigate the ollama launch wrapper to see if it modifies or overrides any settings that could affect MCP tool registration.
  • Test if manually registering the tools after launching Claude Code via ollama launch is possible, as a potential temporary workaround.

Example

No code snippet is provided as the issue does not imply a specific code fix but rather a configuration or workflow adjustment.

Notes

The solution may depend on the specific implementation details of the ollama launch wrapper and how it interacts with Claude Code and MCP servers. Further investigation into the wrapper's code or documentation may be necessary to find a permanent fix.

Recommendation

Apply workaround: Launch Claude Code directly instead of using the ollama launch wrapper, as it has been confirmed to work correctly and register MCP tools as expected. This approach ensures that the tools are available when the server reports a connected state.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - ✅(Solved) Fix ollama launch claude wrapper doesn't register MCP tools despite showing '✓ Connected' [1 pull requests, 1 participants]