React hook for Model Context Protocol (MCP)
Top 41.9% on sourcepulse
A lightweight React hook for connecting to Model Context Protocol (MCP) servers, simplifying authentication and tool calling for AI systems. It targets React developers building AI-powered applications that adhere to the MCP standard, offering automatic connection management and OAuth flow handling.
How It Works
The hook manages connections to MCP servers using HTTP and Server-Sent Events (SSE) transports. It implements an OAuth authentication flow, supporting both popup windows and fallback mechanisms. The core advantage lies in its simplified React hook interface, abstracting away the complexities of connection state management, tool discovery, and execution, while providing robust logging and TypeScript support for enhanced developer experience.
Quick Start & Requirements
npm install use-mcp
or pnpm add use-mcp
or yarn add use-mcp
Highlighted Details
Maintenance & Community
The project is part of the modelcontextprotocol
organization. Further community and maintenance details are not explicitly provided in the README.
Licensing & Compatibility
Limitations & Caveats
The README does not detail specific limitations, unsupported platforms, or known bugs. The OAuth callback setup is a mandatory step for authentication, which may require additional configuration depending on the application's routing setup.
1 week ago
Inactive