home-assistant / home-assistant/core

Core 2026.9.1 MCP Server config flow fails: bundled AnyIO is missing anyio._core._streams

Open
#181,963 1 comment 0 reactions 1 assignee Claimed by @allenporter View on GitHub
integration: mcp_server
Dominant language
Python
Stars
90.5k
Forks
38.6k
Avg merge
1d 2h
Merged PRs (30d)
597

Description

### The problem

Adding the native Model Context Protocol Server integration fails immediately with Config flow could not be loaded: {"message":"Invalid handler specified"}.

The underlying failure is that the Core image contains AnyIO 4.13.0 metadata but is missing anyio/_core/_streams.py. The bundled MCP package imports that module, so its import fails and Home Assistant cannot load the mcp_server config flow.

This was reproduced after removing the local Core image and running ha core rebuild, so it is not caused by a modified running container or a cached image layer.

A temporary repair was successful: docker exec homeassistant pip install --force-reinstall --no-deps anyio==4.13.0, followed by a Core restart. Afterwards, import map succeeds.

### What version of Home Assistant Core has the issue?

core-2026.9.1

### What was the last working version of Home Assistant Core?

_No response_

### What type of installation are you running?

Home Assistant OS

### Integration causing the issue

Model Context Protocol Server

### Link to integration documentation on our website

https://www.home-assistant.io/integrations/mcp_server/

### Diagnostics information

_No response_

### Example YAML snippet

```yaml

```

### Anything in the logs that might be useful for us?

```txt
Error occurred loading flow for integration mcp_server: No module named 'anyio._core._streams'

Freshly rebuilt Core reproduction:
docker exec homeassistant python3 -c "import mcp"

Result: ModuleNotFoundError: No module named 'anyio._core._streams'

Expected AnyIO file check:
docker exec homeassistant sh -c 'test -f /usr/local/lib/python3.14/site-packages/anyio/_core/_streams.py && echo present || echo missing'
Result: missing
```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.