Skip to content

feat(mcp): add prompt template discovery and rendering - #74

Merged
he-yufeng merged 1 commit into
mainfrom
feat/mcp-prompt-templates
Nov 22, 2026
Merged

he-yufeng merged 1 commit into
mainfrom
feat/mcp-prompt-templates

Conversation

@he-yufeng

Copy link
Copy Markdown
Owner

Closes #73.

Adds one mcp__<server>__prompts bridge for MCP prompt discovery and rendering. It uses the existing stdio/HTTP transports, consent layer, hooks and reconnect path, with no new dependency or background scheduler.

list preserves opaque pagination cursors. get sends a prompt name and arguments object to the configured server and returns its text messages as external data. Prompt-only servers no longer need a tools/list implementation. Invalid capabilities, malformed results, non-text messages and oversized results fail explicitly. Remote tool names are not replaced; the bridge appends underscores on collision.

The documentation and measured line counts are updated to match the implementation.

Validation:

  • The 40 new prompt cases failed before the implementation and pass afterward, across stdio and Streamable HTTP.
  • Full suite: 413 passed, 1 skipped. The skip is the opt-in live-provider smoke test; no provider was contacted.
  • Ruff check and format checks pass on all changed Python files.
  • Built corecoder-0.14.0 wheel and sdist with the declared hatchling==1.27.0 backend.
  • Installed the wheel in a fresh environment and verified prompts/list and a parameterized prompts/get through the installed module. The wheel's mcp.py is byte-identical to the candidate source.

This PR does not publish a new wheel to PyPI. Release versioning and publication are a separate follow-up after merge.

@he-yufeng
he-yufeng merged commit e851377 into main Nov 22, 2026
14 checks passed
@he-yufeng he-yufeng mentioned this pull request Nov 22, 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.

MCP: discover and render server prompt templates

1 participant