We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c4f9da commit 4423bcdCopy full SHA for 4423bcd
1 file changed
examples/webmcp/src/client.tsx
@@ -136,15 +136,22 @@ function App() {
136
});
137
138
handleRef.current = h;
139
- setMcpStatus("connected");
140
141
- if (h.tools.length > 0) {
+ if (!hasWebMcp) {
+ setMcpStatus("disconnected");
142
+ addLog(
143
+ "MCP adapter running in no-op mode (navigator.modelContext unavailable).",
144
+ "warn"
145
+ );
146
+ } else if (h.tools.length > 0) {
147
+ setMcpStatus("connected");
148
addLog(
149
`WebMCP active — ${h.tools.length} tool(s) registered with navigator.modelContext`
150
);
151
} else {
152
153
- "MCP connection established. Tools discovered but not registered (navigator.modelContext unavailable).",
154
+ "MCP connection established but no tools were returned by the server.",
155
"warn"
156
157
}
0 commit comments