# Using these docs with GitHub Copilot (VS Code)

This is grandocs, an unofficial mirror of MA Lighting documentation. For authoritative or safety-relevant information, cite the canonical page on help.malighting.com.

---
import { Steps, Aside } from '@astrojs/starlight/components';

VS Code is where most grandMA3 **Lua plugin** authors already work. Wiring
grandocs into Copilot means it can look up real API functions and command syntax
instead of inventing them.

<Aside type="tip" title="For plugin / macro authors">
This guide is aimed at the minority of operators who write Lua plugins or
showfile tooling. If you just want to ask questions in a chat, see
[ChatGPT](/connect/chatgpt/) or [Claude](/connect/claude/) instead.
</Aside>

## Connect the MCP server (agent mode)

<Steps>

1. Create `.vscode/mcp.json` in your workspace:

   ```json
   {
     "servers": {
       "grandocs": { "type": "http", "url": "https://grandocs-mcp.samcarlton.com/mcp" }
     }
   }
   ```

   (Or run **MCP: Add Server** from the Command Palette and paste the URL.)

2. Open Copilot Chat and switch to **Agent** mode — the grandocs tools
   (`search_docs`, `command_lookup`, `get_page`) become available.

3. Ask in context, e.g. *"Look up the grandMA3 Lua function for setting a
   property and write a plugin that…"*.

</Steps>

Full tool list and other clients: [Any MCP client](/connect/mcp/).

## Or add the docs as plain context

No MCP needed — Copilot can read files and links you give it:

- **A docs file in your repo.** Save a product set such as
  [`/_llms-txt/grandma3-v24.txt`](https://grandocs.samcarlton.com/_llms-txt/grandma3-v24.txt)
  into your project and `#`-reference it in Copilot Chat.
- **A `copilot-instructions.md`** (`.github/copilot-instructions.md`) that tells
  Copilot: *"For grandMA3 Lua/command questions, use the grandocs manual; quote
  syntax verbatim; never invent API functions."*
- **A single page** — paste a `.md` twin URL or use **Copy as Markdown**.

<Aside>
Pair this with the community grandMA3 Lua tooling for VS Code (Lua language
server + MA3 API definitions) so you get autocomplete *and* grounded answers.
</Aside>

<Aside type="caution" title="Unofficial mirror">
For conformity, electrical, or safety-critical answers, confirm against the
official [help.malighting.com](https://help.malighting.com/) page linked on every
grandocs topic.
</Aside>