You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@mcp-apps-kit/ui-react

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcp-apps-kit/ui-react

React bindings for MCP applications

Source
npmnpm
Version
0.2.3
Version published
Weekly downloads
16
300%
Maintainers
1
Weekly downloads
 
Created
Source

@mcp-apps-kit/ui-react

npm node license

React bindings for MCP app UIs/widgets.

This package builds on @mcp-apps-kit/ui and provides:

  • an AppsProvider
  • React hooks for host context + tool interactions

Use it inside your widget UI when you want React-first ergonomics.

Install

npm install @mcp-apps-kit/ui-react @mcp-apps-kit/ui

Peer dependencies:

  • react ^18 || ^19
  • react-dom ^18 || ^19

Quick start

import { AppsProvider, useAppsClient, useToolResult, useHostContext } from "@mcp-apps-kit/ui-react";

function Widget() {
  const client = useAppsClient();
  const result = useToolResult();
  const host = useHostContext();

  return (
    <div data-theme={host.theme}>
      <button onClick={() => client.callTool("greet", { name: "Alice" })}>Greet</button>
      <pre>{JSON.stringify(result, null, 2)}</pre>
    </div>
  );
}

export function App() {
  return (
    <AppsProvider>
      <Widget />
    </AppsProvider>
  );
}

Typed tools

For best TypeScript inference, parameterize the provider/client with your server-exported tool types.

import { AppsProvider, useAppsClient } from "@mcp-apps-kit/ui-react";
import type { AppClientTools } from "../server";

function Widget() {
  const client = useAppsClient<AppClientTools>();
  // client.callTool(...) is now typed
  return null;
}

export function App() {
  return (
    <AppsProvider>
      <Widget />
    </AppsProvider>
  );
}

Documentation & examples

License

MIT

Keywords

mcp

FAQs

Package last updated on 28 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts