這是一張有關標題為 Boosting Coding Efficiency and Developer Experience with GitHub Copilot Agent Mode 的圖片

Boosting Coding Efficiency and Developer Experience with GitHub Copilot Agent Mode

Explores VS Code Agent Mode with GitHub Copilot and MCP: setup, tiers, pricing, PostgreSQL NLP, C project bootstrap, automation accelerating development.

Introduction

On 7 April 2025, Visual Studio Code released Agent Mode to the stable channel, adding support for the Model Context Protocol (MCP).

After studying the documentation, I enabled the feature immediately and recommended it to my colleagues the next day.

In my opinion, Agent Mode has fundamentally reshaped my workflow and dramatically increased project velocity. Whether you are a beginner or a veteran, it is a tool worth mastering early.

For new projects, developers usually need to set up the environment, install various tools, and read extensive documentation. In such scenarios, Agent Mode can run commands on your behalf, providing precise guidance that shortens both the learning curve and overall development time.

Since Agent Mode was released to the stable version of VS Code earlier this month—about two weeks ago—I have fully integrated it into my daily development workflow with remarkable results. This article outlines my practical experience and observations using it in conjunction with GitHub Copilot.

What is GitHub Copilot?

GitHub Copilot is an AI coding assistant jointly developed by GitHub and OpenAI. It helps developers write code faster and more easily so they can focus on problem‑solving and collaboration.

Key features

  • Real‑time code suggestions – While you type in Visual Studio Code, JetBrains IDEs, Neovim, and other IDEs, Copilot predicts the next line—or even an entire function—based on context, greatly accelerating development.
  • Natural‑language interaction – Ask Copilot Chat (in Chinese, English, or your local language) to explain complex code, generate tests, assist with debugging, refactor existing code, or translate it into other languages.
  • Cross‑platform integration – Beyond IDEs, Copilot works in GitHub Mobile, the CLI, Windows Terminal, and on GitHub.com, ensuring a seamless developer experience.
  • Knowledge‑base & docs generation – On enterprise plans, teams can build private knowledge bases and automatically generate high‑quality pull‑request descriptions, saving communication overhead.

Operating modes

Copilot provides three escalating modes with different privileges:

Ask ModeEdit ModeAgent Mode
PermissionRead‑onlyEdit filesFull system & terminal access
Output formPlain textText + code changesAutomated tasks incl. package install & structure changes
Use casesSyntax, concepts, API docsRefactoring, feature impl., styling, bug fixesEnv setup, project bootstrap, automated DevOps
Example op.Analysis & suggestionsDirect code editsModify project structure, run terminal cmds
CapabilityNo file mutationsCode edits & optimizationsEnd‑to‑end automation

In practice, use Ask Mode for lightweight queries and Agent Mode for environment configuration, package installs, or complex restructuring.

Supported models

As of 21 Apr 2024, Copilot supports these core LLMs:

ModelAskEditAgentPlan
Claude 3.5 SonnetFree
Gemini 2.0 FlashFree
GPT‑4.1Free
GPT‑4oFree
o3‑miniFree
Claude 3.7 SonnetPro
Claude 3.7 Sonnet ThinkingPro
Gemini 2.5 ProPro
o1Pro
o4‑miniPro
GPT‑4.5Pro+
o3Pro+

All models are trained on vast public code and natural‑language data.

Refer to the official guide, Choosing the right AI model for your task, for more details.

I personally prefer Claude 3.5 Sonnet or Claude 3.7 Sonnet, switching to Gemini 2.5 Pro or GPT‑4.1 as needed.

Pricing tiers

The Free tier has several limits, keyed to the linked GitHub account:

  1. Up to 2,000 code completions per month.
  2. Up to 50 Copilot Chat messages per month (across IDE, terminal, CLI).
  3. Quotas reset automatically each month.
ItemFreeProPro+
PriceUSD 0USD 10 mo / USD 100 yrUSD 39 mo / USD 390 yr
Code completions2,000 / moUnlimitedUnlimited
Premium requests50 / mo300 / mo1,500 / mo
Extra premium req.USD 0.04 / reqUSD 0.04 / req
Advanced‑model accessExcludes GPT‑4.5 & o3Full

Model premium‑request multipliers

ModelPremium‑request cost
Base model (currently GPT‑4o)0 (paid), 1 (free)
Claude 3.5 Sonnet1
Claude 3.7 Sonnet1
Claude 3.7 Sonnet Thinking1.25
Gemini 2.0 Flash0.25
Gemini 2.5 Pro1
GPT‑4.11
GPT‑4.550
o110
o3‑mini0.33
  1. GPT‑4.5 will be removed from the API on 14 Jul 2025.
  2. Premium‑request billing dates:
    • 5 May 2025 – all personal plans (Free, Pro, Pro+)
    • 12 May 2025 – self‑serve enterprises (card)
    • 19 May 2025 – large enterprises (invoice)

Education & open‑source benefits

Students, educators, and active open‑source maintainers can apply for Copilot Pro free of charge.

Student application flow

  1. Link your school email to your GitHub account.
  2. Upload valid ID (student ID, enrollment cert., or transcript).
  3. Review takes ~3–5 business days.
  4. If rejected, fill in missing docs and resubmit.

