MCP-Client-Server-with-LLM-Command-Execution
Machine Command Processor (MCP) is a client-server system that uses LLMs to convert natural language queries into shell commands.
The Machine Command Processor (MCP) is designed to bridge the gap between natural language processing and command-line operations. It leverages Groq's LLM API to interpret user queries and convert them into executable shell commands. The system is composed of a client that processes user input, a server that executes the commands, and a shared protocol for communication. The client uses WebSocket to communicate with the server, ensuring real-time interaction. The server is responsible for executing commands safely, with built-in checks to prevent the execution of potentially harmful commands. The entire system is asynchronous, utilizing Python's asyncio for efficient operation. Comprehensive logging is implemented to track both client and server activities, providing an audit trail for all operations.
Features
- Natural language to shell command conversion using Groq's LLM API
- WebSocket-based client-server communication
- Command execution safety checks
- Comprehensive logging system
- Asynchronous operation using Python's asyncio
Usage with Different Platforms
Start the server
bash
python mcp_server.py
Start the client
bash
python mcp_client.py
Enter natural language queries
Enter your query: list all files in the current directory
Related MCP Servers
View all os_automation servers →DesktopCommanderMCP
by wonderwhy-er
Desktop Commander MCP is a tool that allows users to search, update, manage files, and run terminal commands using AI, without incurring API token costs.
Daytona
by daytonaio
Daytona MCP Server allows AI agents to manage and interact with Daytona sandboxes, execute commands, perform file operations, and generate preview links for web applications.
mcp-server-and-gw
by boilingdata
The MCP Gateway, Server, and Client provide a bridge from stdio to HTTP SSE endpoints, facilitating communication between local and remote servers.
Cua Agent
by trycua
cua-mcp-server is a Model Context Protocol (MCP) server for the Computer-Use Agent (CUA), enabling integration with Claude Desktop and other MCP clients.
apple-mcp
by supermemoryai
This is a collection of Apple-native tools for the Model Context Protocol (MCP) that integrates with various Apple applications to automate tasks and manage communications.
mcp-datetime
by ZeparHyfar
A datetime formatting service implemented as an MCP server for the Claude Desktop Application.
fastapi_mcp
by tadata-org
FastAPI-MCP is a tool that allows you to expose your FastAPI endpoints as Model Context Protocol (MCP) tools with built-in authentication.