stela-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@stela-mcplist files in /home/user/project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
STeLA MCP
A Python implementation of a Model Context Protocol server that provides secure access to local system operations via a standardized API interface.
STeLA (Simple Terminal Language Assistant) MCP is a lightweight server that provides secure access to local machine commands and file operations via a standardized API interface. It acts as a bridge between applications and your local system, implementing the Model Context Protocol (MCP) architecture.
Overview
STeLA MCP implements the Model Context Protocol (MCP) architecture to provide a secure, standardized way for applications to execute commands and perform file operations on a local machine. It serves as an intermediary layer that accepts requests through a well-defined API, executes operations in a controlled environment, and returns formatted results.
Related MCP server: Command Executor MCP Server
Features
Command Execution: Run shell commands on the local system with proper error handling
File Operations: Read, write, and manage files on the local system
Directory Visualization: Generate recursive tree views of file systems
Working Directory Support: Execute commands in specific directories
Robust Error Handling: Detailed error messages and validation
Comprehensive Output: Capture and return both stdout and stderr
Simple Integration: Standard I/O interface for easy integration with various clients
Multi-Directory Support: Configure multiple allowed directories for file operations
Security-First Design: Strict path validation and command execution controls
File Search: Search for files matching a pattern
File Edit: Make selective edits to a file
Type Safety: Strong type checking with Pydantic models for all tool inputs
Path Validation: Enhanced symlink and parent directory validation
Installation
Installing via Smithery
To install STeLA for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Sachin-Bhat/stela-mcp --client claudePrerequisites
Python 3.10 - 3.12
pip or uv package manager
Pydantic v2.x
Installation Steps
Clone the repository:
git clone <repository-url>
cd stela-mcpCreate and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies:
pip install -e .Creating a Binary Distribution
To create a self-contained binary:
Install PyInstaller:
pip install pyinstallerCreate the binary:
pyinstaller --onefile src/stella_mcp//server.py --name stela-mcpThe binary will be created in the dist directory.
Configuration
STeLA MCP can be configured using environment variables:
Directory Access Control
ALLOWED_DIRS(Required): Comma-separated list of directories where file operations are allowedExample:
/home/user/project,/home/user/docsDefault: Current working directory if not specified
Note: All paths must be absolute
ALLOWED_DIR(Optional): Primary directory for command execution contextExample:
/home/user/projectDefault: First directory from
ALLOWED_DIRSor current working directoryNote: This is separate from
ALLOWED_DIRSand controls command execution context
Command Execution Security
ALLOWED_COMMANDS(Optional): Comma-separated list of allowed shell commandsExample:
ls,cat,pwd,echoDefault:
ls,cat,pwd,echoSpecial value:
allto allow any command (not recommended)
ALLOWED_FLAGS(Optional): Comma-separated list of allowed command flagsExample:
-l,-a,-h,--helpDefault:
-l,-a,-h,--helpSpecial value:
allto allow any flag (not recommended)
MAX_COMMAND_LENGTH(Optional): Maximum length of command stringsExample:
1024Default:
1024Note: Prevents command injection via overly long strings
COMMAND_TIMEOUT(Optional): Maximum execution time for commands in secondsExample:
60Default:
60Note: Prevents hanging commands
Example Configuration
# Directory access
export ALLOWED_DIRS="/home/user/project,/home/user/docs"
export ALLOWED_DIR="/home/user/project"
# Command execution
export ALLOWED_COMMANDS="ls,cat,pwd,echo"
export ALLOWED_FLAGS="-l,-a,-h,--help"
export MAX_COMMAND_LENGTH=1024
export COMMAND_TIMEOUT=60Project Structure
stela-mcp/
├── src/
│ ├── stela_mcp/
│ │ ├── __init__.py
│ │ ├── shell.py # Shell command execution
│ │ ├── filesystem.py # File system operations
│ │ └── security.py # Security configuration
│ └── server.py # Main server implementation
├── pyproject.toml # Project configuration
└── README.mdUsage
Starting the Server
Run the server using:
uv run python -m src.stella_mcp.serverThe server will start and listen for connections through standard I/O.
Using with Claude Desktop
To use STeLA MCP with Claude Desktop:
Option 1: Using Python directly
Start the server using:
uv run python -m src.stela_mcp.serverIn Claude Desktop:
Go to Settings
Under "Tools", click "Add Tool"
Select "MCP Server"
Enter the following configuration:
Name: STeLA MCP
Path: The absolute path to your Python executable (e.g.,
/home/username/.venv/bin/python)Arguments:
-m src.stela_mcp.serverWorking Directory: The path to your STeLA MCP project directory
Option 2: Using the binary
Copy the binary from
dist/stela-mcpto a location in your PATHIn Claude Desktop:
Go to Settings
Under "Tools", click "Add Tool"
Select "MCP Server"
Enter the following configuration:
Name: STeLA MCP
Path: The absolute path to the binary (e.g.,
/usr/local/bin/stela-mcp)Arguments: (leave empty)
Working Directory: (leave empty)
Once configured, you can use STeLA MCP tools in your conversations with Claude. For example:
"Show me the contents of my home directory"
"Create a new file called 'test.txt' with some content"
"Run the command 'ls -la' in my current directory"
Claude will automatically use the appropriate tools based on your requests and display the results in the conversation.
Available Tools
Command Tools
execute_command
Executes shell commands on the local system.
Parameters:
command(string, required): The shell command to executeworking_dir(string, optional): Directory where the command should be executed
Returns:
On success: Command output (stdout)
On failure: Error message and any command output (stderr)
change_directory
Changes the current working directory.
Parameters:
path(string, required): Path to change to
Returns:
On success: Success message with new path
On failure: Error message
File System Tools
read_file
Reads the contents of a file.
Parameters:
path(string, required): Path to the file to read
Returns:
On success: File contents
On failure: Error message
read_multiple_files
Reads multiple files simultaneously.
Parameters:
paths(array, required): List of file paths to read
Returns:
On success: Combined contents of all files
On failure: Error message and partial results
write_file
Writes content to a file.
Parameters:
path(string, required): Path where the file will be writtencontent(string, required): Content to write to the file
Returns:
On success: Success message
On failure: Error message
edit_file
Makes selective edits to a file.
Parameters:
path(string, required): Path to the file to editedits(array, required): List of edit operationsEach edit contains
oldTextandnewText
dryRun(boolean, optional): Preview changes without applying
Returns:
On success: Git-style diff of changes
On failure: Error message
list_directory
Lists contents of a directory.
Parameters:
path(string, required): Path for the directory to list
Returns:
On success: List of files and directories
On failure: Error message
create_directory
Creates a new directory.
Parameters:
path(string, required): Path for the directory to create
Returns:
On success: Success message
On failure: Error message
move_file
Moves or renames files and directories.
Parameters:
source(string, required): Source path of the file or directory to movedestination(string, required): Destination path where the file or directory will be moved to
Returns:
On success: Success message
On failure: Error message
search_files
Searches for files matching a pattern.
Parameters:
path(string, required): Starting path for the searchpattern(string, required): Search pattern to match file and directory namesexcludePatterns(array, optional): List of glob patterns to exclude
Returns:
On success: List of matching files
On failure: Error message
directory_tree
Generates a recursive tree view of files and directories.
Parameters:
path(string, required): Path for the directory to generate tree from
Returns:
On success: JSON structure representing the directory tree
On failure: Error message
get_file_info
Retrieves detailed metadata about a file or directory.
Parameters:
path(string, required): Path to the file or directory
Returns:
On success: File/directory metadata
On failure: Error message
list_allowed_directories
Lists all directories the server is allowed to access.
Parameters:
None
Returns:
On success: List of allowed directories
On failure: Error message
show_security_rules
Shows current security configuration.
Parameters:
None
Returns:
On success: Security configuration details
On failure: Error message
Security Considerations
STeLA MCP provides direct access to execute commands and file operations on the local system. Consider the following security practices:
Run with appropriate permissions (avoid running as root/administrator)
Use in trusted environments only
Consider implementing additional authorization mechanisms for production use
Be cautious about which directories you allow command execution and file operations in
Implement path validation to prevent unauthorized access to system files
Use the most restrictive configuration possible for your use case
Regularly review and update allowed commands and directories
Validate symlinks to prevent access outside allowed directories
Ensure parent directory checks for file creation operations
Platform-Specific Security Notes
Linux/macOS
Run with a dedicated user with limited permissions
Consider using a chroot environment to restrict file system access
Use
chmodto restrict executable permissionsConsider using SELinux/AppArmor for additional security
Windows
Run as a standard user, not an administrator
Consider using Windows Security features to restrict access
Use folder/file permissions to limit access to sensitive directories
Consider using Windows Defender Application Control
Development
Adding New Tools
To extend STeLA MCP with additional functionality, follow this pattern:
Define a Pydantic model for the tool's input parameters in
server.pyAdd a new method to the appropriate class in
shell.pyorfilesystem.pyRegister the tool in
server.pyusing the@server.call_tool()decoratorImplement the tool handler with proper error handling and return types
Example:
from pydantic import BaseModel, Field
class MyToolInput(BaseModel):
param1: str = Field(description="Description of param1")
param2: int = Field(description="Description of param2")
@server.call_tool()
async def my_tool(request: Request[MyToolInput, str], arguments: MyToolInput) -> Dict[str, Any]:
"""Description of the tool."""
try:
# Tool implementation
result = await do_something(arguments.param1, arguments.param2)
return {"success": True, "result": result}
except Exception as e:
return {"error": str(e)}License
Apache-2.0 License
Acknowledgements
Built with the MCP Python SDK
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sachin-Bhat/stela-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server