Skip to content

fix(mcp): expand placeholders for HTTP connections#878

Open
TZZheng wants to merge 1 commit into
Lingtai-AI:mainfrom
TZZheng:fix/issue-761-http-mcp-placeholders-telegrambot
Open

fix(mcp): expand placeholders for HTTP connections#878
TZZheng wants to merge 1 commit into
Lingtai-AI:mainfrom
TZZheng:fix/issue-761-http-mcp-placeholders-telegrambot

Conversation

@TZZheng

@TZZheng TZZheng commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expand {agent_id} and {agent_dir} placeholders in HTTP MCP URLs
  • expand the same placeholders in HTTP header values while leaving header names unchanged
  • reuse the existing per-agent placeholder helper and add focused fake-client coverage

Validation

  • PYTHONPATH=src python -m pytest -q tests/test_mcp_capability.py29 passed
  • python -m compileall -q src/lingtai/agent.py tests/test_mcp_capability.py — passed
  • git diff --check canonical/main...HEAD — passed
  • independent read-only review — PASS, no blockers

Risk

Existing strings without placeholders remain unchanged. Header names are deliberately not expanded, preserving their contract and avoiding unexpected key rewriting.

Fixes #761

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.

connect_mcp_http skips _expand_agent_placeholders, so {agent_id}/{agent_dir} templates silently break for HTTP MCP servers

1 participant