Skip to content

Conversation

@peteski22
Copy link
Contributor

@peteski22 peteski22 commented Aug 22, 2025

What's changed

This PR implements hot reload functionality for mcpd, allowing dynamic reconfiguration of MCP servers without daemon restart via SIGHUP signal.

TL;DR

  • SIGHUP Signal Handling: Send kill -HUP <PID> to trigger configuration reload
  • Smart Change Detection: Intelligently categorizes configuration changes to minimize disruption
  • Tools-Only Updates: Updates allowed tools without restarting server processes when only tools change
  • Documentation added to docs/configuration.md (/mcpd/configuration/#hot-reload)

Closes: #150


SIGHUP no changes:

image

SIGHUP removed tools from jira leaving only search_jira_issues:

image

SIGHUP removed jira server:

image

SIGHUP added duckduckgo-mcp:

image

@peteski22 peteski22 force-pushed the peteski22/150/reload-config branch from a6faa80 to 4353db9 Compare August 22, 2025 10:39
Copy link
Member

@aittalam aittalam left a comment

Choose a reason for hiding this comment

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

Thanks @peteski22 for this PR! I tested your branch with addition/remova/changes in the configs (both the .mcpd.toml file and the secrets file with parameters) and it works as expected.
The code LGTM (take it with a grain of salt given my expertise in go 😅), thanks for updating tests and documentation too!

* Added documentation
* Implement equality checks for Server (ServerEntry and ServerExecutionContext)
* Added 'UpdateTools' to MCPClientAccessor (ClientManager)
* Update 'reload' logic for MCP servers to handle tool only changes etc.
*
@peteski22 peteski22 force-pushed the peteski22/150/reload-config branch from 4353db9 to 5f5d2c2 Compare September 9, 2025 14:06
@peteski22 peteski22 merged commit 94139c2 into main Sep 9, 2025
2 checks passed
@peteski22 peteski22 deleted the peteski22/150/reload-config branch September 9, 2025 14:14
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.

Reload config changes on SIGHUP

3 participants