You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A framework-free MCP App client in @json-render/mcp, for Vue and Svelte apps
#486
@json-render/mcp/app only has useJsonRenderApp, a React hook, so an MCP App built with @json-render/vue or @json-render/svelte can't use any of it. In 0.23.1 the module imports react at the top, and the part that isn't React, parseSpecFromToolResult, isn't exported. A Vue app has to copy about 50 lines from use-json-render-app.ts: create the App, parse each tool result into a spec, and re-parse after callServerTool.
Some ideas, up to you:
a React-free createJsonRenderApp({ name, version, onSpec }) in @json-render/mcp (or ./client) that returns { app, connect, callServerTool, close }, with useJsonRenderApp built on it
export parseSpecFromToolResult, so other frameworks can write their own small hook
a useJsonRenderApp composable in @json-render/vue, the same shape as the React one
The first one would also make Svelte and Solid hooks a few lines each. I can open a PR for it if you want it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
@json-render/mcp/apponly hasuseJsonRenderApp, a React hook, so an MCP App built with@json-render/vueor@json-render/sveltecan't use any of it. In 0.23.1 the module importsreactat the top, and the part that isn't React,parseSpecFromToolResult, isn't exported. A Vue app has to copy about 50 lines fromuse-json-render-app.ts: create theApp, parse each tool result into a spec, and re-parse aftercallServerTool.Some ideas, up to you:
createJsonRenderApp({ name, version, onSpec })in@json-render/mcp(or./client) that returns{ app, connect, callServerTool, close }, withuseJsonRenderAppbuilt on itparseSpecFromToolResult, so other frameworks can write their own small hookuseJsonRenderAppcomposable in@json-render/vue, the same shape as the React oneThe first one would also make Svelte and Solid hooks a few lines each. I can open a PR for it if you want it.
@json-render/mcp0.23.1.All reactions