Using GitHub Copilot in VS Code

  1. Launch Visual Studio Code.

  2. Install the GitHub Copilot extensions

    • Click the Extensions icon.
    • Search for Copilot.
    • Install GitHub Copilot and GitHub Copilot Chat.

    Install GitHub Copilot

  3. Sign in to GitHub

    • After installation, VS Code prompts you to sign in.
    • Click the account icon (lower left) to sign in manually if needed.
    • Grant Copilot the requested scopes.

    Sign in to GitHub Copilot

  4. The status bar shows Copilot usage stats.

    GitHub Copilot status

  5. Click the toolbar button or press Ctrl + Shift + I to open Copilot Edits.

    GitHub Copilot Chat button

    Chat window

  6. Drag a folder into the chat window so Copilot can analyze it. You may also use # variables such as #codebase (load the full project) or #fetch (grab a webpage).

    Using GitHub Copilot

Enabling Agent Mode

  1. Open Settings (Ctrl +, or click the gear icon).

    Open settings

  2. Search agent and enable Chat › Agent.

    Enable Agent Mode Switch to Agent Mode

  3. Troubleshooting

    After updating VS Code to the latest version on another machine, I couldn’t find the Chat > Agent option. The issue was resolved by resetting the user settings through the following steps:

    • Close VS Code.
    • Delete the %appdata%\Code directory.
    • Restart VS Code.

    You can use the following command to quickly delete the directory (Note: This operation will erase all user settings and cached data):

1
cmd /c rmdir /s /q "%appdata%\Code"

Subsequent Agent Mode operations

In an empty folder I issued: “Initialize a C project and create main.c.”

Agent Mode responded:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
GitHub Copilot

✔️ Generating a plan to create a new workspace…
✔️ Retrieving configuration…

No off‑the‑shelf C template is available, so I will create **main.c** in the current folder with a simple “Hello World” program and initialize supporting docs. Steps:

   1. Create main.c with Hello World.
   2. Create .github/copilot‑instructions.md.
   3. Create README.md explaining build & run.
   4. Verify project structure.

Proceeding now.

main.c +7‑1
copilot‑instructions.md +3‑1
README.md +24‑1

C project initialized.
Compile with: `gcc main.c -o main`
See README.md for details.

Let me know if you need further features!

The README.md file outlines the compilation steps and how to execute the files. Any subsequent requirements can be continuously fulfilled using the agent mode.

Using a PostgreSQL MCP server

The PostgreSQL MCP server lets AI tools (e.g., Claude Desktop, VS Code) query and manipulate a PostgreSQL database via natural language.

  1. Open the project root.
  2. Press F1, type mcp, choose MCP: Add Server.
  3. Select NPM package and enter @modelcontextprotocol/server-postgres.
  4. Follow the prompts; use the default server ID or your project name.
  5. A new mcp.json appears. Replace postgresql://localhost/mydb with your URL.
  6. Start the MCP server.
  7. In Agent Mode, select this server.

Add MCP server NPM package

Enter package name Save to project

Start server MCP server shown Select server

  1. You can now issue SQL‑related prompts. For example, when I input “Use MCP to tell me the database status,” the following output is returned:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
GitHub Copilot:

Let me help you check the database-related status. I will use the tool `9f1_query` to query the current status of the database:

Executed
{
  "sql": "SELECT current_database(), version(), current_timestamp;"
}

Based on the query result, I can provide the following database information:

- Current database in use: `welldone`
- Database system: PostgreSQL 17.3 (Debian version)
- Database system timestamp: April 21, 2025, 08:46:27 UTC

Let me further inspect the tables in the database:

Executed
{
  "sql": "SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = 'public' ORDER BY table_name;"
}

I can see the following three tables in the database:

- `prices` (Prices Table)  
- `products` (Products Table)  
- `source` (Source Table)

Conclusion

Introducing GitHub Copilot Agent Mode has broken long‑standing bottlenecks in my projects. Problems that once required hours of research and trial‑and‑error now receive actionable solutions from a single natural‑language request.

From rapid front‑end prototyping to diagnosing technical issues and streamlining workflows, Copilot consistently proves practical and reliable. With clear objectives and specs, Agent Mode automates most development chores, boosting productivity and project momentum.

Integrating a PostgreSQL MCP server bridges the gap between natural language and database operations—especially valuable for developers unfamiliar with complex SQL. Routine CRUD tasks become conversational, reducing the learning curve and accelerating cross‑disciplinary collaboration.

In short, GitHub Copilot plus MCP Agent Mode is not merely an assistant but a paradigm shift in development and teamwork. Embed it in daily workflows to enhance efficiency, cut troubleshooting time, and lower the barrier to sophisticated data operations—delivering tangible gains in productivity and project pace.

References

  1. Agent mode: available to all users and supports MCP
  2. March 2025 (version 1.99)
  3. What is GitHub Copilot? - GitHub Docs
  4. VS Code Agent Mode Just Changed Everything
  5. About premium requests - GitHub Docs
  6. Deprecations - OpenAI API
  7. Introducing the Model Context Protocol \ Anthropic
  8. modelcontextprotocol/servers: Model Context Protocol Servers
Theme Stack designed by Jimmy