diff --git a/brand/build/projects.py b/brand/build/projects.py index 8890dcc..5567615 100644 --- a/brand/build/projects.py +++ b/brand/build/projects.py @@ -24,6 +24,7 @@ "modern-di-arq": lambda: sym.hopper(_CX, _CY, R), "modern-di-celery": lambda: sym.celery_stalk(_CX, _CY, R), "modern-di-fastapi": lambda: sym.bolt_disc(_CX, _CY, R), + "modern-di-fastmcp": lambda: sym.plug(_CX, _CY, R), "modern-di-faststream": lambda: sym.faststream(_CX, _CY, R), "modern-di-flask": lambda: sym.flask_horn(_CX, _CY, R), "modern-di-grpc": lambda: sym.rpc_arrow(_CX, _CY, R), diff --git a/brand/build/symbols.py b/brand/build/symbols.py index b2a6c06..9ec88b6 100644 --- a/brand/build/symbols.py +++ b/brand/build/symbols.py @@ -584,6 +584,32 @@ def rpc_arrow(cx: float, cy: float, r: float) -> str: return out +def plug(cx: float, cy: float, r: float) -> str: + """FastMCP cue: a plug, MCP being the port tools plug into, with a bolt knocked out.""" + bw, bh = 1.3 * r, 1.0 * r + top = cy - 0.6 * r + prong_w, prong_h = 0.21 * r, 0.45 * r + prongs = "".join( + f'' + for dx in (-0.3, 0.3) + ) + body = ( + f'' + ) + cord = ( + f'' + ) + bcy = top + bh / 2 + norm = [(0.12, -0.38), (-0.24, 0.07), (0.0, 0.07), (-0.12, 0.38), (0.24, -0.07), (0.0, -0.07)] + bolt = " ".join(f"{cx + dx * r:.1f},{bcy + dy * r:.1f}" for dx, dy in norm) + return prongs + body + cord + f'' + + def key(cx: float, cy: float, r: float) -> str: """jwks-client: a key, the signing key a JWKS publishes.""" sw = r * 0.2 diff --git a/brand/projects/modern-di-fastmcp/lockup-dark.svg b/brand/projects/modern-di-fastmcp/lockup-dark.svg new file mode 100644 index 0000000..3f6e791 --- /dev/null +++ b/brand/projects/modern-di-fastmcp/lockup-dark.svg @@ -0,0 +1 @@ + diff --git a/brand/projects/modern-di-fastmcp/lockup-light.svg b/brand/projects/modern-di-fastmcp/lockup-light.svg new file mode 100644 index 0000000..414276b --- /dev/null +++ b/brand/projects/modern-di-fastmcp/lockup-light.svg @@ -0,0 +1 @@ + diff --git a/brand/projects/modern-di-fastmcp/lockup.png b/brand/projects/modern-di-fastmcp/lockup.png new file mode 100644 index 0000000..21f34b0 Binary files /dev/null and b/brand/projects/modern-di-fastmcp/lockup.png differ diff --git a/brand/projects/modern-di-fastmcp/mark-1024.png b/brand/projects/modern-di-fastmcp/mark-1024.png new file mode 100644 index 0000000..b0245ae Binary files /dev/null and b/brand/projects/modern-di-fastmcp/mark-1024.png differ diff --git a/brand/projects/modern-di-fastmcp/mark-512.png b/brand/projects/modern-di-fastmcp/mark-512.png new file mode 100644 index 0000000..8c185ca Binary files /dev/null and b/brand/projects/modern-di-fastmcp/mark-512.png differ diff --git a/brand/projects/modern-di-fastmcp/mark.svg b/brand/projects/modern-di-fastmcp/mark.svg new file mode 100644 index 0000000..43e7803 --- /dev/null +++ b/brand/projects/modern-di-fastmcp/mark.svg @@ -0,0 +1 @@ + diff --git a/docs/index.md b/docs/index.md index d417ba6..50d60c3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -68,7 +68,8 @@ production Python services. Each project is independent, so use one piece or all [`modern-di`](https://github.com/modern-python/modern-di): typed, scoped dependency injection with one wiring shared across web frameworks (FastAPI, Litestar, Starlette, Flask, aiohttp), task queues (Celery, arq, taskiq), RPC - and messaging (gRPC, FastStream, aiogram), and CLIs (Typer). + and messaging (gRPC, FastStream, aiogram), MCP servers (FastMCP), and CLIs + (Typer). ([`that-depends`](https://github.com/modern-python/that-depends), the older DI framework, is still maintained.) - Call other services reliably with diff --git a/tests/test_projects.py b/tests/test_projects.py index 5c1b506..63326cb 100644 --- a/tests/test_projects.py +++ b/tests/test_projects.py @@ -47,6 +47,7 @@ def test_project_frame_parses_and_uses_tokens() -> None: "modern-di-taskiq", "modern-di-flask", "modern-di-grpc", + "modern-di-fastmcp", "jwks-client", "release-scope", }