MCP Server - VS Code + GPT Bridge
Setup
- Install Dependencies:
cd mcp
pip install -r requirements.txt
- GPT Desktop mein Add karo:
Windows:
- File Explorer mein jao:
%APPDATA%\OpenAI\ChatGPT\ config.jsonfile banao (agar nahi hai)- Ye paste karo:
{
"mcpServers": {
"vscode-mcp": {
"command": "python",
"args": ["c:\\Users\\DEV\\UE5\\mcp\\server.py"]
}
}
}
-
GPT Desktop restart karo
-
Test karo: GPT se bolo: "List files in c:\Users\DEV\UE5"
Available Tools
File Operations
read_file- File read karowrite_file- File create/write karoedit_file- Specific lines edit karodelete_file- File delete karolist_directory- Directory list karosearch_files- Files search karocreate_directory- Directory banao
Command Operations
run_command- Shell commands run karogit_status- Git status check karo
Usage Example
GPT Desktop mein directly bolo:
- "Read the file c:\Users\DEV\UE5\test.py"
- "Create a new file hello.py with hello world code"
- "List all files in c:\Users\DEV\UE5"
- "Run command 'dir' in my workspace"
API Endpoints
GET /- Server statusGET /tools- Available tools listPOST /execute- Execute tool
Test karo:
curl http://localhost:8000/tools