Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

semantic-kernel-playwright-mcp

MCP.Pizza Chef: akshaykokane

The semantic-kernel-playwright-mcp server integrates Microsoft Semantic Kernel with the Model Context Protocol using Playwright to enable AI-powered web browsing and content summarization. It automates browser interactions, leverages Semantic Kernel's function calling, and summarizes news content from Bing using Azure OpenAI models like GPT-4. This server demonstrates advanced AI-driven workflows combining browsing simulation and natural language processing.

Use This MCP server To

Automate web browsing with AI-driven navigation and interaction Summarize news articles from Bing using AI-generated content Demonstrate automatic function calling with Semantic Kernel Integrate AI browsing capabilities into MCP workflows Extract and summarize web content for research or analysis Combine browser simulation with AI for dynamic data retrieval

README

Semantic Kernel + Playwright MCP Server Demo

๐Ÿš€ Welcome to the MCP + Semantic Kernel Demo App!

This project demonstrates how to combine Microsoft Semantic Kernel with the Model Context Protocol (MCP) server using Playwright to enable AI-driven browsing and summarization capabilities.

It uses:

  • Azure OpenAI (GPT-4)
  • Semantic Kernel Function Calling
  • Playwright MCP Server
  • Automatic browser interaction
  • Bing News summarization using AI

๐Ÿ”ง Features

  • Uses Semantic Kernel to interact with AI functions
  • Leverages Playwright MCP server to simulate browser-like capabilities
  • Demonstrates automatic function calling
  • Summarizes AI-related news from Bing by navigating and extracting content

๐Ÿง  Prerequisites

Ensure you have the following:

  • .NET 8.0 SDK or newer
  • Azure OpenAI resource (with deployed model like gpt-4-1106-preview)
  • Access to Bing News (public)
  • Playwright installed via npx
  • MCP Server libraries (ModelContextProtocol)

๐Ÿ“ฆ Setup

  1. Clone the Repository

    git clone https://github.com/yourusername/semantic-kernel-playwright-mcp.git
    cd semantic-kernel-playwright-mcp
  2. Install Dependencies Make sure to restore NuGet packages.

  3. Configure Azure OpenAI Replace the following placeholders in Program.cs:

    builder.AddAzureOpenAIChatCompletion(
        "GPT4ov1", 
        "https://<replace>.openai.azure.com", 
        "<replacewithkey>");
  4. Ensure Playwright MCP is Installed

    npx -y @playwright/mcp@latest

โ–ถ๏ธ Run the App

dotnet run

You'll see output like:

Welcome to My MCP + Semantic Kernel Demo App!
Running application logic...

Summarize AI news for me related to MCP on bing news. Open first link and summarize content
> <summarized result here>

โ–ถ๏ธ Output

Demo of the app in action


๐Ÿง  How It Works

  1. Initializes the Semantic Kernel with Azure OpenAI.
  2. Starts a Playwright MCP Server in stdio mode.
  3. Maps MCP actions (like open page, extract content) to SK functions.
  4. Invokes a natural language prompt to fetch and summarize news content.
  5. Uses automatic function calling to delegate the task to the browser.

๐Ÿ›  Code Highlights

  • GetMCPClientForPlaywright() creates an MCP client using Playwright.
  • MapToFunctionsAsync() integrates MCP capabilities into Semantic Kernel.
  • Prompts like "Summarize AI news..." trigger both browsing and summarization.

๐Ÿงช Example Use Case

You can modify the prompt to:

var prompt = "Search GitHub for latest Semantic Kernel issues and summarize the top 3.";

๐Ÿ“ Project Structure

โ”œโ”€โ”€ Program.cs
โ”œโ”€โ”€ AzureAIAgentServiceDemo.csproj
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ ...

๐Ÿ“Œ Future Ideas

  • Add UI using Blazor or Console enhancements
  • Integrate multi-turn conversations using AgentGroupChat
  • Extend MCP to handle screenshots or downloads

๐Ÿค Contributing

Feel free to fork, enhance, or suggest improvements via pull requests!


๐Ÿ“œ License

MIT License. See LICENSE file for details.


Let me know if you'd like to include diagrams or badge-style highlights too!

semantic-kernel-playwright-mcp FAQ

How does this server integrate Semantic Kernel with MCP?
It uses Semantic Kernel's AI function calling combined with Playwright MCP server to enable AI-driven browsing and summarization.
What prerequisites are needed to run this server?
You need .NET 8.0 SDK or newer, an Azure OpenAI resource with a deployed model like GPT-4, Playwright installed, and access to Bing News.
Can this server automate browser interactions?
Yes, it uses Playwright to simulate browser actions automatically based on AI instructions.
Which AI models does this server support?
It primarily supports Azure OpenAI models like GPT-4, but can be adapted for other providers such as Claude and Gemini.
What kind of content can it summarize?
It can summarize AI-related news and other web content extracted during browsing sessions.
Is this server suitable for real-time AI browsing tasks?
Yes, it enables real-time AI-driven browsing and content extraction within MCP workflows.
How does automatic function calling work here?
Semantic Kernel triggers AI functions automatically based on browsing context and content needs.
Can this server be extended to other websites beyond Bing News?
Yes, the Playwright integration allows browsing and interaction with various web pages for content extraction.