Install on VS Code (GitHub Copilot)

VS Code manages MCP servers through GitHub Copilot: add the server with MCP: Add Server, then use its tools in Copilot's Agent mode.

  • Visual Studio Code 1.102 or later, with GitHub Copilot enabled and signed in — download it here.
  • An AfterShip account with access to the organization you want to connect.
  1. Open the Command Palette: ⌘⇧P (macOS) or Ctrl+Shift+P (Windows).
  2. Run MCP: Add Server.
  3. Choose HTTP (HTTP or Server-Sent Events). That is VS Code's name for the option AfterShip uses.
  4. Paste the server URL: https://mcp.aftership.com/post-purchase
  5. Name it aftership-post-purchase.
  6. Choose where to save it — Global works everywhere; Workspace saves it into this project's .vscode/mcp.json so your team gets it too.

aftership-post-purchase is just a label. You can call it anything; the rest of this page assumes that name.

Prefer to edit the file yourself?

Run MCP: Open User Configuration from the Command Palette, or create .vscode/mcp.json in your project. Add:

preparing...

If the file already lists other servers, add this block alongside them — don't delete what's there.

VS Code doesn't connect to the server straight away — it waits until something needs it. So start it yourself:

  1. Open the Command Palette and run MCP: List Servers.
  2. Select the server you added, then choose Start Server.
  3. VS Code asks for permission to sign in. Allow it.
  4. A browser tab opens. Sign in to AfterShip and pick the organization you want Copilot to work with.
  5. Come back to VS Code.

Nothing is saved into mcp.json — VS Code stores the sign-in for you.

To switch organization later, run MCP: List Servers, select the server, sign out, then start it again.

Open Copilot Chat, switch the mode selector to Agent — MCP tools are only available there — and ask:

Copilot should list the available tools without calling any of them — such as list_shipments, get_shipment, list_returns, and so on. If it reports no such server, run MCP: List Servers and confirm the server you added is running.

  • The server won't start. Run MCP: List Servers, select it, and choose Show Output to see what happened. Check the URL is exactly https://mcp.aftership.com/post-purchase.
  • No sign-in prompt appeared. Run MCP: List Servers, select the server and restart it. The prompt only shows up when the server starts.
  • The tools don't show up in chat. Check the chat is in Agent mode, not Ask or Edit. Then check the tools are ticked under Configure Tools — VS Code limits how many tools can be active at once, so turn off servers you aren't using.
  • It works in one project but not another. Saving with Workspace puts the server in that project's .vscode/mcp.json, so other projects don't see it. Re-add it with MCP: Add ServerGlobal, or copy the block into your user configuration (MCP: Open User Configuration).
  • You're seeing the wrong company's data. Sign out from MCP: List Servers, restart the server, and sign in again — this time picking the right organization.

Still stuck? Contact us at AfterShip Support