state-bridge-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@state-bridge-mcpList all stores and their state."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
state-bridge-mcp
MCP server + client SDK for bridging Zustand stores over WebSocket. Lets any MCP-capable AI inspect and manipulate your app's live state.
How it works
┌─────────────┐ WebSocket ┌──────────────┐ stdio ┌──────────┐
│ Your App │──────────────▶│ MCP Server │◀─────────▶│ Claude │
│ (client) │◀──────────────│ (server) │ │ │
└─────────────┘ └──────────────┘ └──────────┘The server runs as an MCP server (launched by Claude, Cursor, etc.) and opens a WebSocket port. Your app connects as a client and exposes its Zustand stores. The AI can then list stores, read state, write state, and call actions.
Related MCP server: redux-mcp
Installation
npm install state-bridge-mcpServer Setup
Add to your .mcp.json (or equivalent MCP config):
{
"mcpServers": {
"app-state": {
"command": "npx",
"args": ["state-bridge-mcp"]
}
}
}Custom port
{
"mcpServers": {
"app-state": {
"command": "npx",
"args": ["state-bridge-mcp", "--port", "9000"]
}
}
}Or via environment variable: STATE_BRIDGE_PORT=9000
Default port: 8098
Client Usage
import { createStateBridge } from 'state-bridge-mcp/client';
import { useSessionStore, useAppStore } from './store';
const bridge = createStateBridge({
stores: {
session: useSessionStore,
app: useAppStore,
},
url: 'ws://localhost:8098',
});
// Later, to tear down:
bridge.stop();React Native (Android emulator)
For Android emulator, use 10.0.2.2 to reach the host machine:
const bridge = createStateBridge({
stores: { session: useSessionStore, app: useAppStore },
url: 'ws://10.0.2.2:8098',
});Client Config
Option | Type | Default | Description |
|
| required | Named map of Zustand stores |
|
|
| WebSocket URL of the MCP server |
|
|
| Auto-reconnect interval in ms. |
|
| — | Called when WebSocket opens |
|
| — | Called when WebSocket closes |
MCP Tools
Once connected, the AI has access to these tools:
Tool | Description |
| Check if a client app is connected |
| List all stores and their top-level state keys |
| Read state from a store (supports dot-paths like |
| Write a value at a dot-path (supports arbitrary depth) |
| Invoke a store action function by name |
Store Compatibility
Any object with getState() and setState() works. Zustand stores satisfy this out of the box:
type StoreEntry = {
getState: () => Record<string, unknown>;
setState: (partial: Record<string, unknown>) => void;
};License
MIT
Available Tools
5 toolscall_actionB
Invoke a store action function by name (e.g. "clearHistory", "setActiveTab")
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments to pass to the action | |
| store | Yes | Store name | |
| action | Yes | Action function name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description only mentions 'invoke', which implies execution but does not disclose side effects, return values, or potential destructive behavior. With no annotations, the agent has no clues about read-only or mutation nature, leaving significant behavioral uncertainty.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single-sentence description is concise and front-loaded with the key purpose. It is efficient but could expand slightly without becoming verbose, e.g., by noting return behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with three string parameters and no nested objects or output schema, the description covers the basic function. However, it omits important context like error handling, return value (e.g., result or void), and when to choose this over sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions cover all 3 parameters (store, action, args) with basic labels. The description adds example action names, providing slight extra context. However, the overall parameter semantics are minimal and rely heavily on the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool invokes a store action function by name, with specific examples like 'clearHistory' and 'setActiveTab'. This distinguishes it from sibling tools like get_state (read-only) and set_state (direct value mutation).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. For instance, it does not clarify when to use call_action over set_state for state changes, or if certain actions are reserved. Absence of usage context forces the agent to guess.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
connection_statusB
Check if a client app is connected via WebSocket
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It only says it is a check (read), but does not disclose what happens if not connected, side effects, or response format. More detail is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the purpose. Every word is necessary and there is no wasted space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, so the description should explain the return value or behavior. It does not, leaving the agent uncertain about what the tool returns upon invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so baseline 4 applies. The description adds nothing beyond the schema, but none is needed since there are no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it checks if a client app is connected via WebSocket, with a specific verb and resource. It distinguishes itself from sibling tools like call_action or set_state which perform different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. The description only states what it does, not when to prefer it over other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stateA
Read state from a Zustand store. Optionally provide a dot-path to read a specific slice.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Dot-path to a specific value (e.g. "activeSessionId") | |
| store | Yes | Store name (e.g. "app", "session") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full behavioral burden. It only states reading state, but does not disclose error handling (e.g., store not found), return format, or side effects. It is minimally transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (one sentence) and front-loaded with the core action. Every word is functional with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with two parameters and no output schema, the description is complete enough. It could mention the return value format (e.g., full state object if no path), but this is minor given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds context beyond the schema by explaining that 'path' allows reading a specific slice and that it is optional. Schema coverage is 100%, but the description reinforces and clarifies parameter usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it reads state from a Zustand store, with optional dot-path for specific slices. It distinguishes from siblings like 'set_state' (write) and 'list_stores' (list stores), making its purpose precise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for reading state, but provides no explicit guidance on when to use this tool versus alternatives (e.g., 'list_stores' for store names). No when-not-to-use or prerequisite information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_storesA
List all Zustand stores and their top-level state keys
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral transparency. It indicates the tool is read-only and returns data, but does not disclose potential traits like pagination, performance impact, or authorization requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant information. Every word is essential for communicating purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description adequately covers purpose and basic behavior. It lacks details on output format but is sufficient for basic invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description does not need to add parameter meaning. The baseline is 4 per guidelines.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all Zustand stores and their top-level state keys, using a specific verb ('List') and resource ('Zustand stores'), and it distinguishes from sibling tools like 'get_state' which likely focuses on individual stores.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing stores, but provides no explicit guidance on when to use this tool versus alternatives such as 'get_state' or 'call_action'. No when-not or context is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_stateA
Write a value to a Zustand store at the given path
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Dot-path to set (e.g. "settings.theme") | |
| store | Yes | Store name | |
| value | No | Value to set |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'Write' implying mutation, but does not disclose whether values are merged or overwritten, required permissions, error handling, or side effects. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single concise sentence of 13 words that directly states the tool's purpose. No redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple set operation with 3 parameters and no output schema, the description covers the basic purpose. However, it lacks context on behavior (merge vs overwrite), error scenarios, or requirements for store existence, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all three parameters. The description adds no further semantics beyond 'Write a value to a Zustand store at the given path', which does not clarify parameter constraints or formatting beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Write', the resource 'Zustand store', and the mechanism 'at the given path'. It distinguishes from sibling tools like get_state (read) and call_action (invoke) by explicitly indicating a write operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for setting state values, but lacks explicit guidance on when to use this tool versus alternatives, no prerequisites mentioned, and no when-not conditions. The context from sibling names helps, but the tool definition does not provide direct guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v1.0.0- First observed
call_action - First observed
connection_status - First observed
get_state - First observed
list_stores - First observed
set_state
TDQS
Each tool addresses a distinct concern: actions, connections, reading state, listing stores, and writing state. No overlap or ambiguity between tools.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., get_state, list_stores), making them predictable and easy to understand.
With 5 tools, the set is well-scoped for a state management bridge, covering all essential operations without unnecessary bloat.
The tools cover core state operations (list, get, set, actions) and a connection check. Missing subscription or store creation, but these are minor gaps for the intended purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Governed personal world model and memory for your AI agent. Pair once, connect over MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI agents to execute typed live-app actions over WebSocket, allowing agents to directly interact with real application state without browser automation or scraping.20-
- AlicenseAqualityDmaintenanceConnects AI tools to Redux state, enabling reading state, listing/dispatching actions, resetting history, and receiving live WebSocket updates.5103MIT
- AlicenseNot gradedqualityCmaintenanceEnables browsers to act as MCP servers by relaying tools, resources, and prompts to AI agents via a WebSocket-to-stdio bridge.12MIT

physbox-mcpofficial
FlicenseNot gradedqualityAmaintenanceEnables LLMs and MCP clients to interact programmatically with Flux, Volt, and Mesh simulation web applications via WebSocket relay.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonjoe/mcp-state-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server