Skip to content

refactor: rename bundled server_config.json to example#233

Open
axisrow wants to merge 2 commits intoIBM:mainfrom
axisrow:refactor/example-server-config
Open

refactor: rename bundled server_config.json to example#233
axisrow wants to merge 2 commits intoIBM:mainfrom
axisrow:refactor/example-server-config

Conversation

@axisrow
Copy link
Contributor

@axisrow axisrow commented Mar 2, 2026

Summary

  • Renamed bundled server_config.jsonserver_config.example.json so it is no longer auto-loaded as a fallback (eliminates token warnings for 18+ unconfigured servers)
  • Downgraded "config file not found" log messages from WARNING to DEBUG — missing config is now the normal state for new users
  • Added a setup step to README Quick Start: cp server_config.example.json server_config.json
  • Fixed default provider/model to match README: openai/gpt-4o-miniollama/gpt-oss across defaults.py, main.py, and run_command.py
  • Graceful client error handling: ChatContext.client now returns None instead of crashing when the API key is missing
  • Reduced log noise: "token not found" messages downgraded from WARNING → DEBUG in config_loader.py

Test plan

  • Run mcp-cli --help without server_config.json — no warnings should appear
  • Copy example to server_config.json, run mcp-cli --server sqlite — works as before
  • Run with --debug flag — "Config file not found" appears at DEBUG level only
  • Run without --provider/--model flags — defaults to ollama/gpt-oss
  • Run without an API key configured — UI starts without crash, shows warning

🤖 Generated with Claude Code

@axisrow axisrow force-pushed the refactor/example-server-config branch 3 times, most recently from 18108d0 to 6009d1c Compare March 2, 2026 09:16
…er tests

- Rename src/mcp_cli/server_config.json to server_config.example.json
- Remove bundled config fallback logic from ConfigLoader
- Migrate all hardcoded "server_config.json" to DEFAULT_CONFIG_FILENAME constant
- Raise missing-config log level from DEBUG to INFO for better user visibility
- Fix webbrowser.open patch targets in dashboard launcher tests
- Update ConfigLoader FileNotFoundError tests with strict assertions and caplog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@axisrow axisrow force-pushed the refactor/example-server-config branch from 6009d1c to a7d6b25 Compare March 2, 2026 09:43
…aults

- Rename server_config.json to server_config.example.json to clarify it's a template
- Fix launcher tests to use the new example config path
- Align default provider/model with README (ollama/gpt-oss)
- Update OpenAI models to current lineup (GPT-5.2, GPT-4.1, o4-mini, o3-pro)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@axisrow axisrow force-pushed the refactor/example-server-config branch from 88841c7 to ee6cdfd Compare March 2, 2026 11:53
@axisrow axisrow closed this Mar 2, 2026
@axisrow axisrow deleted the refactor/example-server-config branch March 2, 2026 11:53
@axisrow axisrow restored the refactor/example-server-config branch March 2, 2026 11:56
@axisrow axisrow reopened this Mar 2, 2026
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