mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
* fix: server safety guards for self-mount, duplicate middleware, mount arg order 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove duplicate middleware and mount arg order checks These are runtime type checking, not bugs — a type checker catches them. Keep only the self-mount guard which is a semantic check. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 lines
246 B
Python
10 lines
246 B
Python
import pytest
|
|
|
|
from fastmcp import FastMCP
|
|
|
|
|
|
class TestMountSafety:
|
|
def test_self_mount_raises(self):
|
|
mcp = FastMCP("test")
|
|
with pytest.raises(ValueError, match="Cannot mount a server onto itself"):
|
|
mcp.mount(mcp)
|