Cant use MCP server in Flows

Hi @maxmoura/ @Pratik_Kumar ,

Any idea how to use MCP servers in Flows, its working perfectly in Crews but not in flows, only when i deploy it to AMP it gives me this MCPServerHTTP is not serializable issue

It seems the problem isn’t with MCP itself, but with how Flows serializes objects before launching/deploying.

The error “MCPServerHTTP is not serializable” usually means you’re trying to pass in a “live” object (HTTP client/server/class) that works fine at runtime (like in Crews), but can’t be packaged as JSON when passed to Flows/AMP.

What I’d check:

Where exactly is MCPServerHTTP created?
If it’s created inside the Flow graph and passed on as a variable, Flows is most likely trying to serialize it.
Separating init vs. runtime
In some MCP systems, the server needs to be initialized outside of Flow (at application startup), and only the config or reference/ID is passed to Flow. AMP deployment adds strict serialization
The fact that “it crashes in AMP, but works in Crews” is almost always a sign that AMP is running everything through a strict serializer (JSON-safe graph).

Basically, the solution is usually the same:
don’t pass MCPServerHTTP as an object between nodes, but store it as a singleton/service and access it through an interface (or through a wrapper that is serialized).