超越Windsurf+Cursor!重磅更新!Cline+Gemini 2.0轻松实现零代码开发MCP Server!打造最强Claude AI Agent!LangFlow为Claude实现RAG!
🔥🔥🔥本篇笔记所对应的视频 https://youtu.be/7BFMY0yuRAY
✅Claude桌面版进化:再也不用写代码!用cline一键开发Claude MCP工具,整合LangFlow实现文档智能检索,小白也能轻松上手!让AI理解PDF、回答新闻、查天气!
✅本期视频详细展示了如何在不写一行代码的情况下,使用Cline 插件开发Claude MCP Server。具体内容包括:
1️⃣使用Cline插件的最新版开发MCP Server,无需编写代码。最新版Cline支持谷歌最新的大语言模型Gemini 2.0。
2️⃣演示了用Cline开发一个能查询天气预报的MCP Server,并在Claude的桌面版中测试。
3️⃣演示了用Cline开发一个带网络搜索功能的MCP Server,使用Serp API来搜索新闻。通过编写提示词实现,全程无需编写代码。
4️⃣演示了用Cline开发一个能调用LangFlow实现检索增强生成的MCP Server。在LangFlow中建立工作流,使用FAISS向量数据库和Nvidia提供的嵌入模型。然后通过编写提示词在Cline中实现与LangFlow的对接。
5️⃣通过这些案例,展示了利用Cline插件,哪怕是不懂编程的小白,也能轻松开发出功能强大的MCP Server,大大提高文件检索效率和处理能力。而这一切都是通过编写提示词实现的,全程不需要编写代码。
✅天气预报+MCP
✅RAG+MCP 【langflow】
✅搜索引擎+MCP 【serpapi】
✅serp api https://serpapi.com/dashboard
Prompt
Add a tool that can extract the top 10 search results from DuckDuckGo.
Please add this tool to the Claude Desktop AppSearch for the latest AI news from DuckDuckGo."...fetches Jira tickets": Get ticket ACs and put Cline to work
"...manages AWS EC2s": Check server metrics and scale up or down
"...pulls PagerDuty incidents": Pulls details to help Cline fix bugs
天气预报示例
#链接 https://openweathermap.org/
Add a tool that can help get weather forecast information. Below is the API link and an example of the response content:API Link:
https://api.openweathermap.org/data/2.5/weather?lat=44.34&lon=10.99&appid=a2b8512c08d3ee7407e25a2f5f03cbc8
Response Content:
{
"coord": {
"lon": 10.99,
"lat": 44.34
},
"weather": [
{
"id": 804,
"main": "Clouds",
"description": "overcast clouds",
"icon": "04d"
}
],
"base": "stations",
"main": {
"temp": 275.74,
"feels_like": 275.74,
"temp_min": 272.16,
"temp_max": 277.08,
"pressure": 1030,
"humidity": 91,
"sea_level": 1030,
"grnd_level": 959
},
"visibility": 6446,
"wind": {
"speed": 1.15,
"deg": 35,
"gust": 1.51
},
"clouds": {
"all": 99
},
"dt": 1734081976,
"sys": {
"type": 2,
"id": 2004688,
"country": "IT",
"sunrise": 1734072230,
"sunset": 1734104225
},
"timezone": 3600,
"id": 3163858,
"name": "Zocca",
"cod": 200
}
🔥🔥🔥如有问题,请联系我的徽信 stoeng
🔥🔥🔥本项目代码由AI超元域频道制作,观看更多大模型微调视频请访问我的频道⬇
👉👉👉我的哔哩哔哩频道
👉👉👉我的YouTube频道
👉👉👉我的开源项目 https://github.com/win4r/AISuperDomain
充值openai api key或者ChatGPT会员可以使用wildcard虚拟卡充值。wildcard官方链接:
wildcard注册教程和充值API教程(国内打开速度快):
wildcard注册教程和充值API教程(海外打开速度快):
https://stoeng.medium.com/保姆级教程-通过wildcard虚拟信用卡订阅chatgpt-claude会员和api-百分百可用-a2865a18df01
Google News API
✅https://serpapi.com/google-news-api
Add a tool that can search for news from Google News using the SERP API. The tool should process the retrieved results to extract key information, such as the title, source, publication date, and link for each news article. The extracted data should then be used to generate a contextually accurate and detailed response to the user's query.
The following is an example of how to use the SERP API with a cURL command. It includes an example request and response to demonstrate the expected input and output format.Request:curl --get https://serpapi.com/search \
-d engine="google_news" \
-d q="pizza" \
-d gl="us" \
-d hl="en" \
-d api_key="daafd52eec6092450963a1910b9be1adae39cb245a25afc7821a0c32335ec7b4"Response:{
"search_metadata": {
"id": "6734b33796b8f8a59b244ae1",
"status": "Success",
"json_endpoint": "https://serpapi.com/searches/87b042ba1547994d/6734b33796b8f8a59b244ae1.json",
"created_at": "2024-11-13 14:09:59 UTC",
"processed_at": "2024-11-13 14:09:59 UTC",
"google_news_url": "https://news.google.com/search?q=pizza&hl=en&gl=US",
"raw_html_file": "https://serpapi.com/searches/87b042ba1547994d/6734b33796b8f8a59b244ae1.html",
"total_time_taken": 1.62
},
"search_parameters": {
"engine": "google_news",
"gl": "us",
"hl": "en",
"q": "pizza"
},
"news_results": [
{
"position": 1,
"title": "Industrial Taphouse owners opening Steampunk Pizza in Ashland",
"source": {
"name": "RichmondBizSense",
"icon": "https://encrypted-tbn0.gstatic.com/faviconV2?url=https://richmondbizsense.com&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
"authors": [
"Mike Platania"
]
},
"link": "https://richmondbizsense.com/2024/11/12/industrial-taphouse-owners-opening-steampunk-pizza-in-ashland/",
"thumbnail": "https://richmondbizsense.com/wp-content/uploads/2024/11/steampunk-pizza1-Cropped.jpg",
"thumbnail_small": "https://news.google.com/api/attachments/CC8iI0NnNDVjM3BhYjFwZlJreG1aV05ZVFJDb0FSaXNBaWdCTWdB",
"date": "11/12/2024, 09:03 AM, +0200 EET"
},
{
"position": 2,
"title": "A Top LA Pizzeria Makes a Big Move to the Westside Next Year",
"source": {
"name": "Eater LA",
"icon": "https://lh3.googleusercontent.com/Etyvq1qAM7RUdeLuULrKii11AFXQoHHgNx5bKBWLlByYuMa91G3F-EC2J0Qv_xQSCVh8agge",
"authors": [
"Matthew Kang"
]
},
"link": "https://la.eater.com/2024/11/11/24293844/pizzeria-sei-william-joo-moving-palms-los-angeles",
"thumbnail": "https://cdn.vox-cdn.com/thumbor/VasMxoW8YdbQK21KtDos_W_3ar8=/0x0:4032x3024/1200x800/filters:focal(1873x937:2517x1581)/cdn.vox-cdn.com/uploads/chorus_image/image/73716446/PXL_20220216_204449626.PORTRAIT.0.jpg",
"thumbnail_small": "https://news.google.com/api/attachments/CC8iK0NnNWlORlZtT0RWM1VsTnpObTV4VFJDM0FSaVRBaWdCTWdhQkFZejBBQTA",
"date": "11/12/2024, 01:27 AM, +0200 EET"
},
{
"position": 3,
"title": "Best Bites | Homemade sauce and loaded toppings makes this pizza place a favorite in Appleton",
"source": {
"name": "Post-Crescent",
"icon": "https://encrypted-tbn0.gstatic.com/faviconV2?url=https://www.postcrescent.com&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
"authors": [
"Jelissa Burns"
]
},
"link": "https://www.postcrescent.com/story/life/food/2024/11/13/stucs-pizza-is-known-for-its-award-winning-pizza-and-calzones/75823785007/",
"thumbnail": "https://www.postcrescent.com/gcdn/authoring/authoring-images/2024/10/25/PAPN/75841461007-apc-stucs-pizza-1010240313-djp-1.jpg?width=660&height=440&fit=crop&format=pjpg&auto=webp",
"thumbnail_small": "https://news.google.com/api/attachments/CC8iK0NnNXBWMDF3WmtZM1JtWktUMFJUVFJDM0FSaVRBaWdCTWdZQlI0eUduZ2c",
"date": "11/13/2024, 01:01 PM, +0200 EET"
},
...
],
"menu_links": [
{
"title": "U.S.",
"topic_token": "CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE",
"serpapi_link": "https://serpapi.com/search.json?engine=google_news&gl=us&topic_token=CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE"
},
...
]
}
LangFlow
python -m pip install langflow
python -m langflow run
FAISS路径
/Users/charlesqin/Downloads/testfaiss/
cURL
Add a tool that retrieves relevant search results from an API, processes the results to extract information, and uses the extracted data to generate a contextually accurate and detailed response to the user's query. The tool should integrate retrieval and response generation in a Retrieval-Augmented Generation (RAG) workflow.
The following is an example of how to use the API with a cURL command. It includes an example request and response to demonstrate the expected input and output format.
cURL:curl -X POST \
"http://127.0.0.1:7860/api/v1/run/da021761-1feb-4b45-bd28-148dcd3693b5?stream=false" \
-H 'Content-Type: application/json'\
-d '{"input_value": "message",# Query content
"output_type": "chat",
"input_type": "chat",
"tweaks": {
"ChatInput-UF6l2": {},
"ParseData-ezHSd": {},
"Prompt-Zl6V5": {},
"SplitText-yHqNN": {},
"ChatOutput-iQnhL": {},
"File-msFnr": {},
"NVIDIAEmbeddingsComponent-SU7Lm": {},
"NVIDIAEmbeddingsComponent-PmCRD": {},
"FAISS-EDe30": {},
"FAISS-JheoQ": {},
"NVIDIAModelComponent-vd9j8": {}
}}'
Example:curl -X POST \
"http://127.0.0.1:7860/api/v1/run/da021761-1feb-4b45-bd28-148dcd3693b5?stream=false" \
-H 'Content-Type: application/json'\
-d '{"input_value": "provide some examples of Self-Consistency Prompt",
"output_type": "chat",
"input_type": "chat",
"tweaks": {
"ChatInput-UF6l2": {},
"ParseData-ezHSd": {},
"Prompt-Zl6V5": {},
"SplitText-yHqNN": {},
"ChatOutput-iQnhL": {},
"File-msFnr": {},
"NVIDIAEmbeddingsComponent-SU7Lm": {},
"NVIDIAEmbeddingsComponent-PmCRD": {},
"FAISS-EDe30": {},
"FAISS-JheoQ": {},
"NVIDIAModelComponent-vd9j8": {}
}}'
Response:
{"session_id":"da021761-1feb-4b45-bd28-148dcd3693b5","outputs":[{"inputs":{"input_value":"provide some examples of Self-Consistency Prompt"},"outputs":[{"results":{"message":{"text_key":"text","data":{"timestamp":"2024-12-14T07:05:58","sender":"Machine","sender_name":"AI","session_id":"da021761-1feb-4b45-bd28-148dcd3693b5","text":"Here are some examples of Self-Consistency Prompt:\n\n1. **Text Generation**: \"Generate a product review that is consistent with the following product information [insert product information]\"\n2. **Text Summarization**: \"Summarize the following news article in a way that is consistent with the information provided [insert news article]\"\n3. **Text Completion**: \"Complete the following sentence by selecting one of the following options: [insert sentence] [insert option 1] [insert option 2] [insert option 3]\"\n4. **Question Answering**: \"Answer the following question by selecting one of the following options: [insert question] [insert option 1] [insert option 2] [insert option 3]\"\n5. **Sentiment Analysis**: \"Classify the following text as positive, neutral or negative by selecting one of the following options: [insert text] [positive] [neutral] [negative]\"\n6. **Knowledge Integration**: \"Integrate the following information with the existing knowledge about [specific topic]: [insert new information]\"\n7. **Connecting pieces of information**: \"Connect the following pieces of information in a way that is relevant and logical: [insert information 1] [insert information 2]\"\n8. **Updating existing knowledge**: \"Update the existing knowledge about [specific topic] with the following information: [insert new information]\"\n\nThese examples illustrate how the Self-Consistency Prompt can be used to ensure that the output of ChatGPT is consistent with the input provided, and to perform various tasks such as text generation, summarization, completion, and analysis.","files":[],"error":false,"edit":false,"properties":{"text_color":"","background_color":"","edited":false,"source":{"id":"NVIDIAModelComponent-vd9j8","display_name":"NVIDIA","source":"meta/llama-3.1-70b-instruct"},"icon":"NVIDIA","allow_markdown":false,"state":"complete","targets":[]},"category":"message","content_blocks":[],"id":"8d81c6c1-061b-432a-b14f-746e65390b36","flow_id":"da021761-1feb-4b45-bd28-148dcd3693b5"},"default_value":"","text":"Here are some examples of Self-Consistency Prompt:\n\n1. **Text Generation**: \"Generate a product review that is consistent with the following product information [insert product information]\"\n2. **Text Summarization**: \"Summarize the following news article in a way that is consistent with the information provided [insert news article]\"\n3. **Text Completion**: \"Complete the following sentence by selecting one of the following options: [insert sentence] [insert option 1] [insert option 2] [insert option 3]\"\n4. **Question Answering**: \"Answer the following question by selecting one of the following options: [insert question] [insert option 1] [insert option 2] [insert option 3]\"\n5. **Sentiment Analysis**: \"Classify the following text as positive, neutral or negative by selecting one of the following options: [insert text] [positive] [neutral] [negative]\"\n6. **Knowledge Integration**: \"Integrate the following information with the existing knowledge about [specific topic]: [insert new information]\"\n7. **Connecting pieces of information**: \"Connect the following pieces of information in a way that is relevant and logical: [insert information 1] [insert information 2]\"\n8. **Updating existing knowledge**: \"Update the existing knowledge about [specific topic] with the following information: [insert new information]\"\n\nThese examples illustrate how the Self-Consistency Prompt can be used to ensure that the output of ChatGPT is consistent with the input provided, and to perform various tasks such as text generation, summarization, completion, and analysis.","sender":"Machine","sender_name":"AI","files":[],"session_id":"da021761-1feb-4b45-bd28-148dcd3693b5","timestamp":"2024-12-14T07:05:58Z","flow_id":"da021761-1feb-4b45-bd28-148dcd3693b5","error":false,"edit":false,"properties":{"text_color":"","background_color":"","edited":false,"source":{"id":"NVIDIAModelComponent-vd9j8","display_name":"NVIDIA","source":"meta/llama-3.1-70b-instruct"},"icon":"NVIDIA","allow_markdown":false,"state":"complete","targets":[]},"category":"message","content_blocks":[]}},"artifacts":{"message":"Here are some examples of Self-Consistency Prompt:\n\n1. **Text Generation**: \"Generate a product review that is consistent with the following product information [insert product information]\"\n\n2. **Text Summarization**: \"Summarize the following news article in a way that is consistent with the information provided [insert news article]\"\n\n3. **Text Completion**: \"Complete the following sentence by selecting one of the following options: [insert sentence] [insert option 1] [insert option 2] [insert option 3]\"\n\n4. **Question Answering**: \"Answer the following question by selecting one of the following options: [insert question] [insert option 1] [insert option 2] [insert option 3]\"\n\n5. **Sentiment Analysis**: \"Classify the following text as positive, neutral or negative by selecting one of the following options: [insert text] [positive] [neutral] [negative]\"\n\n6. **Knowledge Integration**: \"Integrate the following information with the existing knowledge about [specific topic]: [insert new information]\"\n\n7. **Connecting pieces of information**: \"Connect the following pieces of information in a way that is relevant and logical: [insert information 1] [insert information 2]\"\n\n8. **Updating existing knowledge**: \"Update the existing knowledge about [specific topic] with the following information: [insert new information]\"\n\nThese examples illustrate how the Self-Consistency Prompt can be used to ensure that the output of ChatGPT is consistent with the input provided, and to perform various tasks such as text generation, summarization, completion, and analysis.","sender":"Machine","sender_name":"AI","files":[],"type":"object"},"outputs":{"message":{"message":{"timestamp":"2024-12-14T07:05:58","sender":"Machine","sender_name":"AI","session_id":"da021761-1feb-4b45-bd28-148dcd3693b5","text":"Here are some examples of Self-Consistency Prompt:\n\n1. **Text Generation**: \"Generate a product review that is consistent with the following product information [insert product information]\"\n2. **Text Summarization**: \"Summarize the following news article in a way that is consistent with the information provided [insert news article]\"\n3. **Text Completion**: \"Complete the following sentence by selecting one of the following options: [insert sentence] [insert option 1] [insert option 2] [insert option 3]\"\n4. **Question Answering**: \"Answer the following question by selecting one of the following options: [insert question] [insert option 1] [insert option 2] [insert option 3]\"\n5. **Sentiment Analysis**: \"Classify the following text as positive, neutral or negative by selecting one of the following options: [insert text] [positive] [neutral] [negative]\"\n6. **Knowledge Integration**: \"Integrate the following information with the existing knowledge about [specific topic]: [insert new information]\"\n7. **Connecting pieces of information**: \"Connect the following pieces of information in a way that is relevant and logical: [insert information 1] [insert information 2]\"\n8. **Updating existing knowledge**: \"Update the existing knowledge about [specific topic] with the following information: [insert new information]\"\n\nThese examples illustrate how the Self-Consistency Prompt can be used to ensure that the output of ChatGPT is consistent with the input provided, and to perform various tasks such as text generation, summarization, completion, and analysis.","files":[],"error":false,"edit":false,"properties":{"text_color":"","background_color":"","edited":false,"source":{"id":"NVIDIAModelComponent-vd9j8","display_name":"NVIDIA","source":"meta/llama-3.1-70b-instruct"},"icon":"NVIDIA","allow_markdown":false,"state":"complete","targets":[]},"category":"message","content_blocks":[],"id":"8d81c6c1-061b-432a-b14f-746e65390b36","flow_id":"da021761-1feb-4b45-bd28-148dcd3693b5"},"type":"object"}},"logs":{"message":[]},"messages":[{"message":"Here are some examples of Self-Consistency Prompt:\n\n1. **Text Generation**: \"Generate a product review that is consistent with the following product information [insert product information]\"\n\n2. **Text Summarization**: \"Summarize the following news article in a way that is consistent with the information provided [insert news article]\"\n\n3. **Text Completion**: \"Complete the following sentence by selecting one of the following options: [insert sentence] [insert option 1] [insert option 2] [insert option 3]\"\n\n4. **Question Answering**: \"Answer the following question by selecting one of the following options: [insert question] [insert option 1] [insert option 2] [insert option 3]\"\n\n5. **Sentiment Analysis**: \"Classify the following text as positive, neutral or negative by selecting one of the following options: [insert text] [positive] [neutral] [negative]\"\n\n6. **Knowledge Integration**: \"Integrate the following information with the existing knowledge about [specific topic]: [insert new information]\"\n\n7. **Connecting pieces of information**: \"Connect the following pieces of information in a way that is relevant and logical: [insert information 1] [insert information 2]\"\n\n8. **Updating existing knowledge**: \"Update the existing knowledge about [specific topic] with the following information: [insert new information]\"\n\nThese examples illustrate how the Self-Consistency Prompt can be used to ensure that the output of ChatGPT is consistent with the input provided, and to perform various tasks such as text generation, summarization, completion, and analysis.","sender":"Machine","sender_name":"AI","session_id":"da021761-1feb-4b45-bd28-148dcd3693b5","component_id":"ChatOutput-iQnhL","files":[],"type":"message"}],"component_display_name":"Chat Output","component_id":"ChatOutput-iQnhL","used_frozen_result":false}]}]}%
检索prompt
Query some examples of Self-Consistency Prompt from rag-server