TECHNICAL GUIDE

DevSpace + MCP

Connect ChatGPT to a local development environment so it can inspect projects, edit files, and run development commands through a controlled MCP interface.

What are DevSpace and MCP?

MCP stands for Model Context Protocol. It is a standard interface that lets an AI client discover and call external tools. Instead of only discussing code in chat, the model can use approved tools to work with files, repositories, terminals, databases, and other services.

DevSpace is an MCP server designed for software development. It runs on a local machine and exposes development capabilities such as reading files, editing code, inspecting Git repositories, and running shell commands.

ChatGPTReasoning and tool calls
MCPTool protocol
DevSpaceLocal MCP server
ProjectFiles · Git · Terminal
Why use a tunnel? DevSpace normally listens on a local address such as 127.0.0.1:7676. ChatGPT runs remotely, so a secure HTTPS endpoint is needed. Cloudflare Tunnel can expose the local MCP service without opening a router port.

Step-by-step setup

01

Install DevSpace and cloudflared

Install DevSpace on the development machine and verify that both tools are available in the terminal.

npm install -g @waishnav/devspace
devspace doctor
cloudflared --version
02

Create a Cloudflare Tunnel

Create a named Cloudflare Tunnel and run the generated service-install command with administrator privileges. This keeps the tunnel running as a Windows service.

cloudflared.exe service install <TUNNEL_TOKEN>
03

Publish a hostname

Route a dedicated subdomain to the local DevSpace service. A typical configuration is:

Hostnamedevspace.example.com
Service URLhttp://127.0.0.1:7676
Pathleave empty
04

Configure DevSpace

Initialize DevSpace, choose the directories it is allowed to access, and set the public base URL. Keep the allowed roots as narrow as possible.

devspace init
devspace config set publicBaseUrl https://devspace.example.com

The public base URL does not include /mcp.

05

Start the local MCP server

devspace serve

The local endpoint is typically:

http://127.0.0.1:7676/mcp
06

Add the MCP server in ChatGPT

Create a custom MCP app in ChatGPT and use the public MCP endpoint:

https://devspace.example.com/mcp

Choose OAuth authentication if required. On the first connection, DevSpace may ask for the owner password created during initialization.

How to use it

Once connected, ChatGPT can call DevSpace tools when a task requires access to the local project. A good workflow is to begin with read-only inspection, then allow edits only after the project and requested change are clear.

READ

Inspect a project

“Open this project and explain its directory structure. Do not modify any files.”

DEBUG

Run and diagnose

“Run the test suite, identify the failing test, and explain the likely cause before changing anything.”

EDIT

Modify and verify

“Fix the issue, rerun the tests, and summarize the changes shown by Git diff.”

ChatGPTHTTPS MCP endpointCloudflare TunnelDevSpaceLocal project

Security notes

DevSpace can expose powerful development tools, so it should be treated as remote access to a development machine. Restrict the accessible directories, keep authentication enabled, and avoid exposing folders that contain SSH keys, API credentials, browser profiles, or unrelated personal files.

Use narrow rootsShare only specific project folders instead of an entire user profile or drive.
Keep OAuth enabledRequire explicit authentication before a remote client can use the MCP server.
Review write actionsStart with read-only tasks and inspect Git diff before committing changes.
Protect tunnel credentialsTunnel tokens and owner passwords should never be published or committed to a repository.