@@ -116,3 +116,40 @@ def test_dbhub():
116116 assert b"Getting prompt: explain_db" in p .stdout
117117 assert b"Table: mcp_dbhub in schema 'testdrive'" in p .stdout
118118 assert b"Structure:\\ n- id (integer)\\ n- data (text)" in p .stdout
119+
120+
121+ def test_mcp_alchemy ():
122+ """
123+ Validate the MCP Alchemy server works well.
124+
125+ MCP Alchemy connects Claude Desktop directly to your databases.
126+ MCP Alchemy is a MCP (model context protocol) server that gives the LLM access
127+ to and knowledge about relational databases like SQLite, Postgresql, MySQL &
128+ MariaDB, Oracle, MS-SQL, and CrateDB.
129+
130+ It is written in Python and uses SQLAlchemy.
131+ https://github.com/runekaagaard/mcp-alchemy
132+ """
133+ p = run (f"{ sys .executable } example_mcp_alchemy.py" )
134+ assert p .returncode == 0
135+
136+ # Validate output specific to the MCP server.
137+ assert b"Processing request of type" in p .stderr
138+ assert b"ListPromptsRequest" in p .stderr
139+ assert b"ListResourcesRequest" in p .stderr
140+ assert b"ListToolsRequest" in p .stderr
141+ assert b"CallToolRequest" in p .stderr
142+
143+ # Validate output specific to CrateDB.
144+ assert b"Calling tool: execute_query" in p .stdout
145+ assert b"mountain: Mont Blanc" in p .stdout
146+
147+ assert b"Calling tool: all_table_names" in p .stdout
148+ assert b"mcp_alchemy" in p .stdout
149+
150+ assert b"Calling tool: filter_table_names" in p .stdout
151+ assert b"mcp_alchemy" in p .stdout
152+
153+ assert b"Calling tool: schema_definitions" in p .stdout
154+ assert b"id: INTEGER, nullable" in p .stdout
155+ assert b"data: VARCHAR, nullable" in p .stdout
0 commit comments