Migration guide
this guide walks you through migrating an agent from elasticsearch (es) queries to the bridge mcp server (trino/sql via mcp tools) prerequisites bridge agent sdk with mcpclient (already in bridge agent sdk mcp) kaif host configured for your runtime (sdk can auto resolve mcp endpoint) bridge mcp server url via bridge mcp server url only when you want to override endpoint resolution runtime agent payload containing account id and instance name step by step migration step 1 identify your domain and table check which domain and table in bridge corresponds to your es index see step 1 https //github com/kyndryl agentic ai/bdg sw agents development guide/blob/main/docs/05 mcp tools/06 es to bridge mcp migration md#step 1 identify your domain and table step 2 get column schema https //github com/kyndryl agentic ai/bdg sw agents development guide/blob/main/docs/05 mcp tools/06 es to bridge mcp migration md#step 2 get column schem step 3 convert es queries to trino dsql https //github com/kyndryl agentic ai/bdg sw agents development guide/blob/main/docs/05 mcp tools/06 es to bridge mcp migration md#step 3 convert es queries to trino sql step 4 use mcpclient in code https //github com/kyndryl agentic ai/bdg sw agents development guide/blob/main/docs/05 mcp tools/06 es to bridge mcp migration md#step 4 use mcpclient in cod step 5 parse response https //github com/kyndryl agentic ai/bdg sw agents development guide/blob/main/docs/05 mcp tools/06 es to bridge mcp migration md#step 5 parse response es → trino sql conversion cheatsheet \<font color="#f3f4f6"> es concept \</font> \<font color="#f3f4f6"> trino sql equivalent \</font> term where field = 'value' terms where field in ('a','b') range gte where field >= value @timestamp now 1d current timestamp interval '1' day @timestamp now 2h current timestamp interval '2' hour @timestamp now 30m current timestamp interval '30' minute match where field like '%text%' exists where field is not null bool must and bool should or bool must not not ( ) sort desc order by field desc size limit from offset keyword drop suffix (tenant id keyword → tenant id) for an autonomous documentation creation agent, see this link https //github com/kyndryl agentic ai/bdg sw agents development guide/blob/main/docs/05 mcp tools/06 es to bridge mcp migration md#complete example autonomous doc creation agent what changed (before vs after) \<font color="#f3f4f6"> aspect \</font> \<font color="#f3f4f6"> before (es) \</font> \<font color="#f3f4f6"> after (bridge mcp) \</font> auth es username/password from account settings agent payload auto token via mcpclient connection requests post(es url/index/ search) mcpclient call tool parsed("bridge execute query") query format es json dsl (bool, must, range, term) trino sql (select where order by) response parsing result\["hits"]\["hits"]\[ ]\[" source"] parsed\["data"] or parsed\["rows"] config needed elasticsearch url, elasticsearch user, elasticsearch password kaif host (+ optional bridge mcp server url override) time ranges now 1d in es dsl current timestamp interval '1' day before (elasticsearch) agent → es http api → elasticsearch index → json hits after (bridge mcp) agent → mcpclient → bridge mcp server → trino sql → json rows key differences no more es credentials — authentication is handled via agent payload and the sdk tokenservice sql instead of json dsl — write trino sql instead of es bool/match/range mcp tools instead of http — call bridge execute query through mcpclient