77## Start CrateDB MCP Server
88```
99export CRATEDB_CLUSTER_URL="http://localhost:4200/"
10- cratedb-mcp serve --transport=streamable- http
10+ cratedb-mcp serve --transport=http
1111```
1212
1313## Usage
2020import asyncio
2121import os
2222
23- from cratedb_about .instruction import Instructions
23+ from cratedb_about .instruction import GeneralInstructions
2424
2525from dotenv import load_dotenv
2626from llama_index .core .agent .workflow import FunctionAgent
@@ -36,7 +36,7 @@ def __init__(self, llm: LLM):
3636 self .llm = llm
3737
3838 async def get_tools (self ):
39- # Connect to the CrateDB MCP server using `streamable- http` transport.
39+ # Connect to the CrateDB MCP server using the ` http` transport.
4040 mcp_url = os .getenv ("CRATEDB_MCP_URL" , "http://127.0.0.1:8000/mcp/" )
4141 mcp_client = BasicMCPClient (mcp_url )
4242 mcp_tool_spec = McpToolSpec (
@@ -50,11 +50,11 @@ async def get_tools(self):
5050
5151 async def get_agent (self ):
5252 return FunctionAgent (
53- name = "Agent " ,
53+ name = "DemoAgent " ,
5454 description = "CrateDB text-to-SQL agent" ,
5555 llm = self .llm ,
5656 tools = await self .get_tools (),
57- system_prompt = Instructions . full (),
57+ system_prompt = GeneralInstructions (). render (),
5858 )
5959
6060 async def aquery (self , query ):
0 commit comments