Skip to content
Blog

How to Connect Your Local Filesystem to ChatGPT with MCP

A complete guide to connecting your local filesystem to ChatGPT using Model Context Protocol (MCP), including setup, security best practices, and architecture patterns.

Published on August 31, 2026

AI Assistant

Can ChatGPT access your local files? The answer in 2026 is: yes, but not directly. You can connect a filesystem to ChatGPT through MCP (Model Context Protocol), but ChatGPT cannot launch a local stdio MCP server—it expects a remote MCP endpoint. For a filesystem on your own PC, you need a small bridge/tunnel between the local filesystem MCP server and ChatGPT.

OpenAI explicitly documents this limitation and recommends a Secure MCP Tunnel for private/local servers.

The Architecture

┌───────────────────────────────┐
│           ChatGPT             │
│                               │
│  "Find all TODOs in my repo"  │
└───────────────┬───────────────┘
                │ HTTPS
                │ MCP

┌───────────────────────────────┐
│       Remote MCP Endpoint     │
│                               │
│  HTTPS / Streamable HTTP      │
└───────────────┬───────────────┘

                │ tunnel

┌───────────────────────────────┐
│       Your Development PC     │
│                               │
│  ┌─────────────────────────┐  │
│  │ Filesystem MCP Server   │  │
│  │                         │  │
│  │ list / read / search    │  │
│  │ write / move / delete   │  │
│  └────────────┬────────────┘  │
│               │               │
│               ▼               │
│       ~/projects/my-book      │
└───────────────────────────────┘

The official MCP filesystem server already provides operations such as reading/writing files, directory management, search, metadata, and access control.

Option 1: Local Filesystem → MCP → Secure Tunnel → ChatGPT

This is the recommended architecture for most developers, especially if you’re working with repositories, Markdown, Obsidian-style knowledge bases, or documentation projects.

Step 1: Install the Official Filesystem MCP Server

The official server is published as @modelcontextprotocol/server-filesystem. For example:

npx -y @modelcontextprotocol/server-filesystem \
  ~/projects \
  ~/Documents/knowledge

On Windows, use cmd /c to invoke npx.

Important: You should not expose your entire filesystem. Give it specific roots like:

C:\Users\Anuchit\Projects
C:\Users\Anuchit\Documents\Knowledge

Rather than:

C:\

That’s an important security boundary.

Step 2: Make the MCP Server Reachable from ChatGPT

A normal local MCP configuration won’t work because ChatGPT’s servers cannot connect to your computer’s localhost. You need:

ChatGPT

   │ HTTPS

MCP Tunnel


localhost


Filesystem MCP

OpenAI currently documents Secure MCP Tunnel specifically for connecting MCP servers running on a developer machine, private network, or on-premises environment without exposing the MCP server directly to the public internet.

Step 3: Connect It to ChatGPT

Once you have an MCP endpoint, ChatGPT’s Developer Mode lets you create a custom MCP app:

ChatGPT

Settings

Apps

Create

Developer Mode

Add MCP endpoint

Scan Tools

Create

Then in a conversation you can select the app and ask things such as:

  • “List the Markdown files in my knowledge repository.”
  • “Find every TODO related to MCP in the Agentic Coding book.”
  • “Search the repository for references to ‘verification-first’.”

ChatGPT isn’t uploading your entire filesystem into context. Instead:

User question

ChatGPT decides which MCP tool is useful

filesystem.search(...)

MCP returns relevant results

ChatGPT reasons over those results

That’s a much better architecture for a large repository.

Step 4: Start Read-Only

For any filesystem MCP setup, start with read-only operations:

list
search
read
metadata

And not enabling:

write
delete
move
rename

Initially.

