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 }}
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,8 @@
1
-
# WORK IN PROGRESS
1
+
<divclass="oranda-hide">
2
2
3
-
**Note:** this is currently powering https://playground.ai.cloudflare.com/ but hasn't yet been properly released as a standalone project. Technically you could use it now, but probably don't, yet.
3
+
# 🦑 use-mcp 🦑
4
4
5
-
---
6
-
7
-
# use-mcp
5
+
</div>
8
6
9
7
A lightweight React hook for connecting to [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol) servers. Simplifies authentication and tool calling for AI systems implementing the MCP standard.
10
8
@@ -29,7 +27,7 @@ yarn add use-mcp
29
27
30
28
## Quick Start
31
29
32
-
```tsx
30
+
```ts
33
31
import { useMcp } from'use-mcp/react'
34
32
35
33
function MyAIComponent() {
@@ -90,7 +88,7 @@ function MyAIComponent() {
90
88
91
89
To handle the OAuth authentication flow, you need to set up a callback endpoint in your app:
92
90
93
-
```tsx
91
+
```ts
94
92
// pages/oauth/callback.tsx or equivalent
95
93
import { useEffect } from'react'
96
94
import { onMcpAuthorization } from'use-mcp'
@@ -113,7 +111,7 @@ export default function OAuthCallbackPage() {
113
111
114
112
### `useMcp` Hook
115
113
116
-
```tsx
114
+
```ts
117
115
function useMcp(options:UseMcpOptions):UseMcpResult
0 commit comments