Visual Studio Code (VS Code)
Your code editor. Think of it as Microsoft Word, but for code.
What is it?
VS Code is a free code editor made by Microsoft. It's the most popular editor in the world, used by millions of developers. It runs on Windows, Mac, and Linux. You can write any programming language in it, and it has thousands of extensions that add extra features.
How to install
- Go to code.visualstudio.com
- Click the big download button (it detects your operating system automatically)
- Run the installer and follow the prompts
- Open VS Code once it's installed
Key things to know
- Extensions are add-ons that give VS Code new abilities (like GitHub Copilot). Install them from the Extensions panel on the left sidebar (the icon looks like four squares).
- The Terminal is built into VS Code. Open it with
Ctrl+`(orCmd+`on Mac). This lets you run commands without leaving the editor. - The Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) is your best friend. It lets you search for any action in VS Code. - Settings Sync backs up your configuration to your GitHub account, so you get the same setup on any machine.
💡 Tip: VS Code updates automatically. You'll see a notification when a new version is ready. Just restart to apply it.
GitHub Copilot
An AI coding assistant that lives inside VS Code.
What is it?
GitHub Copilot is an AI tool made by GitHub (owned by Microsoft). It integrates directly into VS Code and helps you write code by suggesting completions, answering questions, and even building entire features from a description. Think of it as having a very knowledgeable coding partner sitting next to you.
What can it do?
- Code completion — as you type, it suggests the next lines of code. Press
Tabto accept a suggestion. - Chat — open the chat panel and ask questions in plain English. "How do I connect to a database?" or "Explain this code to me."
- Agents — describe a whole feature ("build me a contact form that sends an email") and Copilot will plan the approach, write the code across multiple files, and test it.
- Inline edits — highlight some code, press
Ctrl+I, and describe what you want changed.
How to set it up
- Get a GitHub account — sign up at github.com if you don't have one.
- Get Copilot access — there's a free tier (Copilot Free) that gives you a generous amount of completions and chat messages per month. Go to github.com/settings/copilot to activate it.
-
Install the extension — in VS Code, go to Extensions (
Ctrl+Shift+X), search "GitHub Copilot", and click Install. - Sign in — VS Code will prompt you to sign in to your GitHub account. Follow the browser flow.
-
Start using it — open any file and start typing. Copilot suggestions appear as grey text. Press
Tabto accept, or keep typing to ignore.
💡 Tip: The Copilot Chat panel is the most useful feature for beginners. Open it from the sidebar or press Ctrl+Shift+I. Ask it anything: "What does this error mean?", "Write a function that...", "How do I install Node.js?"
What is MCP?
The protocol that lets AI tools connect to external services.
The simple explanation
MCP stands for Model Context Protocol. It's an open standard created by Anthropic (the company behind Claude AI) that lets AI tools connect to external services and data sources in a standardised way.
Think of it like a USB-C port for AI. Just as USB-C gives you one standard plug that works with chargers, monitors, hard drives, and phones, MCP gives AI tools one standard way to connect to any external service.
How does it work?
The AI application you're using. It knows how to talk the MCP protocol.
A small program that exposes a specific service (like Xero) to AI tools via the MCP protocol.
The actual service the AI is connecting to.
So the flow is: You ask the AI → AI talks to MCP Server → MCP Server talks to Xero → Results come back to you.
Why does it matter?
- Without MCP, every AI tool would need its own custom integration with every service. That doesn't scale.
- With MCP, you build one server for Xero and it works with VS Code, Claude Desktop, Cursor, and any other MCP-compatible tool.
- It's supported by major tools: VS Code, Claude, ChatGPT, Cursor, and many more.
💡 Key insight: You don't need to understand the protocol itself. You just need to know how to install and configure an MCP server, which is usually just adding a few lines to a config file. The AI handles the rest.
Xero MCP Server
Connect your AI tools directly to Xero's accounting data.
What is it?
The Xero MCP Server is an official MCP server built by Xero. It connects AI tools to Xero's accounting API, letting you interact with your Xero data using natural language. Instead of clicking through Xero's interface, you can ask your AI assistant to do it.
What can you do with it?
- List and search contacts, invoices, accounts, and payments
- Create invoices and credit notes
- Pull profit & loss, balance sheet, and trial balance reports
- View bank transactions and manual journals
- Access payroll data (employees, leave, timesheets) for NZ and UK
- View quotes, items, and tax rates
Prerequisites
- Node.js v18+ — download from nodejs.org. Pick the LTS version. This is the runtime that the MCP server runs on.
- A Xero account — sign up at xero.com/signup (free trial available). We recommend starting with a Demo Company so you're working with sample data, not real finances.
- Xero API credentials — you'll need a Client ID and Client Secret from the Xero Developer portal.
Getting your Xero API credentials
- Go to developer.xero.com/app/manage and log in
- Click "New app"
- For the integration type, select "Custom connection" (this is simplest for personal use)
- Follow the Custom Connections guide to set up the app and grant it access to your organisation
- Note down your Client ID and Client Secret
Adding it to VS Code (Copilot)
VS Code supports MCP servers natively. You configure them in a settings file:
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Search for "MCP: Add Server" or manually edit your
.vscode/mcp.jsonfile - Add this configuration:
{
"servers": {
"xero": {
"command": "npx",
"args": ["-y", "@xeroapi/xero-mcp-server@latest"],
"env": {
"XERO_CLIENT_ID": "your_client_id_here",
"XERO_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
Replace the yellow values with your actual Xero credentials.
Adding it to Claude Desktop (alternative)
If you use Claude Desktop instead of VS Code, the setup is similar:
- Go to Settings → Developer → Edit Config
- Add the Xero server to your
claude_desktop_config.json:
{
"mcpServers": {
"xero": {
"command": "npx",
"args": ["-y", "@xeroapi/xero-mcp-server@latest"],
"env": {
"XERO_CLIENT_ID": "your_client_id_here",
"XERO_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
⚠️ Important: If you use Node Version Manager (nvm), replace "npx" with the full path to your npx executable, e.g. /home/you/.nvm/versions/node/v22.14.0/bin/npx. Otherwise the MCP client may not find Node.
Putting It All Together
How these three pieces connect.
Your editor. Where you work.
Your AI assistant. Lives inside VS Code.
The bridge. Connects Copilot to Xero.
Example workflow
Once everything is set up, here's what using it looks like:
- Open VS Code and open the Copilot Chat panel
- Type: "Show me all unpaid invoices from the last 30 days"
- Copilot recognises this needs Xero data, calls the Xero MCP Server
- The MCP Server queries Xero's API and returns the invoice data
- Copilot presents you with a formatted list of unpaid invoices
More things to try
- "Create an invoice for ACME Corp for £500 for consulting services"
- "Show me the profit and loss for this quarter"
- "List all contacts that have overdue invoices"
- "What's the balance on my current account?"
- "Show me all bank transactions from last week"
- "Create a credit note for invoice INV-0042"
💡 Pro tip: Start with read-only queries (listing, reporting) before trying write operations (creating invoices). Use a Demo Company in Xero to experiment safely without touching real data.
Common Issues
"npx: command not found"
Node.js isn't installed or isn't in your PATH. Download it from nodejs.org and restart VS Code after installing.
Copilot isn't suggesting anything
Check you're signed in to GitHub (look for the Copilot icon in the bottom status bar). If it shows a warning icon, click it to re-authenticate.
Xero MCP Server won't connect
Double-check your Client ID and Client Secret. Make sure you've authorised the Custom Connection to access your Xero organisation. Check the VS Code Output panel (View → Output, then select "MCP" from the dropdown) for error messages.
MCP server not showing in Copilot
Restart VS Code after adding the MCP config. Make sure the .vscode/mcp.json file is in the root of your workspace folder.
Further Reading & Resources
VS Code Documentation
Official docs covering everything from basics to advanced features.
GitHub Copilot Docs
Setup guides, tips, and best practices for using Copilot effectively.
Copilot in VS Code Guide
Detailed walkthrough of Copilot features within VS Code specifically.
MCP Protocol Introduction
The official MCP documentation. Explains the architecture and how it all fits together.
Xero MCP Server (GitHub)
Source code, setup instructions, and the full list of available tools.
Xero Custom Connections Guide
Step-by-step guide to setting up API credentials for the Xero MCP Server.
MCP Servers in VS Code
How to configure and use MCP servers within VS Code and Copilot.
Xero API Documentation
Full API reference if you want to understand what's happening under the hood.