Skip to content

Commit be02bbf

Browse files
committed
MCP: Provide uvx example for mcp-alchemy example
1 parent 19e39af commit be02bbf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

framework/mcp/example_mcp_alchemy.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,21 @@
1313

1414
async def run():
1515
# Create server parameters for stdio connection.
16+
17+
# Incantation assuming software is installed.
1618
server_params = StdioServerParameters(
1719
command=where.first("mcp-alchemy"),
1820
args=[],
1921
env={"DB_URL": "crate://crate@localhost:4200/?schema=testdrive"},
2022
)
2123

24+
# Incantation using `uvx`.
25+
server_params_uvx = StdioServerParameters(
26+
command="uvx",
27+
args=["--with", "sqlalchemy-cratedb>=0.42.0.dev2", "mcp-alchemy"],
28+
env={"DB_URL": "crate://crate@localhost:4200/?schema=testdrive"},
29+
)
30+
2231
async with stdio_client(server_params) as (read, write):
2332
async with ClientSession(
2433
read, write

0 commit comments

Comments
 (0)