
语义内核Playwright
STDIO使用语义内核和Playwright的AI网页浏览与摘要
使用语义内核和Playwright的AI网页浏览与摘要
🚀 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:
Ensure you have the following:
gpt-4-1106-preview
)npx
Clone the Repository
git clone https://github.com/yourusername/semantic-kernel-playwright-mcp.git cd semantic-kernel-playwright-mcp
Install Dependencies Make sure to restore NuGet packages.
Configure Azure OpenAI
Replace the following placeholders in Program.cs
:
builder.AddAzureOpenAIChatCompletion( "GPT4ov1", "https://<replace>.openai.azure.com", "<replacewithkey>");
Ensure Playwright MCP is Installed
npx -y @playwright/mcp@latest
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>
GetMCPClientForPlaywright()
creates an MCP client using Playwright.MapToFunctionsAsync()
integrates MCP capabilities into Semantic Kernel.You can modify the prompt to:
var prompt = "Search GitHub for latest Semantic Kernel issues and summarize the top 3.";
├── Program.cs
├── AzureAIAgentServiceDemo.csproj
├── README.md
└── ...
AgentGroupChat
Feel free to fork, enhance, or suggest improvements via pull requests!
MIT License. See LICENSE file for details.
Let me know if you'd like to include diagrams or badge-style highlights too!