Skip to content

GitHub Copilot agent mode

Use Forkmate in VS Code

VS Code adds remote MCP servers in mcp.json. Make a Forkmate key, add the config below, and paste the key when VS Code asks for it. Copilot Chat in agent mode can then log your meals.

Needs a key. VS Code runs on your computer, so it connects with a personal key instead of a sign-in. Make a key in Forkmate · How keys work

No Forkmate account yet? Create one free first. It takes under a minute. You make your key there.

Example: in VS Code, with Forkmate connected

I had two eggs and toast for breakfast.

Logged to Forkmate229 kcal
Egg, whole, cooked, hard-boiled · 2 large eggs (100 g)Bread, white · 1 slice (28 g)

Logged. Want me to total today so far?

Set up Forkmate in VS Code

Forkmate’s server URL
https://mcp.forkmate.ai/
Streamable HTTP, with your personal key in the Authorization header.
  1. Make a keyIn Forkmate, open Settings → Keys for local apps (https://app.forkmate.ai/#keys), name the key after VS Code, pick when it expires and click Make key. Copy it: Forkmate shows it once. How keys work: forkmate.ai/connect/keys/.
  2. Add the serverRun MCP: Open User Configuration from the Command Palette (or create .vscode/mcp.json in a workspace) and add the config below.
  3. Paste your key when askedWhen Forkmate starts, VS Code asks for your Forkmate key in a password field. Paste it. The file only refers to the key, so it never holds it.
  4. Give your OK onceThe first time you log, Forkmate asks once for your OK to store your food diary. Agree the way it asks, in the chat or through the link it gives you to agree on the web, then log the meal again if it wasn’t saved.
  5. Log your first mealIn Copilot Chat in agent mode, say “I had two eggs and toast for breakfast.” It logs the meal with calories and macros to your Forkmate diary.

mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "forkmate-key",
      "description": "Forkmate key (starts with fmk_)",
      "password": true
    }
  ],
  "servers": {
    "forkmate": {
      "type": "http",
      "url": "https://mcp.forkmate.ai/",
      "headers": {
        "Authorization": "Bearer ${input:forkmate-key}"
      }
    }
  }
}

What you need

  • A free Forkmate account (sign up). There is no paid plan.
  • GitHub Copilot in VS Code, in agent mode.
  • On Copilot Business or Enterprise, your organization must enable the “MCP servers in Copilot” policy (it’s off by default).

Checked against these sources: VS Code docs: MCP servers, VS Code docs: MCP configuration, GitHub docs: MCP in Copilot. VS Code changes its menus often; if yours looks different, trust what it shows.

What to say first

Talk to VS Code the way you’d tell a friend:

  • “I had two eggs and toast for breakfast.”
  • “How many calories have I had today?”
  • “Make the toast two slices.”
  • “What did I eat this week?”

It logs the meal with calories, protein, carbs and fat to your diary at app.forkmate.ai.

Good to know in VS Code

  • VS Code asks you to trust Forkmate the first time it starts. If you decline, it doesn’t start.
  • Turn on MCP Servers in Settings Sync to get Forkmate on your other machines.

If something goes wrong in VS Code

An error about more than 128 tools in a request
Open the tools picker in Chat and turn off tools or servers you aren’t using.
Forkmate’s tools look stale after an update
Run MCP: Reset Cached Tools from the Command Palette.

Checked against VS Code docs: MCP servers, VS Code docs: agent tools, VS Code docs: MCP configuration.

Forkmate shortcuts

Forkmate comes with ready-made requests for the everyday jobs: log a meal, fix the last entry, see what’s left today, log your usual, hit your protein, a weekly check-in. In Copilot Chat, type / and pick a Forkmate shortcut.

  • Log a meal (log-meal)
    “Log this to my Forkmate diary: two eggs and toast with butter”
  • Fix my last entry (fix-last-entry)
    “Fix the last thing I logged in Forkmate: it was 2 eggs, not 3”
  • What's left today (today-so-far)
    “Show me today so far in Forkmate: my calories, protein, carbs and fat.”
  • Log my usual (log-my-usual)
    “Log my usual breakfast to Forkmate.”
  • Hit my protein today (hit-protein)
    “How much protein have I had today in Forkmate, and how far am I from my target of 120 g? Suggest a few foods for my remaining meals and snacks that would close the gap, using my food profile and the foods I usually eat.”
  • Weekly check-in (week-review)
    “Give me a check-in on my last 7 days in Forkmate (get_range): calories, protein, carbs and fat per day and on average, how many days I logged, and the foods I ate most.”
  • Move my MyFitnessPal history (import-myfitnesspal)
    “How do I move my food diary history from MyFitnessPal to Forkmate? Walk me through exporting my data for free and importing it with the guided importer described at https://forkmate.ai/migrate-from-myfitnesspal/. Don't log anything yet.”

Shortcut or not, Forkmate sends VS Code the same logging rules when it connects: log your own words, keep your amounts, and look foods up before estimating.

Start logging from VS Code

Create your free account, connect once, and your next meal is one sentence away. No card, no paid plan.