Skip to content

voidxchant/agent_mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agent_mcp

A robust Python project for managing and interacting with files and directories using Google's ADK and Model Context Protocol (MCP) tools.

Overview

agent_mcp provides an intelligent agent that helps users manage files, list directories, and perform various filesystem operations programmatically. It leverages the google-adk library for agent development and the @modelcontextprotocol/server-filesystem NPM package for advanced filesystem integration.

Features

  • List and manage files in a specified directory
  • Read and display file contents
  • Integrate with Gemini LLM for intelligent file management
  • Easily configurable target directory
  • Environment variable support for secure configuration

Project Structure

agent_mcp/
│
├── adk_agent_samples/
│   └── mcp_agent/
│       └── agent.py
│
├── mainfoder1/
│   └── rootfolder/
│       ├── __init__.py
│       └── reqerments.txt
│
├── .env
├── .gitignore
├── LICENSE
├── README.md
└── step_By_step.md

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone <your-repo-url>
    cd agent_mcp
  2. Set up Python environment and install dependencies:

    python -m venv venv
    source venv/bin/activate
    pip install google-adk python-dotenv
  3. Install the MCP server filesystem tool:

    npm install -g @modelcontextprotocol/server-filesystem
  4. Configure environment variables:

    • Create a .env file in the project root with your Gemini API key:
      GEMINI_API_KEY=your-gemini-api-key
      

Usage

  • The main agent logic is in adk_agent_samples/mcp_agent/agent.py.
  • By default, the agent manages files in the mainfoder1/rootfolder directory.
  • You can modify the TARGET_FOLDER_PATH variable in agent.py to change the target directory.

Example

To run the agent, execute the main script or integrate it into your application as needed:

python adk_agent_samples/mcp_agent/agent.py

Step-by-Step Guide

See step_By_step.md for a detailed setup and usage guide.

License

This project is licensed under the Apache License 2.0.

References

About

testing all mcp servers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages