Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Beyond Prompts: Building Intelligent Applicatio...

Beyond Prompts: Building Intelligent Applications with Genkit and the Model Context Protocol

LLMs have democratized AI, making it more accessible for everyone. But today’s chat bots still feel very disconnected. Wouldn’t it be great if you could use AI to tap into your personal knowledge and data, and use it to drive the tools you already know and love? Imagine using a chat bot to create your next pitch deck, or generating bespoke 3D scenes for your next home decoration project using inexpensive tools like Blender. In this talk, I’ll show you how this is possible with tools like Genkit and MPC, the Model Context Protocol.

You will learn:

* What Genkit is and how its key abstractions make building AI apps easier and faster
* How you can leverage MCP to allow LLMs to interact with existing apps and systems
* How to architect intelligent applications that orchestrate complex tasks by connecting to and reusing your existing APIs, data sources, and specialised tools.

I will even demo an agentic app built using Genkit, MCP, Swift, and Keynote that you can use to craft presentation decks using just natural language – including doing the research!

Avatar for Peter Friese

Peter Friese

June 02, 2025
Tweet

More Decks by Peter Friese

Other Decks in Technology

Transcript

  1. @peterfriese.dev Created by Mamank from Noun Project https: //peterfriese.dev peterfriese

    Peter Friese, Staff Developer Relations Engineer, Google Beyond Prompts Building Intelligent Applications with Genkit and the Model Context Protocol
  2. LLM Enterprise data (e.g. product catalog) User data (e.g. personal

    knowledge) Created by iconfield from Noun Project APIs Apps
  3. LLM Enterprise data (e.g. product catalog) User data (e.g. personal

    knowledge) Created by iconfield from Noun Project APIs Apps Retrieval Augmented Generation (RAG) Tool calling
  4. LLM A Calendar Drive Weather Calendar Tool Drive Tool Weather

    Tool LLM A Calendar Tool Drive Tool Weather Tool Tool calling
  5. Host application (Claude / IDE / Genkit) MCP Server A

    Data Source A MCP Server B Data Source B Remote Service C MCP Server C Internet Local system MCP protocol (stdio / SSE / custom)
  6. const server = new McpServer({ name: "helloworld", version: "1.0.0", capabilities:

    { resources: {}, tools: {}, }, }); Registering a server
  7. server.tool( "say-hello", "Say hello to the world", { name: z.string().describe("Name

    of the person to say hello to"), }, async ({ name }) => { const stateCode = name.toUpperCase(); const message = `Hello, ${name}!`; return { content: [ { type: "text", text: message, }, ], Registering a tool Register the tool
  8. server.tool( "say-hello", "Say hello to the world", { name: z.string().describe("Name

    of the person to say hello to"), }, async ({ name }) => { const stateCode = name.toUpperCase(); const message = `Hello, ${name}!`; return { content: [ { type: "text", text: message, }, ], Registering a tool Name and description
  9. server.tool( "say-hello", "Say hello to the world", { name: z.string().describe("Name

    of the person to say hello to"), }, async ({ name }) => { const stateCode = name.toUpperCase(); const message = `Hello, ${name}!`; return { content: [ { type: "text", text: message, }, ], Registering a tool Input parameters and description
  10. server.tool( "say-hello", "Say hello to the world", { name: z.string().describe("Name

    of the person to say hello to"), }, async ({ name }) => { const stateCode = name.toUpperCase(); const message = `Hello, ${name}!`; return { content: [ { type: "text", text: message, }, ], Registering a tool Tool function
  11. async function main() { const transport = new StdioServerTransport(); await

    server.connect(transport); console.error("Hello World MCP Server running on stdio"); } Connecting the transport Transport
  12. const calendarClient = mcpClient({ name: 'calendar', serverProcess: { command: 'npx',

    "args": [ "-y", "supergateway", "--sse", “https: //mcp.pipedream.net/a.......-82/google_calendar” ] }, }); Register MCP client for the MCP server
  13. --- model: googleai/gemini-2.0-flash tools: [getCurrencyConversionRate, 'calendar/GOOGLE_CALENDAR-LIST-EVENTS'] input: schema: expenses: string

    --- Generate a report of the expenses from the following input. Make sure to normalise the currency to EUR. Use ISO date format. Include the total amount of expenses in EUR. Use the 'calendar/GOOGLE_CALENDAR-LIST-EVENTS' tool to find out if the user went on any trips around the time of the expense receipts. If they did, try to use the details of the calendar events to determine the trip purpose and the destination, and use them as the title and destination field in the final report. Return the report in Markdown format, with a table of the expenses. Use the following columns: Enhance the prompt
  14. --- model: googleai/gemini-2.0-flash tools: [getCurrencyConversionRate, 'calendar/GOOGLE_CALENDAR-LIST-EVENTS'] input: schema: expenses: string

    --- Generate a report of the expenses from the following input. Make sure to normalise the currency to EUR. Use ISO date format. Include the total amount of expenses in EUR. Use the 'calendar/GOOGLE_CALENDAR-LIST-EVENTS' tool to find out if the user went on any trips around the time of the expense receipts. If they did, try to use the details of the calendar events to determine the trip purpose and the destination, and use them as the title and destination field in the final report. Return the report in Markdown format, with a table of the expenses. Use the following columns: Enhance the prompt