Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanStack/ai
/ api.mcp-chat.ts
File
api.mcp-chat.ts
examples/ts-react-chat/src/routes/api.mcp-chat.ts:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
/**
2
* /api/mcp-chat — Managed MCP lifecycle via chat({ mcp }).
3
*
4
* Demonstrates the chat({ mcp }) prop pattern with MULTIPLE clients:
Callers
nothing calls this directly
Calls
12
chatParamsFromRequestBody
Function · 0.90
createMCPClient
Function · 0.90
everythingTransport
Function · 0.90
memoryTransport
Function · 0.90
chat
Function · 0.90
resolveTextAdapter
Function · 0.90
maxIterations
Function · 0.90
toServerSentEventsResponse
Function · 0.90
json
Method · 0.80
resolve
Method · 0.80
close
Method · 0.65
error
Method · 0.65
Tested by
no test coverage detected