Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 55 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# ShellMCP

**Expose Shell Commands as MCP tools**
**Expose Shell Commands as MCP Tools**

ShellMCP is a powerful tool that allows you to easily create Model Context Protocol (MCP) servers by exposing shell commands as structured tools. Instead of granting AI agents full shell access (which poses security risks), ShellMCP enables you to expose only the specific commands you trust, allowing agents to work autonomously with a predefined set of safe operations. Define your tools in YAML, and ShellMCP generates a complete FastMCP server for you.
ShellMCP is a powerful tool that allows you to easily create Model Context Protocol (MCP) servers by exposing shell commands as structured tools. Instead of granting AI agents full shell access (which poses security risks), ShellMCP enables you to expose only the specific commands you trust, allowing agents to work autonomously with a predefined set of safe operations.

Define your tools in YAML, and ShellMCP generates a complete FastMCP server for you.

## Quick Start

```bash
# Install
# Install ShellMCP
pip install shellmcp

# Create a new server
# Create a new server configuration
shellmcp new --name "my-server" --desc "My custom MCP server"

# Add a tool
# Add a tool interactively
shellmcp add-tool my-server.yml

# Generate the server
# Validate the configuration
shellmcp validate my-server.yml

# Generate the FastMCP server
shellmcp generate my-server.yml
```

Expand All @@ -28,6 +33,8 @@ shellmcp generate my-server.yml
- ✅ **Validation**: Built-in configuration validation and error checking
- 🎯 **FastMCP Integration**: Generates production-ready FastMCP servers
- 📦 **Complete Output**: Includes server code, requirements, and documentation
- 🔒 **Security-First**: Expose only trusted commands to AI agents
- 🎨 **Flexible**: Support for tools, resources, and prompts with reusable arguments

## Example

Expand Down Expand Up @@ -92,10 +99,50 @@ prompts:
type: string
```

## Installation
## CLI Commands

ShellMCP provides several commands to help you create and manage MCP servers:

### `shellmcp new`
Create a new server configuration file.

```bash
pip install shellmcp
shellmcp new --name "my-server" --desc "My custom MCP server" --version "1.0.0"
```

### `shellmcp add-tool`
Add a new tool to an existing configuration.

```bash
shellmcp add-tool my-server.yml --name "list-files" --cmd "ls -la {{path}}" --desc "List files in directory"
```

### `shellmcp add-resource`
Add a new resource to an existing configuration.

```bash
shellmcp add-resource my-server.yml --name "system-info" --uri "file:///tmp/system-info.txt" --resource-name "System Information"
```

### `shellmcp add-prompt`
Add a new prompt to an existing configuration.

```bash
shellmcp add-prompt my-server.yml --name "file-analysis" --prompt-name "File Analysis Assistant"
```

### `shellmcp validate`
Validate a YAML configuration file.

```bash
shellmcp validate my-server.yml --verbose
```

### `shellmcp generate`
Generate a FastMCP server from YAML configuration.

```bash
shellmcp generate my-server.yml --output-dir ./output --verbose
```

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "shellmcp"
version = "0.1.0"
version = "1.0.0"
description = "Expose Shell Commands as MCP tools"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
2 changes: 1 addition & 1 deletion shellmcp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""ShellMCP - Expose Shell Commands as MCP tools."""

__version__ = "0.1.0"
__version__ = "1.0.0"
Loading