Sentinel-Core-Agent
If you are the rightful owner of Sentinel-Core-Agent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This document provides a summary of the `client.py` and `server.py` files from a repository related to MCP applications.
The `client.py` and `server.py` files are integral components of an MCP (Microservice Communication Protocol) application. The `client.py` file manages the interaction between a user, an LLM (Language Model), and various tools, orchestrating a chat session where the LLM can use tools to answer user queries. It handles server connections, tool execution with retries, and communication with the LLM provider. The `server.py` file implements an MCP server with various tools, including file system operations, web scraping, and AI-powered search, using the `fastmcp` library to create and run the server. The server is capable of handling tool calls from the client, performing operations like file reading/writing, web scraping, and vector-based search.
Features
- Configuration Management: Loads environment variables and server configurations from a JSON file.
- Tool Execution: Executes tools with a retry mechanism and manages tool properties.
- LLM Communication: Manages communication with LLMs using Azure OpenAI or Google Gemini models.
- Web Scraping: Includes tools for web scraping and AI-powered search.
- Vector-based Search: Supports vector-based search using embedding models.
Tools
is_file_folder_present
Checks if a file or folder exists in the file system.
cur_datetimetime
Returns the current date and time.
browser_ai_search
Searches the web using an AI agent and returns the response.
read_file
Reads the content of a file.
write_file
Writes content to a file.
web_page_scrapper
Scrapes a webpage and returns the content in markdown format.
get_all_vector_indexes
Retrieves all vector embedding indexes in the current directory.
search_via_index
Searches a query via a vector embedding index.