Skip to content

Conversation

@S-Naved
Copy link

@S-Naved S-Naved commented Jul 23, 2025

Fixes TypeError during session initialization by correcting the syntax for anyio.create_memory_object_stream call. The invalid subscript syntax ([...]) was causing server startup failures.

Changes

  1. Removed [...] from anyio.create_memory_object_stream[...](0) call

Verification

  • All tests pass
  • Linting checks complete
  • Manual testing confirms server starts successfully
  • Type checking passes

S-Naved added 2 commits July 24, 2025 13:10
- Remove invalid subscript syntax from anyio.create_memory_object_stream call
@Kludex
Copy link
Member

Kludex commented Jul 24, 2025

What is the issue? What version of anyio and mcp?

@S-Naved
Copy link
Author

S-Naved commented Jul 24, 2025

When I build the local MCP it's showing me an error:
| C:\Users\MI\AppData\Local\uv\cache\ |
| archive-v0-9mRABDhgJyBu2txUuRpO\Li |
| b\site-packages\mcp\server\session. |
| py:96 in init |
| |
| 93 ) |
| 94 |
| 95 self._init_options = |
| > 96 self._incoming_messag |
| anyio.create_memory_object_st |
| 97 ServerRequestResp |
| 98 ](0) |
| 99 self._exit_stack.push |
| self._incoming_message_stream |
+-------------------------------------+
TypeError: 'function' object is not
subscriptable .
anyio 3.6.1 and mcp version is 1.12.1

@Kludex
Copy link
Member

Kludex commented Jul 24, 2025

The minimum anyio version is 4.5.0. Bump that package, please.

@Kludex Kludex closed this Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants