Firma lets you add legally binding e-signatures to any app you build in Trae, ByteDance’s AI-native IDE. Because Trae has a native MCP marketplace and multi-agent collaboration, the cleanest integration is to connect Firma’s MCP servers so Trae’s agents can generate accurate Firma code on demand. This guide covers two integration paths:Documentation Index
Fetch the complete documentation index at: https://docs.firma.dev/llms.txt
Use this file to discover all available pages before exploring further.
- MCP-assisted generation (recommended) - Connect the Firma Docs and Data MCP servers so Trae’s agents can read documentation and Firma account state while writing code.
- Direct REST integration - Skip MCP and call the Firma REST API directly from a backend function in the app Trae generates.
Prerequisites
- A Firma account with an API key
- Trae installed (free)
- At least one Firma template with signing fields configured
Firma uses the raw API key as the
Authorization header value - do not prefix it with Bearer. This differs from many other APIs.Getting started
- MCP-assisted generation
- Direct REST integration
This is the recommended path. You connect Firma’s MCP servers once, and from then on Trae’s agents can generate Firma integration code for any app you build.Make sure Because the agent reads the Firma Docs MCP server, the generated code will use the correct endpoint URL, headers, and request body without hallucinations. The output should look close to this for a Node.js backend:The Trae’s multi-agent setup will edit both the frontend component and the backend route in one pass.
Step 1: Add the Firma MCP servers to Trae
Open Trae and go to the MCP settings panel. Add two servers:- Firma Docs - URL:
https://docs.firma.dev/mcp. Lets the agent search Firma documentation and API reference. - Firma Data - URL:
https://mcp.firma.dev/mcp. Lets the agent read your Firma account state (templates, signing requests, recipients). Requires authentication on first connection.
Step 2: Store your API key
In your Trae project, create a.env file and add your Firma API key:.env is in .gitignore. Never expose your API key in frontend code. Always call the Firma API from a backend function where secrets are kept secure.Step 3: Ask Trae’s agent to generate the integration
With the MCP servers connected and the API key set, ask the Trae agent directly. A typical prompt:create-and-send endpoint creates the signing request and sends it to recipients atomically. If you need to review or modify the request before sending, ask the agent to use POST /signing-requests to create a draft, then POST /signing-requests/{id}/send separately.Step 4: Wire the endpoint to your app UI
Ask the agent again:Webhook integration
To track when documents are signed, ask the Trae agent to add a webhook receiver:Embedded signing
For apps where signers complete documents directly in your UI, Firma provides an embeddable signing experience. Once you have the recipient’ssigning_request_user_id from the API (returned as first_signer.id in the create-and-send response), load it in an iframe inside your Trae-built app:
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
- API reference - Full endpoint documentation