Skip to main content
@frontmcp/react provides a React binding layer for FrontMCP. It lets you connect to MCP servers, call tools, read resources, fetch prompts, and render UI — all with idiomatic React hooks and components.

Entry Points

The package exposes five entry points:

Architecture

The provider manages the MCP client lifecycle. All state (status, tools, resources, prompts) is stored in the shared ServerRegistry singleton and read via useSyncExternalStore for tear-free rendering.

Installation

Peer Dependencies

@frontmcp/sdk and @frontmcp/utils are bundled as dependencies and installed automatically.

Quick Example

No need to install @frontmcp/sdk separately — @frontmcp/react re-exports create, connect, decorators, and context classes.

What’s Next

Getting Started

Install, wrap your app, and make your first tool call

Hooks Reference

Complete API reference for all hooks

Components

Pre-built headless form and display components

Dynamic Tools

Register tools and resources from React components

Agent Components

Type-safe agent-driven UI with mcpComponent

State Management

Expose Redux, Valtio, or any store as MCP resources

API Client

Register OpenAPI operations as MCP tools with custom HTTP clients

AI Integration

Bridge MCP tools to OpenAI, Claude, and Vercel AI SDK