Skip to content

fast MCP server: debug & config namespaces, external-source playback, OpenClaw/Hermes presets (v0.7.1)#4019

Open
trudenboy wants to merge 10 commits into
music-assistant:devfrom
trudenboy:upstream/fastmcp_server
Open

fast MCP server: debug & config namespaces, external-source playback, OpenClaw/Hermes presets (v0.7.1)#4019
trudenboy wants to merge 10 commits into
music-assistant:devfrom
trudenboy:upstream/fastmcp_server

Conversation

@trudenboy
Copy link
Copy Markdown
Contributor

@trudenboy trudenboy commented May 29, 2026

What does this implement/fix?

FastMCP Server provider → v0.7.1

Updates the existing fastmcp_server plugin provider from v0.3.35 (current
dev) to v0.7.1, landing two off-by-default capability namespaces, an
onboarding convenience for the Connect Wizard, and richer now-playing state for
external "Connect"-style sources. A default installation sees no new tool
surface
— every new tool is gated behind a permission ConfigEntry that
ships disabled, so operators opt in per capability.

Source: trudenboy/ma-provider-mcp · tag v0.7.1

debug namespace — introspection & troubleshooting (was v0.4.0)

Twelve read-mostly tools for diagnosing a running Music Assistant instance over
MCP, behind five off-by-default flags (Debug: providers, Debug: inspect,
Debug: events, Debug: logs, Debug: reload):

  • Topology / healthdebug_list_providers, debug_health_summary,
    debug_list_package_versions, debug_list_webserver_routes.
  • Inspectiondebug_inspect_player, debug_inspect_queue,
    debug_inspect_provider, debug_inspect_provider_config.
  • Eventsdebug_recent_events, debug_event_buffer_stats, backed by a
    bounded in-memory ring buffer (capacity configurable, default off).
  • Logsdebug_tail_log, reading only files under MA's own
    storage_path (no arbitrary filesystem access).
  • Lifecycledebug_reload_provider (the one mutating tool in this
    namespace, gated by its own flag).

Supporting internals live under debug/: a ring event buffer, a depth- and
cycle-protected object inspector (back-reference skip-list to avoid serialising
the whole object graph), and a storage-scoped log reader.

Robustness refinements (v0.7.1): the log-scan tools (debug_tail_log and the
error count inside debug_health_summary) now run their synchronous file I/O
off the event loop; debug_health_summary honours the Debug: logs gate
before reading any log file; reload serialisation is per-runtime rather than
process-global; and the object inspector's byte-budget accounting no longer
round-trips every value through json.dumps.

config namespace — view & edit settings (v0.5.0)

Fourteen tools to read and write MA core, provider, and player configuration
over MCP, behind five off-by-default flags — four capability flags
(Config: read settings, Config: edit provider settings,
Config: edit core settings, Config: edit player settings) plus an
orthogonal Config: allow writing secret values gate:

  • Readconfig_list_targets, config_get_core, config_get_provider,
    config_get_player, config_get_entries, config_get_dsp. SECURE_STRING
    values are masked by MA's own serialiser before they leave the process.
  • Stage a single valueconfig_set_core_value,
    config_set_provider_value, config_set_player_value (validate + diff,
    no persistence).
  • Persistconfig_save_core, config_save_provider,
    config_save_player, config_save_dsp. Writes delegate to MA's atomic save
    primitives (validate → encrypt via to_raw → persist → reload, with
    rollback) — the provider never hand-rolls encryption or persistence.
  • Provider actionsconfig_trigger_provider_action.

Writes are validated against each ConfigEntry (type coercion, explicit range,
per-member options) before they reach MA, and an optional elicitation
confirmation gate (require_confirmation, default on) prompts before any
mutation. Secret-valued keys are rejected atomically unless the dedicated
secret flag is enabled — that flag is re-evaluated per request, so toggling it
takes effect without a provider reload.

External / Connect-source now-playing in briefs (v0.7.0 / v0.7.1)

When a player streams from an external "Connect"-style source (Spotify Connect,
AirPlay, Yandex Ynison), MA streams the audio out-of-band, so the player's own
playback_state stays idle while audio is actually playing. The player and
queue query tools now treat the active queue as the source of truth for
playback state — matching what MA's own interface shows:

  • players_list_players / players_get_player (and the player:// resource)
    report playing / paused from the active queue instead of a misleading
    idle.
  • A new external_source field carries the controlling provider's instance id,
    so a client can tell which provider is driving playback (and distinguish
    several instances of the same provider). It is null for normal,
    self-driven playback.
  • The currently playing item shows the real track title rather than the source
    wrapper name, in both player and queue views.

This is an enhancement to existing query tools — no new tools and no new
permission flags
; it is gated by the same player/queue query permissions
that already exist.

Connect Wizard — OpenClaw & Hermes presets (v0.6.0)

The Connect Wizard's client catalogue gains two entries — OpenClaw and
Hermes (Nous Research) — alongside the existing clients (Claude Code /
Desktop, Cursor, Windsurf, VS Code, ChatGPT, Codex, Gemini, Cline, Zed). For
each, the wizard mints a per-client long-lived token and renders a
ready-to-paste config snippet pointing at the server's streamable-HTTP endpoint
with an Authorization: Bearer header — an OpenClaw openclaw mcp set …
command and a Hermes ~/.hermes/config.yaml block respectively. This is a
pure onboarding convenience: no new tools, no new permission flags, no
runtime/transport changes
— the snippets target the same endpoint and auth
the wizard already wires for every other client.

Related issue (if applicable):

  • N/A

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • New music/player/metadata/plugin provider — new-provider
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • For changes to shared models, the companion PR in music-assistant/models is linked.
  • For changes affecting the UI, the companion PR in music-assistant/frontend is linked.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.

@trudenboy trudenboy changed the title feat(fastmcp_server): add fastmcp_server provider v0.5.0 feat(fastmcp_server): add debug and config MCP namespaces (v0.5.0) May 29, 2026
@trudenboy trudenboy changed the title feat(fastmcp_server): add debug and config MCP namespaces (v0.5.0) fast MCP server: add debug and config MCP namespaces (v0.5.0) May 29, 2026
trudenboy added a commit to trudenboy/ma-provider-mcp that referenced this pull request May 29, 2026
….5.1) (#101)

Upstream CI for the inlined provider (music-assistant/server#4019) went red on
two artefacts of the `provider.` -> `music_assistant.providers.fastmcp_server.`
sed rewrite, not on real defects (all 510 tests pass here):

- test_models.py used `import provider.models` + bare `getattr(provider.models,
  name)`. The rewrite cannot safely touch bare `provider.` attribute access (it
  collides with the legitimate `provider` fixture variable in
  test_update_config.py), so the usage stayed unrewritten -> NameError upstream.
  Switch to `from provider import models` + `getattr(models, name)`, which is
  covered by the `from provider import` rule and needs no bare-attr rewrite.

- conftest.py used per-line `# noqa: PLC0415` on lazy `from provider.X import Y`
  imports. The rewrite lengthens those lines; ruff format then reflows them and
  detaches the trailing noqa -> PLC0415 fired upstream. Move to a file-level
  PLC0415 suppression (with rationale) that survives the rewrite.

Bumps VERSION to 0.5.1 and adds a CHANGELOG entry.

Co-authored-by: Administrator <admin@example.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces (v0.5.0) fast MCP server: add debug and config MCP namespaces (v0.5.1) May 29, 2026
trudenboy added a commit to trudenboy/ma-provider-mcp that referenced this pull request May 29, 2026
PR #101 (0.5.1) only converted conftest.py and test_models.py to a
file-level PLC0415 suppression. The new ma-provider-tools rewrite-safe
guard surfaced two more files whose `from provider.X import Y  # noqa:
PLC0415` lines rewrite past the upstream 100-col limit (104-106 cols),
so ruff reflows them and the trailing noqa detaches:

- tests/test_config_secret.py (build_config_server import)
- tests/test_debug_security.py (middleware / tools.debug imports)

Both were confirmed failing in music-assistant/server#4019's lint job
below the lines #101 fixed. Move them to the same file-level suppression
so the inlined upstream PR lints clean.

Bumps VERSION to 0.5.2.

Co-authored-by: Administrator <admin@example.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces (v0.5.1) fast MCP server: add debug and config MCP namespaces (v0.5.2) May 29, 2026
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces (v0.5.2) fast MCP server: add debug and config MCP namespaces (v0.6.0) May 29, 2026
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces (v0.6.0) fast MCP server: add debug and config MCP namespaces (v0.6.1) May 29, 2026
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces (v0.6.1) fast MCP server: add debug and config MCP namespaces (v0.6.2) May 29, 2026
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces (v0.6.2) fast MCP server: add debug and config MCP namespaces and OpenClaw Hermes presets (v0.6.2) May 29, 2026
@trudenboy trudenboy marked this pull request as ready for review May 29, 2026 09:42
Copy link
Copy Markdown
Contributor

@MarvinSchenkel MarvinSchenkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two problem-level findings inline. Suggestions from my console review (event_buffer docstring, health_summary reading logs when DEBUG_LOGS off, module-vs-instance lock scope, json.dumps in _State.charge) are not posted here.

Comment thread music_assistant/providers/fastmcp_server/tools/debug.py Outdated
Comment thread music_assistant/providers/fastmcp_server/server.py
@trudenboy trudenboy marked this pull request as draft May 29, 2026 11:50
@trudenboy trudenboy changed the title fast MCP server: add debug and config MCP namespaces and OpenClaw Hermes presets (v0.6.2) fast MCP server: debug & config namespaces, external-source playback, OpenClaw/Hermes presets (v0.7.1) May 29, 2026
@trudenboy trudenboy marked this pull request as ready for review May 29, 2026 12:22
@trudenboy trudenboy requested a review from MarvinSchenkel May 29, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants