- Explore MCP Servers
- jarvis
Jarvis
What is Jarvis
Jarvis MCP Server is a Model Context Protocol (MCP) server that provides AI assistant capabilities along with efficient system tool management. Built in Go, it supports a structured interaction with AI models, allowing for effective context management and integration of various system functionalities.
Use cases
This server is ideal for applications requiring interactive AI functionalities, including executing terminal commands, managing file operations, performing text editing, and retrieving web content. It is suitable for development environments where safety and security in command execution and file handling is critical.
How to use
To use the Jarvis MCP Server, clone the repository, install dependencies using ‘go mod download’, and build the project with ‘go build’. Start the server by executing ‘./jarvis’. Configuration is managed through the ‘config.yaml’ file, allowing users to customize command restrictions, shell preferences, and directory access. Various tools are available for terminal commands, file and text operations, and web fetching.
Key features
The server features full MCP protocol support, security-first design with configurable command blocking and access controls, terminal command execution with safety measures, advanced file system operations, and robust text editing tools. It also includes configuration management capabilities and built-in web content fetching tools.
Where to use
Jarvis MCP Server can be used in secure server environments, development settings, and applications requiring controlled AI interactions. It is particularly beneficial in contexts where secure command execution, file manipulation, and real-time configuration management are necessary, such as DevOps tools, automation scripts, and AI assistant functionalities.
Overview
What is Jarvis
Jarvis MCP Server is a Model Context Protocol (MCP) server that provides AI assistant capabilities along with efficient system tool management. Built in Go, it supports a structured interaction with AI models, allowing for effective context management and integration of various system functionalities.
Use cases
This server is ideal for applications requiring interactive AI functionalities, including executing terminal commands, managing file operations, performing text editing, and retrieving web content. It is suitable for development environments where safety and security in command execution and file handling is critical.
How to use
To use the Jarvis MCP Server, clone the repository, install dependencies using ‘go mod download’, and build the project with ‘go build’. Start the server by executing ‘./jarvis’. Configuration is managed through the ‘config.yaml’ file, allowing users to customize command restrictions, shell preferences, and directory access. Various tools are available for terminal commands, file and text operations, and web fetching.
Key features
The server features full MCP protocol support, security-first design with configurable command blocking and access controls, terminal command execution with safety measures, advanced file system operations, and robust text editing tools. It also includes configuration management capabilities and built-in web content fetching tools.
Where to use
Jarvis MCP Server can be used in secure server environments, development settings, and applications requiring controlled AI interactions. It is particularly beneficial in contexts where secure command execution, file manipulation, and real-time configuration management are necessary, such as DevOps tools, automation scripts, and AI assistant functionalities.
Content
Jarvis MCP Server
A Model Context Protocol (MCP) server implementation that provides AI assistant capabilities with comprehensive system tools.
Overview
This MCP server enables seamless integration with AI models through the Model Context Protocol, offering a standardized way to interact with AI assistants and manage context effectively. Built with Go for high performance and reliability.
Features
- MCP Protocol Support: Full implementation of the Model Context Protocol using mark3labs/mcp-go
- Security-First Design: Configurable command blocking and directory access controls
- System Integration: Terminal command execution with safety controls
- File System Operations: Secure file reading, writing, and manipulation
- Text Editing Tools: Advanced text editing capabilities with line-based operations
- HTTP Fetch Tools: Built-in web content fetching capabilities
- Configuration Management: Runtime configuration updates via MCP tools
- Go Implementation: High-performance server written in Go with robust error handling
Installation
Prerequisites
- Go 1.24.4 or later
- Git
Setup
- Clone the repository:
git clone (https://github.com/can-acar/jarvis)
cd jarvis
- Install dependencies:
go mod download
- Build the project:
go build -o jarvis main.go
Usage
Starting the Server
./jarvis
The server will start and communicate via stdio using the MCP protocol.
Configuration
The server uses a config.yaml
file for configuration:
# Security settings
blockedCommands:
- rm
- shutdown
# Default shell for command execution
defaultShell: bash
# Allowed directories for file operations
allowedDirectories:
- /tmp
- /var/log
# File operation limits
fileReadLineLimit: 1000
fileWriteLineLimit: 50
# Telemetry
telemetryEnabled: false
Available Tools
The server provides the following MCP tools:
Configuration Tools
get-config
- Retrieve current server configurationset-config
- Update server configuration values
Terminal Tools
execute-command
- Execute shell commands with security controlsget-command-history
- Retrieve command execution history
File System Tools
read-file
- Read file contents with pagination supportwrite-file
- Write content to fileslist-directory
- List directory contentscreate-directory
- Create new directoriesdelete-file
- Delete files and directoriesmove-file
- Move/rename files and directoriesfile-info
- Get file metadata and information
Text Editing Tools
edit-file
- Perform complex text editing operationssearch-replace
- Search and replace text in filesbatch-edit
- Apply multiple edits to files
Fetch Tools
fetch-url
- Fetch content from web URLsdownload-file
- Download files from remote sources
Development
Project Structure
jarvis/ ├── main.go # Main server entry point ├── config.yaml # Server configuration ├── go.mod # Go module definition ├── go.sum # Go module checksums ├── handlers/ # MCP tool handlers │ ├── config_handler.go # Configuration management │ ├── terminal_handler.go # Terminal operations │ ├── filesystem_handler.go # File system operations │ ├── textediting_handler.go # Text editing tools │ └── fetch_handler.go # HTTP fetch operations └── internal/ # Internal packages ├── common/ # Shared utilities ├── config/ # Configuration management ├── terminal/ # Terminal utilities ├── filesystem/ # File system utilities ├── textedit/ # Text editing utilities ├── fetch/ # Fetch utilities └── types/ # Type definitions
Building and Testing
# Build the project
go build -o jarvis main.go
# Run tests
go test ./...
# Run with verbose logging
go run main.go
# Build for different platforms
GOOS=windows GOARCH=amd64 go build -o jarvis.exe main.go
GOOS=linux GOARCH=amd64 go build -o jarvis-linux main.go
Adding Custom Tools
To add new MCP tools:
- Create a handler function in the appropriate handler file:
func HandleNewTool(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
// Implementation here
return mcp.NewToolResultText("Result"), nil
}
- Register the tool in the corresponding internal package:
func RegisterNewTools(s *server.MCPServer) {
s.AddTool("new-tool", "Description", map[string]interface{}{
"type": "object",
"properties": map[string]interface{}{
"param": map[string]interface{}{
"type": "string",
"description": "Parameter description",
},
},
"required": []string{"param"},
}, handlers.HandleNewTool)
}
- Call the registration function in
main.go
.
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes and add tests
- Ensure code follows Go conventions:
go fmt ./...
- Run tests:
go test ./...
- Commit your changes:
git commit -m 'Add feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
Security Considerations
- Commands are sanitized and checked against blocked patterns
- File system access is restricted to allowed directories
- Command execution includes timeout controls
- All operations are logged for audit purposes
- Configuration can restrict dangerous operations
Dependencies
- mark3labs/mcp-go: MCP protocol implementation for Go
- google/uuid: UUID generation
- spf13/cast: Type casting utilities
API Documentation
MCP Protocol Implementation
The server implements the following MCP capabilities:
- Tools: Execute system operations (file I/O, terminal commands, etc.)
- Resources: Access to file system resources with proper access controls
- Prompts: Template-based prompt management
Tool Categories
- System Tools: Terminal command execution, process management
- File Tools: File operations with security boundaries
- Text Tools: Advanced text manipulation and editing
- Network Tools: HTTP requests and content fetching
- Config Tools: Runtime configuration management
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For support and questions:
- Create an issue on GitHub
- Check the documentation and code comments
- Review existing issues and discussions
Performance Notes
- Built with Go for high concurrency and performance
- Efficient file operations with configurable limits
- Memory-conscious design for large file handling
- Optimized for MCP protocol communication over stdio