[{"data":1,"prerenderedAt":2057},["ShallowReactive",2],{"series-\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui":3,"series-context-\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web":1919},{"id":4,"title":5,"body":6,"contentId":1901,"date":1902,"description":1903,"extension":1904,"github":1905,"meetTheInstructor":1907,"meta":1908,"navigation":89,"part":93,"path":1909,"rawbody":1910,"robots":1907,"schemaOrg":1907,"seo":1911,"seriesSlug":1912,"sitemap":1913,"stem":1917,"subtitle":1907,"topics":1907,"__hash__":1918},"series\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui.md","A Powerful AI Application Made with Nitro and Nuxt UI",{"type":7,"value":8,"toc":1894},"minimark",[9,13,36,41,44,47,578,582,585,770,773,787,805,809,812,821,824,838,845,867,874,1769,1772,1783,1789,1797,1804,1808,1811,1821,1827,1838,1844,1848,1851,1854,1861,1869,1872,1887,1890],[10,11,12],"p",{},"Our agent and MCP server are ready. In this article, we will turn them into an AI application where users can send messages, receive streamed answers, and see when the agent uses a tool.",[10,14,15,16,23,24,29,30,35],{},"To build it, we will use ",[17,18,22],"a",{"href":19,"rel":20},"https:\u002F\u002Fnuxt.com\u002F",[21],"nofollow","Nuxt"," along with ",[17,25,28],{"href":26,"rel":27},"https:\u002F\u002Fui.nuxt.com\u002F",[21],"Nuxt UI",", which includes components designed for ",[17,31,34],{"href":32,"rel":33},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents#chat",[21],"building AI applications",".",[37,38,40],"h2",{"id":39},"from-nitro-to-nuxt","From Nitro to Nuxt",[10,42,43],{},"Nuxt uses Nitro as its server engine, so we can keep the server routes built in the previous articles and add a frontend around them.",[10,45,46],{},"This is a mechanical migration rather than the focus of the article, so this script performs it for us:",[48,49,55],"pre",{"className":50,"code":51,"filename":52,"language":53,"meta":54,"style":54},"language-bash shiki shiki-themes github-light github-light github-dark","# Remove Nitro dependencies\npnpm remove nitropack h3\n\n# Install Nuxt dependencies\npnpm add nuxt vue vue-router\n\n# Update package.json scripts\njq '.scripts = {\n  \"build\": \"nuxt build\",\n  \"dev\": \"nuxt dev\",\n  \"generate\": \"nuxt generate\",\n  \"preview\": \"nuxt preview\",\n  \"postinstall\": \"nuxt prepare\"\n}' package.json > tmp.json && mv tmp.json package.json\n\n# Update tsconfig.json for Nuxt\ncat > tsconfig.json \u003C\u003C'EOF'\n{\n  \"files\": [],\n  \"references\": [\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.app.json\" },\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.server.json\" },\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.shared.json\" },\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.node.json\" }\n  ]\n}\nEOF\n\n# Create Nuxt config\ncat > nuxt.config.ts \u003C\u003C'EOF'\nimport { defineNuxtConfig } from \"nuxt\u002Fconfig\"\n\nexport default defineNuxtConfig({\n  runtimeConfig: {\n    openAiApiKey: '',\n    mcpEndpoint: '',\n  },\n  compatibilityDate: '2025-10-05',\n})\nEOF\n\n# Remove old Nitro config\nrm nitro.config.ts\n\n# Set up basic Nuxt app structure\nmkdir -p app\u002Fpages\ncat > app\u002Fapp.vue \u003C\u003C'EOF'\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003CNuxtRouteAnnouncer \u002F>\n    \u003CNuxtPage \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\nEOF\n\ncat > app\u002Fpages\u002Findex.vue \u003C\u003C'EOF'\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Welcome to the AI Application\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\nEOF\n\n# Update .env and .gitignore\nsed -i '' 's\u002FNITRO\u002FNUXT\u002Fg' .env\necho \".nuxt\" >> .gitignore\n\n# Prepare Nuxt\npnpm run postinstall\n","terminal","bash","",[56,57,58,67,84,91,97,114,119,125,134,140,146,152,158,164,192,197,203,220,226,232,238,244,250,256,262,268,274,280,285,291,305,311,316,322,328,334,340,346,352,358,363,368,374,383,388,394,407,421,427,433,439,445,451,457,462,467,481,486,491,497,502,507,512,517,523,541,556,561,567],"code",{"__ignoreMap":54},[59,60,63],"span",{"class":61,"line":62},"line",1,[59,64,66],{"class":65},"sCsY4","# Remove Nitro dependencies\n",[59,68,70,74,78,81],{"class":61,"line":69},2,[59,71,73],{"class":72},"snPdu","pnpm",[59,75,77],{"class":76},"sIIMD"," remove",[59,79,80],{"class":76}," nitropack",[59,82,83],{"class":76}," h3\n",[59,85,87],{"class":61,"line":86},3,[59,88,90],{"emptyLinePlaceholder":89},true,"\n",[59,92,94],{"class":61,"line":93},4,[59,95,96],{"class":65},"# Install Nuxt dependencies\n",[59,98,100,102,105,108,111],{"class":61,"line":99},5,[59,101,73],{"class":72},[59,103,104],{"class":76}," add",[59,106,107],{"class":76}," nuxt",[59,109,110],{"class":76}," vue",[59,112,113],{"class":76}," vue-router\n",[59,115,117],{"class":61,"line":116},6,[59,118,90],{"emptyLinePlaceholder":89},[59,120,122],{"class":61,"line":121},7,[59,123,124],{"class":65},"# Update package.json scripts\n",[59,126,128,131],{"class":61,"line":127},8,[59,129,130],{"class":72},"jq",[59,132,133],{"class":76}," '.scripts = {\n",[59,135,137],{"class":61,"line":136},9,[59,138,139],{"class":76},"  \"build\": \"nuxt build\",\n",[59,141,143],{"class":61,"line":142},10,[59,144,145],{"class":76},"  \"dev\": \"nuxt dev\",\n",[59,147,149],{"class":61,"line":148},11,[59,150,151],{"class":76},"  \"generate\": \"nuxt generate\",\n",[59,153,155],{"class":61,"line":154},12,[59,156,157],{"class":76},"  \"preview\": \"nuxt preview\",\n",[59,159,161],{"class":61,"line":160},13,[59,162,163],{"class":76},"  \"postinstall\": \"nuxt prepare\"\n",[59,165,167,170,173,177,180,184,187,189],{"class":61,"line":166},14,[59,168,169],{"class":76},"}'",[59,171,172],{"class":76}," package.json",[59,174,176],{"class":175},"s8jYJ"," >",[59,178,179],{"class":76}," tmp.json",[59,181,183],{"class":182},"sxrX7"," && ",[59,185,186],{"class":72},"mv",[59,188,179],{"class":76},[59,190,191],{"class":76}," package.json\n",[59,193,195],{"class":61,"line":194},15,[59,196,90],{"emptyLinePlaceholder":89},[59,198,200],{"class":61,"line":199},16,[59,201,202],{"class":65},"# Update tsconfig.json for Nuxt\n",[59,204,206,209,211,214,217],{"class":61,"line":205},17,[59,207,208],{"class":72},"cat",[59,210,176],{"class":175},[59,212,213],{"class":76}," tsconfig.json",[59,215,216],{"class":175}," \u003C\u003C",[59,218,219],{"class":76},"'EOF'\n",[59,221,223],{"class":61,"line":222},18,[59,224,225],{"class":76},"{\n",[59,227,229],{"class":61,"line":228},19,[59,230,231],{"class":76},"  \"files\": [],\n",[59,233,235],{"class":61,"line":234},20,[59,236,237],{"class":76},"  \"references\": [\n",[59,239,241],{"class":61,"line":240},21,[59,242,243],{"class":76},"    { \"path\": \".\u002F.nuxt\u002Ftsconfig.app.json\" },\n",[59,245,247],{"class":61,"line":246},22,[59,248,249],{"class":76},"    { \"path\": \".\u002F.nuxt\u002Ftsconfig.server.json\" },\n",[59,251,253],{"class":61,"line":252},23,[59,254,255],{"class":76},"    { \"path\": \".\u002F.nuxt\u002Ftsconfig.shared.json\" },\n",[59,257,259],{"class":61,"line":258},24,[59,260,261],{"class":76},"    { \"path\": \".\u002F.nuxt\u002Ftsconfig.node.json\" }\n",[59,263,265],{"class":61,"line":264},25,[59,266,267],{"class":76},"  ]\n",[59,269,271],{"class":61,"line":270},26,[59,272,273],{"class":76},"}\n",[59,275,277],{"class":61,"line":276},27,[59,278,279],{"class":76},"EOF\n",[59,281,283],{"class":61,"line":282},28,[59,284,90],{"emptyLinePlaceholder":89},[59,286,288],{"class":61,"line":287},29,[59,289,290],{"class":65},"# Create Nuxt config\n",[59,292,294,296,298,301,303],{"class":61,"line":293},30,[59,295,208],{"class":72},[59,297,176],{"class":175},[59,299,300],{"class":76}," nuxt.config.ts",[59,302,216],{"class":175},[59,304,219],{"class":76},[59,306,308],{"class":61,"line":307},31,[59,309,310],{"class":76},"import { defineNuxtConfig } from \"nuxt\u002Fconfig\"\n",[59,312,314],{"class":61,"line":313},32,[59,315,90],{"emptyLinePlaceholder":89},[59,317,319],{"class":61,"line":318},33,[59,320,321],{"class":76},"export default defineNuxtConfig({\n",[59,323,325],{"class":61,"line":324},34,[59,326,327],{"class":76},"  runtimeConfig: {\n",[59,329,331],{"class":61,"line":330},35,[59,332,333],{"class":76},"    openAiApiKey: '',\n",[59,335,337],{"class":61,"line":336},36,[59,338,339],{"class":76},"    mcpEndpoint: '',\n",[59,341,343],{"class":61,"line":342},37,[59,344,345],{"class":76},"  },\n",[59,347,349],{"class":61,"line":348},38,[59,350,351],{"class":76},"  compatibilityDate: '2025-10-05',\n",[59,353,355],{"class":61,"line":354},39,[59,356,357],{"class":76},"})\n",[59,359,361],{"class":61,"line":360},40,[59,362,279],{"class":76},[59,364,366],{"class":61,"line":365},41,[59,367,90],{"emptyLinePlaceholder":89},[59,369,371],{"class":61,"line":370},42,[59,372,373],{"class":65},"# Remove old Nitro config\n",[59,375,377,380],{"class":61,"line":376},43,[59,378,379],{"class":72},"rm",[59,381,382],{"class":76}," nitro.config.ts\n",[59,384,386],{"class":61,"line":385},44,[59,387,90],{"emptyLinePlaceholder":89},[59,389,391],{"class":61,"line":390},45,[59,392,393],{"class":65},"# Set up basic Nuxt app structure\n",[59,395,397,400,404],{"class":61,"line":396},46,[59,398,399],{"class":72},"mkdir",[59,401,403],{"class":402},"sBjJW"," -p",[59,405,406],{"class":76}," app\u002Fpages\n",[59,408,410,412,414,417,419],{"class":61,"line":409},47,[59,411,208],{"class":72},[59,413,176],{"class":175},[59,415,416],{"class":76}," app\u002Fapp.vue",[59,418,216],{"class":175},[59,420,219],{"class":76},[59,422,424],{"class":61,"line":423},48,[59,425,426],{"class":76},"\u003Ctemplate>\n",[59,428,430],{"class":61,"line":429},49,[59,431,432],{"class":76},"  \u003Cdiv>\n",[59,434,436],{"class":61,"line":435},50,[59,437,438],{"class":76},"    \u003CNuxtRouteAnnouncer \u002F>\n",[59,440,442],{"class":61,"line":441},51,[59,443,444],{"class":76},"    \u003CNuxtPage \u002F>\n",[59,446,448],{"class":61,"line":447},52,[59,449,450],{"class":76},"  \u003C\u002Fdiv>\n",[59,452,454],{"class":61,"line":453},53,[59,455,456],{"class":76},"\u003C\u002Ftemplate>\n",[59,458,460],{"class":61,"line":459},54,[59,461,279],{"class":76},[59,463,465],{"class":61,"line":464},55,[59,466,90],{"emptyLinePlaceholder":89},[59,468,470,472,474,477,479],{"class":61,"line":469},56,[59,471,208],{"class":72},[59,473,176],{"class":175},[59,475,476],{"class":76}," app\u002Fpages\u002Findex.vue",[59,478,216],{"class":175},[59,480,219],{"class":76},[59,482,484],{"class":61,"line":483},57,[59,485,426],{"class":76},[59,487,489],{"class":61,"line":488},58,[59,490,432],{"class":76},[59,492,494],{"class":61,"line":493},59,[59,495,496],{"class":76},"    \u003Ch1>Welcome to the AI Application\u003C\u002Fh1>\n",[59,498,500],{"class":61,"line":499},60,[59,501,450],{"class":76},[59,503,505],{"class":61,"line":504},61,[59,506,456],{"class":76},[59,508,510],{"class":61,"line":509},62,[59,511,279],{"class":76},[59,513,515],{"class":61,"line":514},63,[59,516,90],{"emptyLinePlaceholder":89},[59,518,520],{"class":61,"line":519},64,[59,521,522],{"class":65},"# Update .env and .gitignore\n",[59,524,526,529,532,535,538],{"class":61,"line":525},65,[59,527,528],{"class":72},"sed",[59,530,531],{"class":402}," -i",[59,533,534],{"class":76}," ''",[59,536,537],{"class":76}," 's\u002FNITRO\u002FNUXT\u002Fg'",[59,539,540],{"class":76}," .env\n",[59,542,544,547,550,553],{"class":61,"line":543},66,[59,545,546],{"class":402},"echo",[59,548,549],{"class":76}," \".nuxt\"",[59,551,552],{"class":175}," >>",[59,554,555],{"class":76}," .gitignore\n",[59,557,559],{"class":61,"line":558},67,[59,560,90],{"emptyLinePlaceholder":89},[59,562,564],{"class":61,"line":563},68,[59,565,566],{"class":65},"# Prepare Nuxt\n",[59,568,570,572,575],{"class":61,"line":569},69,[59,571,73],{"class":72},[59,573,574],{"class":76}," run",[59,576,577],{"class":76}," postinstall\n",[37,579,581],{"id":580},"adding-nuxt-ui","Adding Nuxt UI",[10,583,584],{},"Installing Nuxt UI isn't part of this series, so you can just run this script:",[48,586,588],{"className":50,"code":587,"filename":52,"language":53,"meta":54,"style":54},"# Install Nuxt UI and Tailwind CSS\npnpm add @nuxt\u002Fui tailwindcss\n\n# Create the main CSS file and import styles\nmkdir -p app\u002Fassets\u002Fcss\ncat > app\u002Fassets\u002Fcss\u002Fmain.css \u003C\u003C'EOF'\n@import 'tailwindcss';\n@import '@nuxt\u002Fui';\nEOF\n\n# Update Nuxt config to enable Nuxt UI and include the CSS\ncat > nuxt.config.ts \u003C\u003C'EOF'\nimport { defineNuxtConfig } from \"nuxt\u002Fconfig\"\n\nexport default defineNuxtConfig({\n  modules: ['@nuxt\u002Fui'],\n  css: ['~\u002Fassets\u002Fcss\u002Fmain.css'],\n  runtimeConfig: {\n    openAiApiKey: '',\n    mcpEndpoint: '',\n  },\n  compatibilityDate: '2025-10-05',\n})\nEOF\n\n# Update the main app layout to use Nuxt UI's UApp component\ncat > app\u002Fapp.vue \u003C\u003C'EOF'\n\u003Ctemplate>\n  \u003CUApp>\n    \u003CNuxtPage \u002F>\n  \u003C\u002FUApp>\n\u003C\u002Ftemplate>\nEOF\n",[56,589,590,595,607,611,616,625,638,643,648,652,656,661,673,677,681,685,690,695,699,703,707,711,715,719,723,727,732,744,748,753,757,762,766],{"__ignoreMap":54},[59,591,592],{"class":61,"line":62},[59,593,594],{"class":65},"# Install Nuxt UI and Tailwind CSS\n",[59,596,597,599,601,604],{"class":61,"line":69},[59,598,73],{"class":72},[59,600,104],{"class":76},[59,602,603],{"class":76}," @nuxt\u002Fui",[59,605,606],{"class":76}," tailwindcss\n",[59,608,609],{"class":61,"line":86},[59,610,90],{"emptyLinePlaceholder":89},[59,612,613],{"class":61,"line":93},[59,614,615],{"class":65},"# Create the main CSS file and import styles\n",[59,617,618,620,622],{"class":61,"line":99},[59,619,399],{"class":72},[59,621,403],{"class":402},[59,623,624],{"class":76}," app\u002Fassets\u002Fcss\n",[59,626,627,629,631,634,636],{"class":61,"line":116},[59,628,208],{"class":72},[59,630,176],{"class":175},[59,632,633],{"class":76}," app\u002Fassets\u002Fcss\u002Fmain.css",[59,635,216],{"class":175},[59,637,219],{"class":76},[59,639,640],{"class":61,"line":121},[59,641,642],{"class":76},"@import 'tailwindcss';\n",[59,644,645],{"class":61,"line":127},[59,646,647],{"class":76},"@import '@nuxt\u002Fui';\n",[59,649,650],{"class":61,"line":136},[59,651,279],{"class":76},[59,653,654],{"class":61,"line":142},[59,655,90],{"emptyLinePlaceholder":89},[59,657,658],{"class":61,"line":148},[59,659,660],{"class":65},"# Update Nuxt config to enable Nuxt UI and include the CSS\n",[59,662,663,665,667,669,671],{"class":61,"line":154},[59,664,208],{"class":72},[59,666,176],{"class":175},[59,668,300],{"class":76},[59,670,216],{"class":175},[59,672,219],{"class":76},[59,674,675],{"class":61,"line":160},[59,676,310],{"class":76},[59,678,679],{"class":61,"line":166},[59,680,90],{"emptyLinePlaceholder":89},[59,682,683],{"class":61,"line":194},[59,684,321],{"class":76},[59,686,687],{"class":61,"line":199},[59,688,689],{"class":76},"  modules: ['@nuxt\u002Fui'],\n",[59,691,692],{"class":61,"line":205},[59,693,694],{"class":76},"  css: ['~\u002Fassets\u002Fcss\u002Fmain.css'],\n",[59,696,697],{"class":61,"line":222},[59,698,327],{"class":76},[59,700,701],{"class":61,"line":228},[59,702,333],{"class":76},[59,704,705],{"class":61,"line":234},[59,706,339],{"class":76},[59,708,709],{"class":61,"line":240},[59,710,345],{"class":76},[59,712,713],{"class":61,"line":246},[59,714,351],{"class":76},[59,716,717],{"class":61,"line":252},[59,718,357],{"class":76},[59,720,721],{"class":61,"line":258},[59,722,279],{"class":76},[59,724,725],{"class":61,"line":264},[59,726,90],{"emptyLinePlaceholder":89},[59,728,729],{"class":61,"line":270},[59,730,731],{"class":65},"# Update the main app layout to use Nuxt UI's UApp component\n",[59,733,734,736,738,740,742],{"class":61,"line":276},[59,735,208],{"class":72},[59,737,176],{"class":175},[59,739,416],{"class":76},[59,741,216],{"class":175},[59,743,219],{"class":76},[59,745,746],{"class":61,"line":282},[59,747,426],{"class":76},[59,749,750],{"class":61,"line":287},[59,751,752],{"class":76},"  \u003CUApp>\n",[59,754,755],{"class":61,"line":293},[59,756,444],{"class":76},[59,758,759],{"class":61,"line":307},[59,760,761],{"class":76},"  \u003C\u002FUApp>\n",[59,763,764],{"class":61,"line":313},[59,765,456],{"class":76},[59,767,768],{"class":61,"line":318},[59,769,279],{"class":76},[10,771,772],{},"Once done, start the development server:",[48,774,776],{"className":50,"code":775,"filename":52,"language":53,"meta":54,"style":54},"pnpm run dev\n",[56,777,778],{"__ignoreMap":54},[59,779,780,782,784],{"class":61,"line":62},[59,781,73],{"class":72},[59,783,574],{"class":76},[59,785,786],{"class":76}," dev\n",[10,788,789,790,793,794,797,798,801,802,35],{},"The app should now start successfully. Before testing the chat, make sure the ",[56,791,792],{},"\u002Fapi\u002Fchat"," route is present and your ",[56,795,796],{},".env"," file contains ",[56,799,800],{},"NUXT_OPEN_AI_API_KEY"," and ",[56,803,804],{},"NUXT_MCP_ENDPOINT",[37,806,808],{"id":807},"building-the-application","Building the application",[10,810,811],{},"Now that we have a working Nuxt application with Nuxt UI, we can build the chat interface. We will focus on the structure and behavior rather than on a perfect visual design.",[10,813,814,815,820],{},"Within the Nuxt documentation, there is ",[17,816,819],{"href":817,"rel":818},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Fchat-messages#examples",[21],"a fully working example"," of a page with a chat interface that we can use. We don't need more than that for today's implementation.",[10,822,823],{},"Before using it, we need to install the AI SDK for Vue.",[48,825,827],{"className":50,"code":826,"filename":52,"language":53,"meta":54,"style":54},"pnpm add @ai-sdk\u002Fvue\n",[56,828,829],{"__ignoreMap":54},[59,830,831,833,835],{"class":61,"line":62},[59,832,73],{"class":72},[59,834,104],{"class":76},[59,836,837],{"class":76}," @ai-sdk\u002Fvue\n",[10,839,840,841,844],{},"We also need to install ",[56,842,843],{},"@nuxtjs\u002Fmdc"," to parse and render Markdown on the fly.",[48,846,848],{"className":50,"code":847,"filename":52,"language":53,"meta":54,"style":54},"pnpm dlx nuxt module add @nuxtjs\u002Fmdc\n",[56,849,850],{"__ignoreMap":54},[59,851,852,854,857,859,862,864],{"class":61,"line":62},[59,853,73],{"class":72},[59,855,856],{"class":76}," dlx",[59,858,107],{"class":76},[59,860,861],{"class":76}," module",[59,863,104],{"class":76},[59,865,866],{"class":76}," @nuxtjs\u002Fmdc\n",[10,868,869,870,873],{},"Then, replace ",[56,871,872],{},"app\u002Fpages\u002Findex.vue"," with this complete version of the example:",[48,875,879],{"className":876,"code":877,"filename":872,"language":878,"meta":54,"style":54},"language-vue shiki shiki-themes github-light github-light github-dark","\u003Cscript setup lang=\"ts\">\nimport { Chat } from '@ai-sdk\u002Fvue'\n\nconst input = ref('')\n\nconst chat = new Chat({\n  onError(error) {\n    console.error('Chat error:', error)\n  }\n})\n\nfunction handleSubmit(e: Event) {\n  e.preventDefault()\n  chat.sendMessage({ text: input.value })\n  input.value = ''\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CUDashboardPanel>\n    \u003Ctemplate #body>\n      \u003CUContainer>\n        \u003CUChatMessages :messages=\"chat.messages\" :status=\"chat.status\">\n          \u003Ctemplate #content=\"{ message }\">\n            \u003Ctemplate v-for=\"(part, index) in message.parts\" :key=\"index\">\n              \u003CMDC\n                v-if=\"part.type === 'text'\"\n                :value=\"part.text\"\n                :cache-key=\"`${message.id}-${index}`\"\n                unwrap=\"p\"\n              \u002F>\n\n              \u003Cdiv v-else-if=\"part.type === 'reasoning'\">\n                {{ part.state === 'streaming' ? 'Thinking...' : 'Thinking complete' }}\n              \u003C\u002Fdiv>\n\n              \u003Cdiv v-else-if=\"part.type === 'dynamic-tool' && part.toolName === 'addition'\">\n                \u003Ctemplate v-if=\"part.state === 'input-streaming'\">\n                  \u003Ctemplate v-if=\"part.input && (part.input as { a: number; b: number }).a !== undefined && (part.input as { a: number; b: number }).b !== undefined\">\n                    Adding: {{ (part.input as { a: number; b: number }).a }} + {{ (part.input as { a: number; b: number }).b }}\n                  \u003C\u002Ftemplate>\n                  \u003Ctemplate v-else>\n                    Adding...\n                  \u003C\u002Ftemplate>\n                \u003C\u002Ftemplate>\n                \u003Ctemplate v-else>\n                  Addition complete: {{ (part.input as { a: number; b: number }).a }} + {{ (part.input as { a: number; b: number }).b }}\n                \u003C\u002Ftemplate>\n              \u003C\u002Fdiv>\n            \u003C\u002Ftemplate>\n          \u003C\u002Ftemplate>\n        \u003C\u002FUChatMessages>\n      \u003C\u002FUContainer>\n    \u003C\u002Ftemplate>\n\n    \u003Ctemplate #footer>\n      \u003CUContainer>\n        \u003CUChatPrompt v-model=\"input\" :error=\"chat.error\" @submit=\"handleSubmit\">\n          \u003CUChatPromptSubmit :status=\"chat.status\" @stop=\"chat.stop\" @reload=\"chat.regenerate\" \u002F>\n        \u003C\u002FUChatPrompt>\n      \u003C\u002FUContainer>\n    \u003C\u002Ftemplate>\n  \u003C\u002FUDashboardPanel>\n\u003C\u002Ftemplate>\n","vue",[56,880,881,905,919,923,946,950,968,982,997,1002,1006,1010,1031,1042,1053,1063,1067,1076,1080,1089,1099,1114,1124,1164,1187,1228,1236,1254,1272,1300,1310,1315,1319,1336,1341,1350,1354,1369,1393,1481,1486,1495,1506,1511,1519,1528,1538,1543,1551,1559,1568,1577,1586,1595,1604,1608,1621,1629,1678,1728,1736,1744,1752,1761],{"__ignoreMap":54},[59,882,883,886,890,893,896,899,902],{"class":61,"line":62},[59,884,885],{"class":182},"\u003C",[59,887,889],{"class":888},"sovSZ","script",[59,891,892],{"class":72}," setup",[59,894,895],{"class":72}," lang",[59,897,898],{"class":182},"=",[59,900,901],{"class":76},"\"ts\"",[59,903,904],{"class":182},">\n",[59,906,907,910,913,916],{"class":61,"line":69},[59,908,909],{"class":175},"import",[59,911,912],{"class":182}," { Chat } ",[59,914,915],{"class":175},"from",[59,917,918],{"class":76}," '@ai-sdk\u002Fvue'\n",[59,920,921],{"class":61,"line":86},[59,922,90],{"emptyLinePlaceholder":89},[59,924,925,928,931,934,937,940,943],{"class":61,"line":93},[59,926,927],{"class":175},"const",[59,929,930],{"class":402}," input",[59,932,933],{"class":175}," =",[59,935,936],{"class":72}," ref",[59,938,939],{"class":182},"(",[59,941,942],{"class":76},"''",[59,944,945],{"class":182},")\n",[59,947,948],{"class":61,"line":99},[59,949,90],{"emptyLinePlaceholder":89},[59,951,952,954,957,959,962,965],{"class":61,"line":116},[59,953,927],{"class":175},[59,955,956],{"class":402}," chat",[59,958,933],{"class":175},[59,960,961],{"class":175}," new",[59,963,964],{"class":72}," Chat",[59,966,967],{"class":182},"({\n",[59,969,970,973,975,979],{"class":61,"line":121},[59,971,972],{"class":72},"  onError",[59,974,939],{"class":182},[59,976,978],{"class":977},"sP4rz","error",[59,980,981],{"class":182},") {\n",[59,983,984,987,989,991,994],{"class":61,"line":127},[59,985,986],{"class":182},"    console.",[59,988,978],{"class":72},[59,990,939],{"class":182},[59,992,993],{"class":76},"'Chat error:'",[59,995,996],{"class":182},", error)\n",[59,998,999],{"class":61,"line":136},[59,1000,1001],{"class":182},"  }\n",[59,1003,1004],{"class":61,"line":142},[59,1005,357],{"class":182},[59,1007,1008],{"class":61,"line":148},[59,1009,90],{"emptyLinePlaceholder":89},[59,1011,1012,1015,1018,1020,1023,1026,1029],{"class":61,"line":154},[59,1013,1014],{"class":175},"function",[59,1016,1017],{"class":72}," handleSubmit",[59,1019,939],{"class":182},[59,1021,1022],{"class":977},"e",[59,1024,1025],{"class":175},":",[59,1027,1028],{"class":72}," Event",[59,1030,981],{"class":182},[59,1032,1033,1036,1039],{"class":61,"line":160},[59,1034,1035],{"class":182},"  e.",[59,1037,1038],{"class":72},"preventDefault",[59,1040,1041],{"class":182},"()\n",[59,1043,1044,1047,1050],{"class":61,"line":166},[59,1045,1046],{"class":182},"  chat.",[59,1048,1049],{"class":72},"sendMessage",[59,1051,1052],{"class":182},"({ text: input.value })\n",[59,1054,1055,1058,1060],{"class":61,"line":194},[59,1056,1057],{"class":182},"  input.value ",[59,1059,898],{"class":175},[59,1061,1062],{"class":76}," ''\n",[59,1064,1065],{"class":61,"line":199},[59,1066,273],{"class":182},[59,1068,1069,1072,1074],{"class":61,"line":205},[59,1070,1071],{"class":182},"\u003C\u002F",[59,1073,889],{"class":888},[59,1075,904],{"class":182},[59,1077,1078],{"class":61,"line":222},[59,1079,90],{"emptyLinePlaceholder":89},[59,1081,1082,1084,1087],{"class":61,"line":228},[59,1083,885],{"class":182},[59,1085,1086],{"class":888},"template",[59,1088,904],{"class":182},[59,1090,1091,1094,1097],{"class":61,"line":234},[59,1092,1093],{"class":182},"  \u003C",[59,1095,1096],{"class":888},"UDashboardPanel",[59,1098,904],{"class":182},[59,1100,1101,1104,1106,1109,1112],{"class":61,"line":240},[59,1102,1103],{"class":182},"    \u003C",[59,1105,1086],{"class":888},[59,1107,1108],{"class":182}," #",[59,1110,1111],{"class":72},"body",[59,1113,904],{"class":182},[59,1115,1116,1119,1122],{"class":61,"line":246},[59,1117,1118],{"class":182},"      \u003C",[59,1120,1121],{"class":888},"UContainer",[59,1123,904],{"class":182},[59,1125,1126,1129,1132,1135,1138,1140,1143,1146,1148,1150,1153,1155,1157,1160,1162],{"class":61,"line":252},[59,1127,1128],{"class":182},"        \u003C",[59,1130,1131],{"class":888},"UChatMessages",[59,1133,1134],{"class":182}," :",[59,1136,1137],{"class":72},"messages",[59,1139,898],{"class":182},[59,1141,1142],{"class":76},"\"",[59,1144,1145],{"class":182},"chat.messages",[59,1147,1142],{"class":76},[59,1149,1134],{"class":182},[59,1151,1152],{"class":72},"status",[59,1154,898],{"class":182},[59,1156,1142],{"class":76},[59,1158,1159],{"class":182},"chat.status",[59,1161,1142],{"class":76},[59,1163,904],{"class":182},[59,1165,1166,1169,1171,1173,1176,1178,1180,1183,1185],{"class":61,"line":258},[59,1167,1168],{"class":182},"          \u003C",[59,1170,1086],{"class":888},[59,1172,1108],{"class":182},[59,1174,1175],{"class":72},"content",[59,1177,898],{"class":182},[59,1179,1142],{"class":76},[59,1181,1182],{"class":182},"{ message }",[59,1184,1142],{"class":76},[59,1186,904],{"class":182},[59,1188,1189,1192,1194,1197,1199,1201,1204,1207,1210,1212,1214,1217,1219,1221,1224,1226],{"class":61,"line":264},[59,1190,1191],{"class":182},"            \u003C",[59,1193,1086],{"class":888},[59,1195,1196],{"class":175}," v-for",[59,1198,898],{"class":182},[59,1200,1142],{"class":76},[59,1202,1203],{"class":182},"(part, index) ",[59,1205,1206],{"class":175},"in",[59,1208,1209],{"class":182}," message.parts",[59,1211,1142],{"class":76},[59,1213,1134],{"class":182},[59,1215,1216],{"class":72},"key",[59,1218,898],{"class":182},[59,1220,1142],{"class":76},[59,1222,1223],{"class":182},"index",[59,1225,1142],{"class":76},[59,1227,904],{"class":182},[59,1229,1230,1233],{"class":61,"line":270},[59,1231,1232],{"class":182},"              \u003C",[59,1234,1235],{"class":888},"MDC\n",[59,1237,1238,1241,1243,1245,1248,1251],{"class":61,"line":276},[59,1239,1240],{"class":175},"                v-if",[59,1242,898],{"class":182},[59,1244,1142],{"class":76},[59,1246,1247],{"class":182},"part.type ",[59,1249,1250],{"class":175},"===",[59,1252,1253],{"class":76}," 'text'\"\n",[59,1255,1256,1259,1262,1264,1266,1269],{"class":61,"line":282},[59,1257,1258],{"class":182},"                :",[59,1260,1261],{"class":72},"value",[59,1263,898],{"class":182},[59,1265,1142],{"class":76},[59,1267,1268],{"class":182},"part.text",[59,1270,1271],{"class":76},"\"\n",[59,1273,1274,1276,1279,1281,1284,1287,1289,1292,1295,1297],{"class":61,"line":287},[59,1275,1258],{"class":182},[59,1277,1278],{"class":72},"cache-key",[59,1280,898],{"class":182},[59,1282,1283],{"class":76},"\"`${",[59,1285,1286],{"class":182},"message",[59,1288,35],{"class":76},[59,1290,1291],{"class":182},"id",[59,1293,1294],{"class":76},"}-${",[59,1296,1223],{"class":182},[59,1298,1299],{"class":76},"}`\"\n",[59,1301,1302,1305,1307],{"class":61,"line":293},[59,1303,1304],{"class":72},"                unwrap",[59,1306,898],{"class":182},[59,1308,1309],{"class":76},"\"p\"\n",[59,1311,1312],{"class":61,"line":307},[59,1313,1314],{"class":182},"              \u002F>\n",[59,1316,1317],{"class":61,"line":313},[59,1318,90],{"emptyLinePlaceholder":89},[59,1320,1321,1323,1326,1329,1331,1334],{"class":61,"line":318},[59,1322,1232],{"class":182},[59,1324,1325],{"class":888},"div",[59,1327,1328],{"class":72}," v-else-if",[59,1330,898],{"class":182},[59,1332,1333],{"class":76},"\"part.type === 'reasoning'\"",[59,1335,904],{"class":182},[59,1337,1338],{"class":61,"line":324},[59,1339,1340],{"class":182},"                {{ part.state === 'streaming' ? 'Thinking...' : 'Thinking complete' }}\n",[59,1342,1343,1346,1348],{"class":61,"line":330},[59,1344,1345],{"class":182},"              \u003C\u002F",[59,1347,1325],{"class":888},[59,1349,904],{"class":182},[59,1351,1352],{"class":61,"line":336},[59,1353,90],{"emptyLinePlaceholder":89},[59,1355,1356,1358,1360,1362,1364,1367],{"class":61,"line":342},[59,1357,1232],{"class":182},[59,1359,1325],{"class":888},[59,1361,1328],{"class":72},[59,1363,898],{"class":182},[59,1365,1366],{"class":76},"\"part.type === 'dynamic-tool' && part.toolName === 'addition'\"",[59,1368,904],{"class":182},[59,1370,1371,1374,1376,1379,1381,1383,1386,1388,1391],{"class":61,"line":348},[59,1372,1373],{"class":182},"                \u003C",[59,1375,1086],{"class":888},[59,1377,1378],{"class":175}," v-if",[59,1380,898],{"class":182},[59,1382,1142],{"class":76},[59,1384,1385],{"class":182},"part.state ",[59,1387,1250],{"class":175},[59,1389,1390],{"class":76}," 'input-streaming'\"",[59,1392,904],{"class":182},[59,1394,1395,1398,1400,1402,1404,1406,1409,1412,1415,1418,1421,1423,1425,1428,1431,1434,1436,1438,1441,1444,1447,1450,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470,1473,1475,1477,1479],{"class":61,"line":354},[59,1396,1397],{"class":182},"                  \u003C",[59,1399,1086],{"class":888},[59,1401,1378],{"class":175},[59,1403,898],{"class":182},[59,1405,1142],{"class":76},[59,1407,1408],{"class":182},"part.input ",[59,1410,1411],{"class":175},"&&",[59,1413,1414],{"class":182}," (part.input ",[59,1416,1417],{"class":175},"as",[59,1419,1420],{"class":182}," { ",[59,1422,17],{"class":977},[59,1424,1025],{"class":175},[59,1426,1427],{"class":402}," number",[59,1429,1430],{"class":182},"; ",[59,1432,1433],{"class":977},"b",[59,1435,1025],{"class":175},[59,1437,1427],{"class":402},[59,1439,1440],{"class":182}," }).a ",[59,1442,1443],{"class":175},"!==",[59,1445,1446],{"class":402}," undefined",[59,1448,1449],{"class":175}," &&",[59,1451,1414],{"class":182},[59,1453,1417],{"class":175},[59,1455,1420],{"class":182},[59,1457,17],{"class":977},[59,1459,1025],{"class":175},[59,1461,1427],{"class":402},[59,1463,1430],{"class":182},[59,1465,1433],{"class":977},[59,1467,1025],{"class":175},[59,1469,1427],{"class":402},[59,1471,1472],{"class":182}," }).b ",[59,1474,1443],{"class":175},[59,1476,1446],{"class":402},[59,1478,1142],{"class":76},[59,1480,904],{"class":182},[59,1482,1483],{"class":61,"line":360},[59,1484,1485],{"class":182},"                    Adding: {{ (part.input as { a: number; b: number }).a }} + {{ (part.input as { a: number; b: number }).b }}\n",[59,1487,1488,1491,1493],{"class":61,"line":365},[59,1489,1490],{"class":182},"                  \u003C\u002F",[59,1492,1086],{"class":888},[59,1494,904],{"class":182},[59,1496,1497,1499,1501,1504],{"class":61,"line":370},[59,1498,1397],{"class":182},[59,1500,1086],{"class":888},[59,1502,1503],{"class":175}," v-else",[59,1505,904],{"class":182},[59,1507,1508],{"class":61,"line":376},[59,1509,1510],{"class":182},"                    Adding...\n",[59,1512,1513,1515,1517],{"class":61,"line":385},[59,1514,1490],{"class":182},[59,1516,1086],{"class":888},[59,1518,904],{"class":182},[59,1520,1521,1524,1526],{"class":61,"line":390},[59,1522,1523],{"class":182},"                \u003C\u002F",[59,1525,1086],{"class":888},[59,1527,904],{"class":182},[59,1529,1530,1532,1534,1536],{"class":61,"line":396},[59,1531,1373],{"class":182},[59,1533,1086],{"class":888},[59,1535,1503],{"class":175},[59,1537,904],{"class":182},[59,1539,1540],{"class":61,"line":409},[59,1541,1542],{"class":182},"                  Addition complete: {{ (part.input as { a: number; b: number }).a }} + {{ (part.input as { a: number; b: number }).b }}\n",[59,1544,1545,1547,1549],{"class":61,"line":423},[59,1546,1523],{"class":182},[59,1548,1086],{"class":888},[59,1550,904],{"class":182},[59,1552,1553,1555,1557],{"class":61,"line":429},[59,1554,1345],{"class":182},[59,1556,1325],{"class":888},[59,1558,904],{"class":182},[59,1560,1561,1564,1566],{"class":61,"line":435},[59,1562,1563],{"class":182},"            \u003C\u002F",[59,1565,1086],{"class":888},[59,1567,904],{"class":182},[59,1569,1570,1573,1575],{"class":61,"line":441},[59,1571,1572],{"class":182},"          \u003C\u002F",[59,1574,1086],{"class":888},[59,1576,904],{"class":182},[59,1578,1579,1582,1584],{"class":61,"line":447},[59,1580,1581],{"class":182},"        \u003C\u002F",[59,1583,1131],{"class":888},[59,1585,904],{"class":182},[59,1587,1588,1591,1593],{"class":61,"line":453},[59,1589,1590],{"class":182},"      \u003C\u002F",[59,1592,1121],{"class":888},[59,1594,904],{"class":182},[59,1596,1597,1600,1602],{"class":61,"line":459},[59,1598,1599],{"class":182},"    \u003C\u002F",[59,1601,1086],{"class":888},[59,1603,904],{"class":182},[59,1605,1606],{"class":61,"line":464},[59,1607,90],{"emptyLinePlaceholder":89},[59,1609,1610,1612,1614,1616,1619],{"class":61,"line":469},[59,1611,1103],{"class":182},[59,1613,1086],{"class":888},[59,1615,1108],{"class":182},[59,1617,1618],{"class":72},"footer",[59,1620,904],{"class":182},[59,1622,1623,1625,1627],{"class":61,"line":483},[59,1624,1118],{"class":182},[59,1626,1121],{"class":888},[59,1628,904],{"class":182},[59,1630,1631,1633,1636,1639,1641,1643,1646,1648,1650,1652,1654,1656,1659,1661,1664,1667,1669,1671,1674,1676],{"class":61,"line":488},[59,1632,1128],{"class":182},[59,1634,1635],{"class":888},"UChatPrompt",[59,1637,1638],{"class":72}," v-model",[59,1640,898],{"class":182},[59,1642,1142],{"class":76},[59,1644,1645],{"class":182},"input",[59,1647,1142],{"class":76},[59,1649,1134],{"class":182},[59,1651,978],{"class":72},[59,1653,898],{"class":182},[59,1655,1142],{"class":76},[59,1657,1658],{"class":182},"chat.error",[59,1660,1142],{"class":76},[59,1662,1663],{"class":182}," @",[59,1665,1666],{"class":72},"submit",[59,1668,898],{"class":182},[59,1670,1142],{"class":76},[59,1672,1673],{"class":182},"handleSubmit",[59,1675,1142],{"class":76},[59,1677,904],{"class":182},[59,1679,1680,1682,1685,1687,1689,1691,1693,1695,1697,1699,1702,1704,1706,1709,1711,1713,1716,1718,1720,1723,1725],{"class":61,"line":493},[59,1681,1168],{"class":182},[59,1683,1684],{"class":888},"UChatPromptSubmit",[59,1686,1134],{"class":182},[59,1688,1152],{"class":72},[59,1690,898],{"class":182},[59,1692,1142],{"class":76},[59,1694,1159],{"class":182},[59,1696,1142],{"class":76},[59,1698,1663],{"class":182},[59,1700,1701],{"class":72},"stop",[59,1703,898],{"class":182},[59,1705,1142],{"class":76},[59,1707,1708],{"class":182},"chat.stop",[59,1710,1142],{"class":76},[59,1712,1663],{"class":182},[59,1714,1715],{"class":72},"reload",[59,1717,898],{"class":182},[59,1719,1142],{"class":76},[59,1721,1722],{"class":182},"chat.regenerate",[59,1724,1142],{"class":76},[59,1726,1727],{"class":182}," \u002F>\n",[59,1729,1730,1732,1734],{"class":61,"line":499},[59,1731,1581],{"class":182},[59,1733,1635],{"class":888},[59,1735,904],{"class":182},[59,1737,1738,1740,1742],{"class":61,"line":504},[59,1739,1590],{"class":182},[59,1741,1121],{"class":888},[59,1743,904],{"class":182},[59,1745,1746,1748,1750],{"class":61,"line":509},[59,1747,1599],{"class":182},[59,1749,1086],{"class":888},[59,1751,904],{"class":182},[59,1753,1754,1757,1759],{"class":61,"line":514},[59,1755,1756],{"class":182},"  \u003C\u002F",[59,1758,1096],{"class":888},[59,1760,904],{"class":182},[59,1762,1763,1765,1767],{"class":61,"line":519},[59,1764,1071],{"class":182},[59,1766,1086],{"class":888},[59,1768,904],{"class":182},[10,1770,1771],{},"Type \"What is 2 + 2?\" in the input field. With the API route running and the environment variables configured, you should receive an answer from the agent.",[1773,1774,1775,1780],"figure",{},[1776,1777],"img",{"alt":1778,"src":1779},"Our AI application in action","\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui\u002Fai-app-in-action.webp",[1781,1782,1778],"figcaption",{},[10,1784,1785,1786,1788],{},"To verify that the agent used the addition tool, open your browser's developer tools and inspect the event stream from the ",[56,1787,792],{}," request. You should see something like this:",[1773,1790,1791,1795],{},[1776,1792],{"alt":1793,"src":1794},"The Event Stream from the \u002Fapi\u002Fchat endpoint","\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui\u002Fevent-stream.webp",[1781,1796,1793],{},[10,1798,1799,1800,1803],{},"It is the same UI message stream we saw with ",[56,1801,1802],{},"curl"," in the terminal.",[37,1805,1807],{"id":1806},"understanding-the-chat-integration","Understanding the chat integration",[10,1809,1810],{},"We have built an AI application that uses our agent. Here's what connects the frontend to the backend.",[10,1812,1813,1814,1816,1817,1820],{},"First, the ",[56,1815,792],{}," response is not the raw output of the model. ",[56,1818,1819],{},"toUIMessageStreamResponse"," converts the agent's result into a stream designed for a user interface.",[10,1822,1823,1826],{},[56,1824,1825],{},"UIMessage"," is the interface that defines the structure of a message in an AI application. The frontend does not need to transform the received stream of messages because they are already in the correct format.",[10,1828,1829,1830,1833,1834,1837],{},"The AI SDK also provides the ",[56,1831,1832],{},"Chat"," class to manage the chat state. It handles the message stream, appends new messages, sends messages in the correct format with ",[56,1835,1836],{},"sendMessage({ text: input.value })",", and manages status and error states.",[10,1839,1840,1841,1843],{},"You could implement the POST request, streamed response parsing, message updates, cancellation, and error handling yourself. ",[56,1842,1832],{}," handles those details so we can focus on the experience, including showing the tools used, their status, and their input in real time.",[37,1845,1847],{"id":1846},"showing-tools","Showing tools",[10,1849,1850],{},"Each message is composed of parts. A user message can have text and file parts, while an assistant message can have text, reasoning, tool-call, and file parts.",[10,1852,1853],{},"Under the hood, the AI SDK manages these parts while it receives chunks from the server. It assembles text chunks into a message and updates the state of tool-call parts as the agent uses them.",[10,1855,1856,1857,1860],{},"The ",[56,1858,1859],{},"#content"," slot in the complete example iterates through these parts. It renders Markdown text, shows when the model is reasoning, and displays the addition tool's progress and input.",[1862,1863,1866],"callout",{"color":1864,"icon":1865},"info","i-ph-info-duotone",[10,1867,1868],{},"This approach is flexible, allowing you to easily customize it to fit your needs.",[10,1870,1871],{},"At the end, it looks like this:",[1773,1873,1874,1875,1874,1884],{},"\n  ",[1876,1877,1878,1879,1874],"video",{"autoPlay":89,"loop":89,"muted":89,"playsInline":89},"\n    ",[1880,1881],"source",{"src":1882,"type":1883},"https:\u002F\u002Fimages.soubiran.dev\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui\u002Fai-application.mp4","video\u002Fmp4",[1781,1885,1886],{},"The AI Application in action.",[10,1888,1889],{},"Showing the agent's progress gives users confidence that their request is being handled, especially when a tool call takes time. In the final article, we will deploy the application and MCP server to Cloudflare.",[1891,1892,1893],"style",{},"html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sovSZ, html code.shiki .sovSZ{--shiki-light:#22863A;--shiki-default:#22863A;--shiki-dark:#85E89D}html pre.shiki code .sP4rz, html code.shiki .sP4rz{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":54,"searchDepth":69,"depth":69,"links":1895},[1896,1897,1898,1899,1900],{"id":39,"depth":69,"text":40},{"id":580,"depth":69,"text":581},{"id":807,"depth":69,"text":808},{"id":1806,"depth":69,"text":1807},{"id":1846,"depth":69,"text":1847},"19f0acd2-037f-4538-9d69-cbb86a0bea64","2025-10-07","Having an AI agent is a good start, but integrating it into an application makes all the difference. Nuxt UI makes that easy.","md",{"branch":1906},"04.a-powerful-ai-application-made-with-nitro-and-nuxt-ui",null,{},"\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui","---\ncontentId: 19f0acd2-037f-4538-9d69-cbb86a0bea64\npart: 4\ntitle: A Powerful AI Application Made with Nitro and Nuxt UI\ndescription: Having an AI agent is a good start, but integrating it into an application makes all the difference. Nuxt UI makes that easy.\ngithub:\n  branch: 04.a-powerful-ai-application-made-with-nitro-and-nuxt-ui\ndate: 2025-10-07\nseriesSlug: ai-agents-and-mcp-server-teaming-up-for-the-agentic-web\n---\n\nOur agent and MCP server are ready. In this article, we will turn them into an AI application where users can send messages, receive streamed answers, and see when the agent uses a tool.\n\nTo build it, we will use [Nuxt](https:\u002F\u002Fnuxt.com\u002F) along with [Nuxt UI](https:\u002F\u002Fui.nuxt.com\u002F), which includes components designed for [building AI applications](https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents#chat).\n\n## From Nitro to Nuxt\n\nNuxt uses Nitro as its server engine, so we can keep the server routes built in the previous articles and add a frontend around them.\n\nThis is a mechanical migration rather than the focus of the article, so this script performs it for us:\n\n```bash [terminal]\n# Remove Nitro dependencies\npnpm remove nitropack h3\n\n# Install Nuxt dependencies\npnpm add nuxt vue vue-router\n\n# Update package.json scripts\njq '.scripts = {\n  \"build\": \"nuxt build\",\n  \"dev\": \"nuxt dev\",\n  \"generate\": \"nuxt generate\",\n  \"preview\": \"nuxt preview\",\n  \"postinstall\": \"nuxt prepare\"\n}' package.json > tmp.json && mv tmp.json package.json\n\n# Update tsconfig.json for Nuxt\ncat > tsconfig.json \u003C\u003C'EOF'\n{\n  \"files\": [],\n  \"references\": [\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.app.json\" },\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.server.json\" },\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.shared.json\" },\n    { \"path\": \".\u002F.nuxt\u002Ftsconfig.node.json\" }\n  ]\n}\nEOF\n\n# Create Nuxt config\ncat > nuxt.config.ts \u003C\u003C'EOF'\nimport { defineNuxtConfig } from \"nuxt\u002Fconfig\"\n\nexport default defineNuxtConfig({\n  runtimeConfig: {\n    openAiApiKey: '',\n    mcpEndpoint: '',\n  },\n  compatibilityDate: '2025-10-05',\n})\nEOF\n\n# Remove old Nitro config\nrm nitro.config.ts\n\n# Set up basic Nuxt app structure\nmkdir -p app\u002Fpages\ncat > app\u002Fapp.vue \u003C\u003C'EOF'\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003CNuxtRouteAnnouncer \u002F>\n    \u003CNuxtPage \u002F>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\nEOF\n\ncat > app\u002Fpages\u002Findex.vue \u003C\u003C'EOF'\n\u003Ctemplate>\n  \u003Cdiv>\n    \u003Ch1>Welcome to the AI Application\u003C\u002Fh1>\n  \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\nEOF\n\n# Update .env and .gitignore\nsed -i '' 's\u002FNITRO\u002FNUXT\u002Fg' .env\necho \".nuxt\" >> .gitignore\n\n# Prepare Nuxt\npnpm run postinstall\n```\n\n## Adding Nuxt UI\n\nInstalling Nuxt UI isn't part of this series, so you can just run this script:\n\n```bash [terminal]\n# Install Nuxt UI and Tailwind CSS\npnpm add @nuxt\u002Fui tailwindcss\n\n# Create the main CSS file and import styles\nmkdir -p app\u002Fassets\u002Fcss\ncat > app\u002Fassets\u002Fcss\u002Fmain.css \u003C\u003C'EOF'\n@import 'tailwindcss';\n@import '@nuxt\u002Fui';\nEOF\n\n# Update Nuxt config to enable Nuxt UI and include the CSS\ncat > nuxt.config.ts \u003C\u003C'EOF'\nimport { defineNuxtConfig } from \"nuxt\u002Fconfig\"\n\nexport default defineNuxtConfig({\n  modules: ['@nuxt\u002Fui'],\n  css: ['~\u002Fassets\u002Fcss\u002Fmain.css'],\n  runtimeConfig: {\n    openAiApiKey: '',\n    mcpEndpoint: '',\n  },\n  compatibilityDate: '2025-10-05',\n})\nEOF\n\n# Update the main app layout to use Nuxt UI's UApp component\ncat > app\u002Fapp.vue \u003C\u003C'EOF'\n\u003Ctemplate>\n  \u003CUApp>\n    \u003CNuxtPage \u002F>\n  \u003C\u002FUApp>\n\u003C\u002Ftemplate>\nEOF\n```\n\nOnce done, start the development server:\n\n```bash [terminal]\npnpm run dev\n```\n\nThe app should now start successfully. Before testing the chat, make sure the `\u002Fapi\u002Fchat` route is present and your `.env` file contains `NUXT_OPEN_AI_API_KEY` and `NUXT_MCP_ENDPOINT`.\n\n## Building the application\n\nNow that we have a working Nuxt application with Nuxt UI, we can build the chat interface. We will focus on the structure and behavior rather than on a perfect visual design.\n\nWithin the Nuxt documentation, there is [a fully working example](https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Fchat-messages#examples) of a page with a chat interface that we can use. We don't need more than that for today's implementation.\n\nBefore using it, we need to install the AI SDK for Vue.\n\n```bash [terminal]\npnpm add @ai-sdk\u002Fvue\n```\n\nWe also need to install `@nuxtjs\u002Fmdc` to parse and render Markdown on the fly.\n\n```bash [terminal]\npnpm dlx nuxt module add @nuxtjs\u002Fmdc\n```\n\nThen, replace `app\u002Fpages\u002Findex.vue` with this complete version of the example:\n\n```vue [app\u002Fpages\u002Findex.vue]\n\u003Cscript setup lang=\"ts\">\nimport { Chat } from '@ai-sdk\u002Fvue'\n\nconst input = ref('')\n\nconst chat = new Chat({\n  onError(error) {\n    console.error('Chat error:', error)\n  }\n})\n\nfunction handleSubmit(e: Event) {\n  e.preventDefault()\n  chat.sendMessage({ text: input.value })\n  input.value = ''\n}\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CUDashboardPanel>\n    \u003Ctemplate #body>\n      \u003CUContainer>\n        \u003CUChatMessages :messages=\"chat.messages\" :status=\"chat.status\">\n          \u003Ctemplate #content=\"{ message }\">\n            \u003Ctemplate v-for=\"(part, index) in message.parts\" :key=\"index\">\n              \u003CMDC\n                v-if=\"part.type === 'text'\"\n                :value=\"part.text\"\n                :cache-key=\"`${message.id}-${index}`\"\n                unwrap=\"p\"\n              \u002F>\n\n              \u003Cdiv v-else-if=\"part.type === 'reasoning'\">\n                {{ part.state === 'streaming' ? 'Thinking...' : 'Thinking complete' }}\n              \u003C\u002Fdiv>\n\n              \u003Cdiv v-else-if=\"part.type === 'dynamic-tool' && part.toolName === 'addition'\">\n                \u003Ctemplate v-if=\"part.state === 'input-streaming'\">\n                  \u003Ctemplate v-if=\"part.input && (part.input as { a: number; b: number }).a !== undefined && (part.input as { a: number; b: number }).b !== undefined\">\n                    Adding: {{ (part.input as { a: number; b: number }).a }} + {{ (part.input as { a: number; b: number }).b }}\n                  \u003C\u002Ftemplate>\n                  \u003Ctemplate v-else>\n                    Adding...\n                  \u003C\u002Ftemplate>\n                \u003C\u002Ftemplate>\n                \u003Ctemplate v-else>\n                  Addition complete: {{ (part.input as { a: number; b: number }).a }} + {{ (part.input as { a: number; b: number }).b }}\n                \u003C\u002Ftemplate>\n              \u003C\u002Fdiv>\n            \u003C\u002Ftemplate>\n          \u003C\u002Ftemplate>\n        \u003C\u002FUChatMessages>\n      \u003C\u002FUContainer>\n    \u003C\u002Ftemplate>\n\n    \u003Ctemplate #footer>\n      \u003CUContainer>\n        \u003CUChatPrompt v-model=\"input\" :error=\"chat.error\" @submit=\"handleSubmit\">\n          \u003CUChatPromptSubmit :status=\"chat.status\" @stop=\"chat.stop\" @reload=\"chat.regenerate\" \u002F>\n        \u003C\u002FUChatPrompt>\n      \u003C\u002FUContainer>\n    \u003C\u002Ftemplate>\n  \u003C\u002FUDashboardPanel>\n\u003C\u002Ftemplate>\n```\n\nType \"What is 2 + 2?\" in the input field. With the API route running and the environment variables configured, you should receive an answer from the agent.\n\n![Our AI application in action](\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui\u002Fai-app-in-action.webp)\n\nTo verify that the agent used the addition tool, open your browser's developer tools and inspect the event stream from the `\u002Fapi\u002Fchat` request. You should see something like this:\n\n![The Event Stream from the \u002Fapi\u002Fchat endpoint](\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui\u002Fevent-stream.webp)\n\nIt is the same UI message stream we saw with `curl` in the terminal.\n\n## Understanding the chat integration\n\nWe have built an AI application that uses our agent. Here's what connects the frontend to the backend.\n\nFirst, the `\u002Fapi\u002Fchat` response is not the raw output of the model. `toUIMessageStreamResponse` converts the agent's result into a stream designed for a user interface.\n\n`UIMessage` is the interface that defines the structure of a message in an AI application. The frontend does not need to transform the received stream of messages because they are already in the correct format.\n\nThe AI SDK also provides the `Chat` class to manage the chat state. It handles the message stream, appends new messages, sends messages in the correct format with `sendMessage({ text: input.value })`, and manages status and error states.\n\nYou could implement the POST request, streamed response parsing, message updates, cancellation, and error handling yourself. `Chat` handles those details so we can focus on the experience, including showing the tools used, their status, and their input in real time.\n\n## Showing tools\n\nEach message is composed of parts. A user message can have text and file parts, while an assistant message can have text, reasoning, tool-call, and file parts.\n\nUnder the hood, the AI SDK manages these parts while it receives chunks from the server. It assembles text chunks into a message and updates the state of tool-call parts as the agent uses them.\n\nThe `#content` slot in the complete example iterates through these parts. It renders Markdown text, shows when the model is reasoning, and displays the addition tool's progress and input.\n\n::callout{icon=\"i-ph-info-duotone\" color=\"info\"}\nThis approach is flexible, allowing you to easily customize it to fit your needs.\n::\n\nAt the end, it looks like this:\n\n\u003Cfigure>\n  \u003Cvideo autoplay loop muted playsinline>\n    \u003Csource src=\"https:\u002F\u002Fimages.soubiran.dev\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui\u002Fai-application.mp4\" type=\"video\u002Fmp4\">\n  \u003C\u002Fvideo>\n  \u003Cfigcaption>The AI Application in action.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\nShowing the agent's progress gives users confidence that their request is being handled, especially when a tool call takes time. In the final article, we will deploy the application and MCP server to Cloudflare.\n",{"title":5,"description":1903},"ai-agents-and-mcp-server-teaming-up-for-the-agentic-web",{"loc":1909,"images":1914},[1915,1916],{"loc":1779},{"loc":1794},"series\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fa-powerful-ai-application-made-with-nitro-and-nuxt-ui","X8dvyZ-zga9dPu6kkNpOVlYcsFnqmnYR5sRF6wfMXo4",{"overview":1920,"chapters":2029},{"id":1921,"title":1922,"body":1923,"contentId":2008,"date":1902,"description":2009,"extension":1904,"github":2010,"meetTheInstructor":2013,"meta":2014,"navigation":89,"part":1907,"path":2015,"rawbody":2016,"robots":1907,"schemaOrg":1907,"seo":2017,"seriesSlug":1912,"sitemap":2018,"stem":2019,"subtitle":2020,"topics":2021,"__hash__":2028},"series\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web.md","AI Agents and MCP Server: Teaming Up for the Agentic Web",{"type":7,"value":1924,"toc":2005},[1925,1928,1931,1939,1942,1945,1948,1982,1985,1995,1999],[10,1926,1927],{},"Hey 👋,",[10,1929,1930],{},"For months, I've been exploring AI and the latest innovations. I've been fascinated by the idea of chatting with my website, literally chatting with it through an interface like the one you use to talk to a friend on your phone. That idea led me to create AI Agents that can interact with my website and provide users with high-quality, up-to-date, context-aware information.",[10,1932,1933,1934,1938],{},"This series is not about the exact implementation details of my AI Agent. I have already written two articles about that. The first covers ",[17,1935,1937],{"href":1936},"\u002Fposts\u002Fai-agents-will-deeply-transform-our-experience-with-the-web","the rise of AI Agents"," and their potential impact on the web. The second covers the technical implementation of my AI Agent.",[10,1940,1941],{},"Instead, this series focuses on the foundational concepts you need to get started with your own AI Agent and connect it to an MCP server for additional capabilities.",[10,1943,1944],{},"We will not build anything particularly elaborate because the agentic web is still at an early stage. As I mentioned in my article about the rise of AI Agents, everything remains to be built. There are no established patterns or definitive ways of working yet. For now, the best approach is to build, experiment, evaluate, and iterate.",[10,1946,1947],{},"Throughout this series, we will:",[1949,1950,1951,1959,1965,1971,1976],"ol",{},[1952,1953,1954,1958],"li",{},[1955,1956,1957],"strong",{},"Building an AI Agent Made Easy Thanks to the AI SDK",": Using the AI SDK, we'll build our first AI Agent and understand what makes it different from a traditional AI.",[1952,1960,1961,1964],{},[1955,1962,1963],{},"MCP to Provide Additional Capabilities to the AI Agent",": With the official MCP SDK, we'll create an MCP server with a simple tool and interact with it.",[1952,1966,1967,1970],{},[1955,1968,1969],{},"Pairing AI Agents with MCP to Make the Outside World Accessible",": An AI Agent needs tools, so we'll connect the Agent to the MCP server and let it interact with the outside world.",[1952,1972,1973,1975],{},[1955,1974,5],{},": We'll build a user interface that makes it easy to interact with our AI Agent.",[1952,1977,1978,1981],{},[1955,1979,1980],{},"Deploying Our AI Agent to the World Using Cloudflare",": Finally, we'll deploy the AI application and MCP server on Cloudflare. I chose this platform, but you can deploy them wherever you prefer.",[10,1983,1984],{},"By the end, you will have a complete chat interface for talking to your AI Agent, along with all the pieces you need to keep experimenting.",[1773,1986,1874,1987,1874,1992],{},[1876,1988,1878,1989,1874],{"autoPlay":89,"loop":89,"muted":89,"playsInline":89},[1880,1990],{"src":1991,"type":1883},"https:\u002F\u002Fimages.soubiran.dev\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fai-application.mp4",[1781,1993,1994],{},"Our final AI application.",[37,1996,1998],{"id":1997},"chapters","Chapters",[2000,2001],"series-chapters-list",{"className":2002},[2003,2004],"mx-auto","max-w-5xl",{"title":54,"searchDepth":69,"depth":69,"links":2006},[2007],{"id":1997,"depth":69,"text":1998},"76bfa6ec-7e25-4813-a0ae-f4e956e510df","Build an AI application, understand how AI Agents work, and discover how pairing them with an MCP server expands what they can do.",{"name":2011,"repository":2012},"AI Agents and MCP","barbapapazes\u002Fai-agent","For months, I've been fascinated by AI and its potential. I struggled to find the right resources to understand how AI Agents work. After researching and experimenting, I started to grasp the core concepts and I'm excited to share what I learned with you.",{},"\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web","---\ncontentId: 76bfa6ec-7e25-4813-a0ae-f4e956e510df\ntitle: \"AI Agents and MCP Server: Teaming Up for the Agentic Web\"\nsubtitle: Explore the future of the web by building an AI application\ndescription: Build an AI application, understand how AI Agents work, and discover how pairing them with an MCP server expands what they can do.\ndate: 2025-10-07\ntopics:\n  - ai-agents\n  - ai\n  - mcp\n  - agentic-web\n  - nuxt\n  - nuxt-ui\ngithub:\n  name: AI Agents and MCP\n  repository: barbapapazes\u002Fai-agent\nmeetTheInstructor: For months, I've been fascinated by AI and its potential. I struggled to find the right resources to understand how AI Agents work. After researching and experimenting, I started to grasp the core concepts and I'm excited to share what I learned with you.\nseriesSlug: ai-agents-and-mcp-server-teaming-up-for-the-agentic-web\n---\n\nHey 👋,\n\nFor months, I've been exploring AI and the latest innovations. I've been fascinated by the idea of chatting with my website, literally chatting with it through an interface like the one you use to talk to a friend on your phone. That idea led me to create AI Agents that can interact with my website and provide users with high-quality, up-to-date, context-aware information.\n\nThis series is not about the exact implementation details of my AI Agent. I have already written two articles about that. The first covers [the rise of AI Agents](\u002Fposts\u002Fai-agents-will-deeply-transform-our-experience-with-the-web) and their potential impact on the web. The second covers the technical implementation of my AI Agent.\n\nInstead, this series focuses on the foundational concepts you need to get started with your own AI Agent and connect it to an MCP server for additional capabilities.\n\nWe will not build anything particularly elaborate because the agentic web is still at an early stage. As I mentioned in my article about the rise of AI Agents, everything remains to be built. There are no established patterns or definitive ways of working yet. For now, the best approach is to build, experiment, evaluate, and iterate.\n\nThroughout this series, we will:\n\n1. **Building an AI Agent Made Easy Thanks to the AI SDK**: Using the AI SDK, we'll build our first AI Agent and understand what makes it different from a traditional AI.\n2. **MCP to Provide Additional Capabilities to the AI Agent**: With the official MCP SDK, we'll create an MCP server with a simple tool and interact with it.\n3. **Pairing AI Agents with MCP to Make the Outside World Accessible**: An AI Agent needs tools, so we'll connect the Agent to the MCP server and let it interact with the outside world.\n4. **A Powerful AI Application Made with Nitro and Nuxt UI**: We'll build a user interface that makes it easy to interact with our AI Agent.\n5. **Deploying Our AI Agent to the World Using Cloudflare**: Finally, we'll deploy the AI application and MCP server on Cloudflare. I chose this platform, but you can deploy them wherever you prefer.\n\nBy the end, you will have a complete chat interface for talking to your AI Agent, along with all the pieces you need to keep experimenting.\n\n\u003Cfigure>\n  \u003Cvideo autoplay loop muted playsinline>\n    \u003Csource src=\"https:\u002F\u002Fimages.soubiran.dev\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fai-application.mp4\" type=\"video\u002Fmp4\">\n  \u003C\u002Fvideo>\n  \u003Cfigcaption>Our final AI application.\u003C\u002Ffigcaption>\n\u003C\u002Ffigure>\n\n## Chapters\n\n::series-chapters-list\n---\nclass: mx-auto max-w-5xl\n---\n::\n",{"title":1922,"description":2009},{"loc":2015},"series\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web","Explore the future of the web by building an AI application",[2022,2023,2024,2025,2026,2027],"ai-agents","ai","mcp","agentic-web","nuxt","nuxt-ui","3fbdjQUyeN3fzx5NIJ-SVb3udixzleWLpFXsAeV6Tkw",[2030,2036,2042,2049,2051],{"contentId":2031,"title":1957,"description":2032,"path":2033,"part":62,"github":2034,"topics":1907},"9ffbf543-f6d5-45d3-ae35-eb1bfb26843e","AI agents can be mysterious, but they are not as complicated as they seem. Let's prove it with in-depth explanations and examples.","\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fbuilding-an-ai-agent-made-easy-thanks-to-the-ai-sdk",{"branch":2035},"01.building-an-ai-agent-made-easy-thanks-to-the-ai-sdk",{"contentId":2037,"title":1963,"description":2038,"path":2039,"part":69,"github":2040,"topics":1907},"b5dafecc-480c-4954-ac35-836d4e71c7a3","MCP servers are popping up everywhere. Understanding them is key to unlocking the full potential of AI agents.","\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fmcp-to-provide-additional-capabilities-to-the-ai-agent",{"branch":2041},"02.mcp-to-provide-additional-capabilities-to-the-ai-agent",{"contentId":2043,"title":2044,"description":2045,"path":2046,"part":86,"github":2047,"topics":1907},"4c18ff8d-db49-4197-96f9-7ec16756e9cd","Pair AI Agents with MCP to Access the Outside World","AI agents with custom tools are powerful. Connecting an MCP server to an agent unlocks another level of capability.","\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fpair-ai-agents-with-mcp-to-access-the-outside-world",{"branch":2048},"03.pairing-ai-agents-with-mcp-to-make-outside-world-accessible",{"contentId":1901,"title":5,"description":1903,"path":1909,"part":93,"github":2050,"topics":1907},{"branch":1906},{"contentId":2052,"title":1980,"description":2053,"path":2054,"part":99,"github":2055,"topics":1907},"d06af237-adf9-480b-9fd6-51624834efdd","Deploy the AI application and its MCP server on Cloudflare so people can use its capabilities online from any agent.","\u002Fseries\u002Fai-agents-and-mcp-server-teaming-up-for-the-agentic-web\u002Fdeploying-our-ai-agent-to-the-world-using-cloudflare",{"branch":2056},"05.deploying-our-ai-agent-to-the-world-using-cloudflare",1795016695392]