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.
Prerequisites
- 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.
Install
- Open the Command Palette:
⌘⇧P(macOS) orCtrl+Shift+P(Windows). - Run MCP: Add Server.
- Choose HTTP (HTTP or Server-Sent Events). That is VS Code's name for the option AfterShip uses.
- Paste the server URL:
https://mcp.aftership.com/post-purchase - Name it
aftership-post-purchase. - Choose where to save it — Global works everywhere; Workspace saves it into this project's
.vscode/mcp.jsonso 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.
Sign in
VS Code doesn't connect to the server straight away — it waits until something needs it. So start it yourself:
- Open the Command Palette and run MCP: List Servers.
- Select the server you added, then choose Start Server.
- VS Code asks for permission to sign in. Allow it.
- A browser tab opens. Sign in to AfterShip and pick the organization you want Copilot to work with.
- 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.
Verify
Open Copilot Chat, switch the mode selector to Agent — MCP tools are only available there — and ask:
What tools does the AfterShip Post-purchase server provide?
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.
Troubleshooting
- 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 Server → Global, 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