
mcp projects
一个集成了天气查询和网络搜索功能的智能聊天机器人。
Repository Info
About This Server
一个集成了天气查询和网络搜索功能的智能聊天机器人。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Multi-Function Assistant
A Chainlit-powered chatbot that provides both weather information and web search capabilities in a single, intuitive interface.
Features
- Weather Information: Get current weather conditions or forecasts for any location
- Web Search: Find information on any topic using Google Search integration
- Combined Queries: Ask for both weather and search results in a single question
- Debug Mode: View the assistant's reasoning process (optional)
Demo
!Multi-Function Assistant Demo
Installation
Prerequisites
- Python 3.8+
- API keys for:
- OpenAI
- WeatherAPI.com
- RapidAPI (Google Search)
Setup
-
Clone the repository:
git clone https://github.com/yourusername/multi-function-assistant.git cd multi-function-assistant -
Install the required dependencies:
pip install -r requirements.txt -
Create a
.envfile in the project root with your API keys:OPENAI_API_KEY=your_openai_api_key WEATHER_API_KEY=your_weatherapi_key RAPID_API_KEY=your_rapidapi_key
Usage
Run the application with:
chainlit run app.py
Then open your browser and navigate to http://localhost:8000 to interact with the assistant.
Example Queries
- "What's the weather in Tokyo?"
- "Search for artificial intelligence news"
- "Tell me about the forecast in Paris and lookup tourist attractions there"
Architecture
The application follows a Model Context Protocol (MCP) architecture:
- Input Analysis: Parses user queries to identify intent (weather, search, or both)
- Tool Execution: Calls the appropriate external APIs based on the identified intent
- Context Building: Combines the original query with API responses
- Response Generation: Uses OpenAI's GPT model to generate natural language responses
- Context Management: Maintains conversation history for continuity
Configuration
You can modify the following variables in app.py:
DEBUG_MODE: Set toTrueto view the assistant's reasoning process,Falseto hide it- Weather and Search API endpoints and parameters
Dependencies
chainlit: For the chat interfaceopenai: For natural language processingrequests: For API callspython-dotenv: For environment variable management
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Quick Start
Clone the repository
git clone https://github.com/rohithreddy66666/mcp-projectsInstall dependencies
cd mcp-projects
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.