Skip to content

feat(mcp): add stdio host bridge for Lua MCP servers#27

Merged
svnscha merged 14 commits into
mainfrom
task/mcp-stdio-host-bridge
May 26, 2026
Merged

feat(mcp): add stdio host bridge for Lua MCP servers#27
svnscha merged 14 commits into
mainfrom
task/mcp-stdio-host-bridge

Conversation

@svnscha
Copy link
Copy Markdown
Owner

@svnscha svnscha commented May 26, 2026

Summary

  • add native MCP stdio host transport and request loop
  • implement host tool/prompt handlers and Lua callback wiring
  • extend Lua yaaf.mcp APIs for server hosting and authoring flow
  • add native and integration tests for hosted MCP server behavior
  • update MCP documentation for hosting workflow and module usage

Validation

  • added/updated native MCP host protocol tests
  • added integration tests for Lua-hosted MCP servers
  • updated docs and examples to reflect runtime behavior

Notes

  • branch includes phased task commits for implementation, tests, and docs

svnscha added 14 commits May 26, 2026 22:03
- Add ToolLister and PromptLister callback type aliases to Host
- Update Host constructor to accept tool_lister and prompt_lister callbacks
- Add private members to store lister callbacks
- Implement Host::list_tools() to call tool_lister and format results
- Implement Host::call_tool() with proper MCP result mapping
- Implement Host::list_prompts() to call prompt_lister and format results
- Implement Host::get_prompt() with error handling and message formatting
- All methods now complete and ready for Lua bridge integration
… 2.3)

- Create tool_lister lambda that calls Lua tool.names() and tool.specs()
- Extract tool name, description, and parameters from Lua specs
- Filter tools by name list if provided to host_stdio()
- Create prompt_lister lambda that gets prompts from hosted_prompts map
- Filter prompts by name list if provided to host_stdio()
- Wire both callbacks to Host constructor
- Add #include <set> for filtering support
- Tool listing excludes remote MCP tools (only local tools and echo)
@svnscha svnscha merged commit 2cbd839 into main May 26, 2026
7 checks passed
@svnscha svnscha deleted the task/mcp-stdio-host-bridge branch May 26, 2026 21:07
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.

1 participant