Think of your filesystem MCP as an API with clear authorization boundaries:

                    ┌──────────────────┐
                    │     ChatGPT      │
                    └────────┬─────────┘

                       MCP tools

              ┌──────────────┴──────────────┐
              │                             │
        READ OPERATIONS               WRITE OPERATIONS
              │                             │
       list / search / read        write / delete / move
              │                             │
              ▼                             ▼
        Safe by default              Requires stronger
                                     authorization

OpenAI notes that custom MCP apps can expose write/modify actions, and ChatGPT may request confirmation for important changes. However, for a filesystem, you should implement your own authorization boundary rather than relying only on confirmation.

Even Better: Build a Custom Knowledge MCP

For a serious setup, consider building your own MCP server over your filesystem, rather than exposing the generic filesystem server directly.

ChatGPT


┌────────────────────────────┐
│     Knowledge MCP Server   │
│                            │
│ search_documents()         │
│ read_document()            │
│ list_documents()           │
│ get_document_outline()     │
│ find_references()          │
│ get_project_context()      │
└─────────────┬──────────────┘


        filesystem

Instead of ChatGPT getting:

read_file("/home/anuchit/book/chapters/17.md")

You could expose:

search_documents(
    query="verification-first",
    path="agentic-coding"
)

That lets your MCP server handle:

  • Path restrictions
  • Markdown parsing
  • Frontmatter
  • Obsidian links
  • Git status
  • Document metadata
  • Chunking
  • Search
  • Permissions
  • Audit logs

This is much closer to a Knowledge MCP than a raw filesystem MCP.

Your Likely Ideal Architecture

Given a filesystem-based knowledge workflow, here’s how to structure it:

                         ChatGPT

                            │ MCP

                 ┌─────────────────────┐
                 │   Knowledge MCP     │
                 │                     │
                 │ search              │
                 │ fetch               │
                 │ list                │
                 │ inspect             │
                 │ git_status          │
                 └──────────┬──────────┘

                     Secure Tunnel


              ┌──────────────────────────┐
              │       Local Machine       │
              │                          │
              │  knowledge/              │
              │  ├── wiki/               │
              │  ├── projects/           │
              │  ├── books/              │
              │  └── sources/            │
              │                          │
              │  .skills/                │
              │  AGENTS.md               │
              │  CLAUDE.md               │
              └──────────────────────────┘

Then ChatGPT becomes a filesystem-aware development/research assistant without requiring you to manually upload Markdown files.

Alternative Architecture: Local OpenAI Agent

If your real goal is “an AI agent running on my computer to access my filesystem,” you don’t necessarily need ChatGPT’s MCP integration at all.

OpenAI’s Agents SDK supports stdio MCP servers directly through MCPServerStdio:

┌─────────────────────┐
│ OpenAI Agent        │
│ running locally     │
└──────────┬──────────┘
           │ stdio

┌─────────────────────┐
│ Filesystem MCP      │
└──────────┬──────────┘


       filesystem

This is different from the ChatGPT UI architecture:

ChatGPT

   │ HTTPS

Remote MCP endpoint


Local MCP


Filesystem

These are two different use cases.

Account Limitations

OpenAI’s current documentation says full MCP support, including write/modify actions, is rolling out for Business, Enterprise, and Edu. Pro users can use custom apps/MCP with read/fetch permissions in Developer Mode, but full write-capable MCP is currently restricted.

Build this in three phases:

Phase 1
───────
Local filesystem

Official filesystem MCP

Secure MCP Tunnel

ChatGPT

        READ ONLY


Phase 2
───────
Custom Knowledge MCP

Markdown / Obsidian / Git aware

ChatGPT

        READ + SEARCH


Phase 3
───────
Knowledge MCP
      +
Git MCP
      +
Project MCP

ChatGPT

   "AI development workspace"

The interesting part is Phase 2. Rather than treating your filesystem as a bag of files, you can turn your existing Markdown/Obsidian repository into a Knowledge MCP Server with tools such as search, read, outline, backlinks, references, and git_diff.

That fits particularly well with the filesystem-first / knowledge-base architecture many developers are exploring today.