Skip to content

MCP: unify TASKLOG_API_URL config + graceful shutdown (SIGTERM) #54

Description

@manucompiles

Follow-up from code review on the MCP server feature (#50).

Two operational hygiene items.

  • Duplicate TASKLOG_API_URL source of truth (mcp/src/api-client.ts:13 vs mcp/src/config.ts:19). api-client.ts reads process.env.TASKLOG_API_URL directly with its own default; config.ts already exposes config.tasklogApiUrl with the same default. If the default in config.ts changes, the api-client keeps the old value silently. Import config and drop the local constant.
  • No SIGTERM handler in the MCP server (mcp/src/server.ts). runit sends TERM on stop; we don't close the SQLite handle cleanly. Add process.on('SIGTERM', () => { db.close(); process.exit(0); }) and similar for the HTTP server.

Source: review of feature/mcp-server-#50.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions