AI Developer Workspace MCP Server
by Praniti1594
README.md
# AI Developer Workspace ā MCP Project
An AI-powered developer workspace built using the **Model Context Protocol (MCP)**. The project allows developers to inspect and modify a local software project through a web interface and an AI coding agent.
The system combines **FastMCP, FastAPI, Groq, Git, and a browser-based frontend** to create a lightweight AI development assistant.
## š Overview
AI Developer Workspace acts as a mini AI coding assistant that can understand a developer's request and perform project-level operations through MCP tools.
Instead of manually navigating through project files, developers can use the workspace to:
* View project files
* Read source files
* Search project files
* Create new files
* Update existing files
* Delete files
* Check Git status
* View recent Git commits
* Generate a project summary
* Ask an AI agent to perform development tasks
The AI agent uses MCP tools to interact with the project rather than directly modifying files.
## ⨠Features
### š Project File Management
The workspace provides tools for:
* Listing project files
* Reading files
* Searching files by keyword
* Creating files
* Updating existing files
* Deleting files
### š¤ AI Developer Agent
The AI agent accepts natural-language development requests such as:
> Create calculator.py with add, subtract, multiply and divide functions.
or:
> Update calculator.py to add power and modulus functions while preserving the existing functionality.
The agent determines whether it needs to create or update a file and invokes the appropriate MCP tool.
### š Model Context Protocol
The project uses **FastMCP** to expose developer operations as MCP tools.
The AI agent communicates with the MCP server using the MCP client.
Example architecture:
```text
User
ā
ā¼
Web Frontend
ā
ā HTTP
ā¼
FastAPI Backend
ā
āāā Project APIs
ā
āāā AI Agent
ā
ā Groq LLM
ā¼
Tool Calling
ā
ā¼
MCP Client
ā
ā¼
FastMCP Server
ā
āāā create_file
āāā update_file
āāā read_file
āāā delete_file
āāā search_files
āāā Git operations
```
### šæ Git Integration
The workspace can inspect the project's Git repository and expose information such as:
* Current Git status
* Modified files
* Recent commits
* Commit information
### š Project Summary
The application can generate a project-level summary containing information about the project and recent development activity.
### š Web Interface
A lightweight browser frontend provides an interface for interacting with the backend.
The frontend communicates with the FastAPI server using HTTP requests.
## š ļø Technology Stack
| Technology | Purpose |
| ------------- | ------------------------------ |
| Python | Backend and MCP implementation |
| FastMCP | MCP server |
| MCP Client | Communication with MCP server |
| FastAPI | REST API backend |
| Groq | LLM-powered AI agent |
| JavaScript | Frontend logic |
| HTML/CSS | Frontend UI |
| Git | Version control |
| python-dotenv | Environment configuration |
## š Project Structure
```text
mini-devpilot/
ā
āāā server.py
ā
āāā demo_client/
ā āāā index.html
ā āāā app.js
ā āāā style.css
ā
āāā .env
āāā requirements.txt
ā
āāā project files/
```
> The exact structure may vary depending on the current development version.
## āļø Setup
### 1. Clone the repository
```bash
git clone https://github.com/Praniti1594/MCP-project-ai-developer-workspace.git
cd MCP-project-ai-developer-workspace
```
### 2. Create a virtual environment
Windows:
```powershell
python -m venv .venv
```
Activate it:
```powershell
.\.venv\Scripts\Activate.ps1
```
### 3. Install dependencies
```powershell
pip install -r requirements.txt
```
### 4. Configure environment variables
Create a `.env` file:
```env
GROQ_API_KEY=your_groq_api_key
GROQ_MODEL=llama-3.3-70b-versatile
```
Never commit your `.env` file or API keys to GitHub.
## ā¶ļø Running the Backend
From the project root:
```powershell
python server.py
```
The backend runs on:
```text
http://127.0.0.1:9000
```
## ā¶ļø Running the Frontend
Open another terminal:
```powershell
cd demo_client
python -m http.server 5500
```
Then open:
```text
http://127.0.0.1:5500
```
The frontend communicates with the backend at:
```text
http://127.0.0.1:9000
```
## š§ Example AI Requests
### Create a file
```text
Create calculator.py with functions for addition, subtraction,
multiplication and division.
```
### Update a file
```text
Update calculator.py to add power and modulus functions while
preserving all existing functionality.
```
### Project inspection
```text
Show me the project files.
```
```text
Search the project for the word "stack".
```
```text
Read dsa.py.
```
## š API Endpoints
The backend exposes endpoints for common developer workspace operations.
| Endpoint | Purpose |
| ----------------- | ---------------------------------------- |
| `/files` | List project files |
| `/git-status` | View Git status |
| `/recent-commits` | View recent commits |
| `/summary` | Generate project summary |
| `/search` | Search project files |
| `/read-file` | Read a project file |
| `/delete-file` | Delete a project file |
| `/agent` | Send a request to the AI developer agent |
## š§ AI Agent Workflow
When the user sends a development request:
```text
User Request
ā
ā¼
AI Agent
ā
āāā Create new file?
ā ā
ā āāā create_file
ā
āāā Modify existing file?
ā
āāā Read existing file
ā
āāā update_file
```
For updates, the agent retrieves the existing file contents before generating the updated version. This helps preserve existing functionality instead of blindly replacing a file.
## š Security Considerations
* API keys are stored in environment variables.
* `.env` should not be committed to Git.
* File operations should be restricted to the intended project workspace.
* The MCP server should not be exposed publicly without appropriate authentication and access controls.
## šÆ Project Goals
This project was created to explore how **Model Context Protocol can be used to build AI-powered developer tools**.
The main goals are:
1. Understand MCP server and client architecture.
2. Build practical developer tools using MCP.
3. Connect an LLM to MCP tools through function/tool calling.
4. Allow an AI agent to interact with real project files.
5. Integrate Git information into an AI developer workspace.
6. Build a usable browser-based developer interface.
## š® Future Improvements
Potential improvements include:
* Streaming AI responses
* Webhooks and event handlers
* Better error handling
* Authentication and authorization
* File-diff previews before applying changes
* Undo/rollback for file modifications
* Git commit creation through the AI agent
* Automated tests
* Code validation before writing files
* Syntax checking after AI-generated changes
* Improved MCP tool discovery
* Better frontend error handling
* Agent execution history
* Tool-call logging and monitoring
## š What This Project Demonstrates
This project demonstrates practical experience with:
* Model Context Protocol (MCP)
* MCP tool design
* FastMCP
* AI tool calling
* LLM agents
* FastAPI
* REST APIs
* Asynchronous Python
* Git integration
* Frontend/backend communication
* Environment configuration
* AI-assisted software development
## š©āš» Author
**Praniti Kubal**
GitHub:
https://github.com/Praniti1594
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues