JARVIS MCP

by eugener

1 313 downloads Not rated yet

About

Lightweight MCP server that provides access to local machine commands and file operations via a standardized API interface

Explore

- 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 as JSON structures
- 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

- Go 1.24.1 or higher
- Git (for cloning the repository)

Execute the binary:

``bash

JARVIS MCP is designed to work seamlessly with Claude Desktop through its tools interface. Here's how to set it up:

1. Build JARVIS MCP for your platform using the instructions above
2. Open Claude Desktop application
3. Access Preferences:
- macOS: Click on "Claude" in the menu bar and select "Preferences"
- Windows: Click on the settings gear icon in the top-right corner
4. Navigate to the Tools Section in the left sidebar
5. Click "Add Tool" to create a new tool configuration

1. Configure the execute_command tool:
- Name: Execute Command
- Description: Execute shell commands on your local machine
- Path: Full path to your jarvis-mcp binary (e.g.,
/Users/username/jarvis-mcp/out/jarvis-mcp`)
- Arguments: Leave empty (the server uses stdin/stdout)
- Working Directory: Optional; specify a default working directory

2. Save the configuration

You can configure additional tools for specific file operations. For example:

1. Configure the read_file tool:
- Name: Read File
- Description: Read the contents of a file on your system
- Path: Same path as your jarvis-mcp binary
- Arguments: Leave empty

2. Configure the write_file tool:
- Name: Write File
- Description: Write content to a file on your system
- Path: Same path as your jarvis-mcp binary
- Arguments: Leave empty

3. Configure additional tools following the same pattern for:
- list_directory: List directory contents
- create_directory: Create new directories
- move_file: Move or rename files
- search_files: Search for files
- get_file_info: Get file metadata
- directory_tree: Generate a recursive tree view of files and directories

Once configured, you can invoke these tools during conversations with Claude:

1. Type a request like "Please show me the contents of my .bashrc file"
2. Claude will display a tool selection interface
3. Select the appropriate tool (e.g., "Read File")
4. Claude will use JARVIS MCP to execute the operation
5. The results will be displayed in your conversation

1. Configure the execute_command tool:
- Name: Execute Command
- Description: Execute shell commands on your local machine
- Path: Full path to your jarvis-mcp binary (e.g., /Users/username/jarvis-mcp/out/jarvis-mcp)
- Arguments: Leave empty (the server uses stdin/stdout)
- Working Directory: Optional; specify a default working directory

2. Save the configuration

You can configure additional tools for specific file operations. For example:

1. Configure the read_file tool:
- Name: Read File
- Description: Read the contents of a file on your system
- Path: Same path as your jarvis-mcp binary
- Arguments: Leave empty

2. Configure the write_file tool:
- Name: Write File
- Description: Write content to a file on your system
- Path: Same path as your jarvis-mcp binary
- Arguments: Leave empty

3. Configure additional tools following the same pattern for:
- list_directory: List directory contents
- create_directory: Create new directories
- move_file: Move or rename files
- search_files: Search for files
- get_file_info: Get file metadata
- directory_tree: Generate a recursive tree view of files and directories

Once configured, you can invoke these tools during conversations with Claude:

1. Type a request like "Please show me the contents of my .bashrc file"
2. Claude will display a tool selection interface
3. Select the appropriate tool (e.g., "Read File")
4. Claude will use JARVIS MCP to execute the operation
5. The results will be displayed in your conversation

To extend JARVIS MCP with additional functionality, create a new file in the appropriate package following this pattern:

package mypackage

import (
"context"
"errors"

"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
)

func GetMyTool() (tool mcp.Tool, handler server.ToolHandlerFunc) {
return mcp.NewTool("my_tool",
mcp.WithDescription("Description of the tool"),
mcp.WithString("param_name",
mcp.Required(),
mcp.Description("Parameter description"),
),
), myToolHandler
}

func myToolHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
// Parameter validation
param, ok := request.Params.Arguments["param_name"].(string)
if !ok {
return nil, errors.New("parameter is required")
}

// Tool implementation
result, err := doSomething(param)
if err != nil {
return nil, err
}

return mcp.NewToolResultText(result), nil
}

Then register the tool in cmd/jarvis/main.go:

mcpServer.AddTool(mypackage.GetMyTool())

> Just A Rather Very Intelligent System - MCP Server

JARVIS MCP is a lightweight server that provides secure access to local machine commands and file operations via a standardized API interface. Inspired by Tony Stark's AI assistant, JARVIS MCP acts as a bridge between applications and your local system.

Overview

JARVIS 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.

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 as JSON structures
- 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

Installation

Prerequisites

- Go 1.24.1 or higher
- Git (for cloning the repository)

Building from Source

1. Clone the repository:

   git clone <repository-url>
cd jarvis-mcp

2. Build the application using the provided script:

   ./build.sh

The executable will be created in the out directory.

Cross-Platform Build Instructions

Linux

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.