MCP ExplorerExplorer

Mcpilot

@idanyaon a year ago
3 Apache-2.0
FreeCommunity
AI Systems
A prompt-based task execution system that leverages Large Language Models (LLMs) through Model Context Protocol (MCP) tooling

Overview

What is Mcpilot

MCPilot is a prompt-based task execution system that utilizes Large Language Models (LLMs) through the Model Context Protocol (MCP) tooling, designed for general-purpose task automation.

Use cases

Use cases include creating and optimizing code, designing APIs, and automating documentation generation, among other tasks that benefit from LLM capabilities.

How to use

To use MCPilot, run the command ‘npx mcpilot’ in your terminal. You can start a new session with various options, such as specifying a model, loading instructions from a file, or setting a working directory.

Key features

MCPilot supports multiple LLM providers, offers role-based interactions, robust session management with context preservation, integration with MCP servers, comprehensive logging, and an interactive CLI interface.

Where to use

MCPilot can be used in software development, automation of repetitive tasks, and any scenario where prompt-based interactions with LLMs can enhance productivity.

Content

MCPilot

A general-purpose system that executes tasks using MCP tooling through prompt-based interactions with LLMs.

Note: This project is currently in development and not yet stable. It’s a work in progress and APIs may change.

Features

  • Multi-provider LLM support (OpenAI, Anthropic)
  • Role-based interactions with customizable behaviors
  • Robust session management with context preservation
  • MCP (Model Context Protocol) server integration
  • Comprehensive logging and configuration
  • Interactive CLI interface

Usage

npx mcpilot

Quick Start

CLI Usage

Start a new session:

# Basic usage with instruction
npx mcpilot start "Create a new React component"

# Using a specific model
npx mcpilot start -m gpt-4 "Optimize this function"

# Load instructions from file
npx mcpilot start -i instructions.txt

# Use a specific role
npx mcpilot start -r architect "Design a new API"

# Custom config and roles
npx mcpilot start -c custom-config.json --roles-config custom-roles.json "Task description"

# Set working directory
npx mcpilot start -w /path/to/project "Create a component for this project"

# Auto-approve MCP tool calls
npx mcpilot start --auto-approve-tools "Generate code with MCP tools"

Resume a previous session:

npx mcpilot resume ./sessions/session_123.log "Continue the previous task"

CLI Options

  • -m, --model <name> - Specify the model to use
  • -l, --log-level <level> - Set log level (debug|info|warn|error)
  • -c, --config <path> - Path to config file (default: .mcpilot.config.json)
  • -r, --role <name> - Role to use for the session
  • --roles-config <path> - Path to roles config (default: .mcpilot-roles.json)
  • -w, --working-directory <path> - Working directory for the session
  • -i, --instructions-file <path> - Load instructions from a file
  • --auto-approve-tools - Automatically approve MCP tool calls without prompting

Configuration

Main Configuration (.mcpilot.config.json)

Roles Configuration (.mcpilot-roles.json)

Define different personalities and behaviors for the AI:

{
  "roles": {
    "developer": {
      "definition": "You are an expert software developer focused on writing clean, maintainable code.",
      "instructions": "Focus on code quality, documentation, and testing."
    },
    "architect": {
      "definition": "You are a software architect responsible for high-level system design.",
      "instructions": "Emphasize system design, scalability, and maintainability."
    },
    "reviewer": {
      "definition": "You are a code reviewer focused on maintaining code quality.",
      "instructions": "Look for potential bugs, design issues, and coding standards."
    }
  },
  "defaultRole": "developer"
}

MCP Integration

MCPilot supports the Model Context Protocol (MCP) for tool integration. Configure MCP servers in the main config file under the mcp.servers section:

{
  "mcp": {
    "servers": {
      "filesystem": {
        "command": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/server-filesystem",
          "${PWD}"
        ],
        "disabled": false,
        "alwaysAllow": [
          "list_files",
          "read_file"
        ]
      },
      "gitlab": {
        "command": "npx",
        "args": [
          "-y",
          "@modelcontextprotocol/server-gitlab"
        ],
        "env": {
          "GITLAB_TOKEN": "your-token",
          "GITLAB_URL": "https://gitlab.com/api/v4"
        },
        "alwaysAllow": []
      }
    }
  }
}

Auto-approving MCP Tools

You can configure specific tools to be auto-approved for each server using the alwaysAllow array in the server configuration. This is useful for tools that are frequently used and don’t require user confirmation each time.

Alternatively, you can use the --auto-approve-tools CLI flag to auto-approve all tool calls for a session.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgments

This project is heavily inspired by these great tools:

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers