- Connect the Firma Docs MCP — Copilot reads accurate Firma endpoints and payloads while working
- Add a repo-wide instructions file — Persistent Firma conventions every Copilot session in this repo picks up
- Reference patterns — Code shapes Copilot should match for create-and-send, webhooks, and embedded signing
Prerequisites
- A Firma account with an API key
- GitHub Copilot enabled in your IDE or via the Copilot CLI
- A repo where you want to add e-signatures
Step 1: Connect the Firma Docs MCP server
Firma ships a Docs MCP server that exposes the full documentation as searchable tools. With it connected, Copilot queries real endpoints, current request shapes, and webhook payload schemas instead of guessing.VS Code (workspace-level)
Create or edit.vscode/mcp.json in your repo:
firma-docs shows up.
Copilot CLI (global)
Add it to~/.copilot/mcp-config.json:
/mcp show to confirm the server is connected.
JetBrains
Click the GitHub Copilot icon in the status bar, select Edit Settings, then navigate to Model Context Protocol and click Configure. Add thefirma-docs server with the URL https://docs.firma.dev/mcp.
Visual Studio
In the Chat pane, switch to Agent mode, click the Tools picker (”+”), and select Add custom MCP server. Enterfirma-docs as the name and https://docs.firma.dev/mcp as the URL. Alternatively, add the entry directly to your project’s .mcp.json file.
The Docs MCP is read-only and unauthenticated, so you do not pass an API key to it. It only provides documentation.
Step 2: Add a repo-wide Copilot instructions file
.github/copilot-instructions.md is loaded automatically by Copilot Chat, the Copilot cloud agent, and Copilot code review across every supported environment. Drop Firma conventions here so Copilot always generates code that matches Firma’s API contract.
Create the file at .github/copilot-instructions.md (or append to it if it already exists):
Optional: path-specific instructions
If your repo has a clear backend boundary, add a more specific instruction file at.github/instructions/firma.instructions.md:
applyTo glob, keeping the global instructions short.
Step 3: Reference implementation patterns
Copilot generates code in whatever language matches the surrounding files. The shapes below are the canonical Firma calls. The instructions file steers Copilot toward them and the MCP fills in current details.Create and send (TypeScript)
Create and send (Python)
Webhook handler
Embedded signing iframe
Copilot cloud agent
If your repo is set up for the Copilot cloud agent (the GitHub.com mode that opens its own PRs from an issue), the same.github/copilot-instructions.md file applies. Once the MCP and instructions are in place, an issue like “Add a Send Contract button to the customer detail page that sends a Firma signing request from template tmpl_abc123” will turn into a PR that wires up the env var, the backend handler, the webhook route, and the UI button without further hand-holding.
Surface the webhook URL and template ID as TODOs in the PR description so the human reviewer can register the webhook in the Firma dashboard before merging.
Tips for working with Copilot + Firma
- Be specific in prompts. “Use the Firma create-and-send endpoint” gets better results than “add e-signatures.” The Docs MCP server helps, but specific prompts still produce more accurate code.
- Reference the docs explicitly. Starting a prompt with “Using the Firma docs” or “Check the Firma API documentation” tells Copilot to query the Docs MCP server before generating code.
- Commit the instructions file first. The
.github/copilot-instructions.mdfile only takes effect after it’s committed. Push it before asking Copilot to generate Firma code. - Test with real API calls. After generating your integration code, test it against the Firma API with a real template and signer email to confirm the generated code works end-to-end.
Next steps
- API authentication — API keys and workspace scoping
- Webhooks guide — event types, payloads, and signature verification
- Embedded signing — in-app signing experience
- Creating workspaces — multi-tenant setups for SaaS apps
- Complete setup guide — end-to-end Firma integration walkthrough
- MCP integration — full MCP server reference
- API reference — full endpoint documentation