MCP setup guide
Connect VS Code
Add Attorly as an MCP server in Visual Studio Code so GitHub Copilot's agent mode can use its tools for contracts, clauses and legal research.
Before you start
- An Attorly Pro or Enterprise plan.
- Visual Studio Code with GitHub Copilot and agent mode turned on.
Steps
Add Attorly to VS Code
Add Attorly as an MCP server in VS Code. VS Code asks you to sign in to Attorly the first time Copilot's agent mode uses it.
Add to VS Codeor paste the configuration belowInstall it for your user from the terminal
bashcode --add-mcp '{"name":"attorly","type":"http","url":"https://attorly.ai/api/mcp"}'Or share it with your team in the workspace; VS Code asks each person to sign in
.vscode/mcp.json{ "servers": { "attorly": { "type": "http", "url": "https://attorly.ai/api/mcp" } } }Sign in and choose what VS Code may do
VS Code opens Attorly in your browser. Sign in, pick your organization and tick the permissions you want to allow; reading is ticked to start with. Connected apps and their permissions are under Settings › Developers › Connect.
Check that it works
Open the Copilot chat, switch to Agent and open the tools picker. VS Code asks you to sign in to Attorly the first time; afterwards Attorly's tools are listed. Ask: “List my five most recent documents in Attorly.”
Use an API key instead
For scripts, CI and servers that cannot open a browser: create a key under Settings › Developers › API keys and paste it into VS Code.
Add Attorly as an MCP server in VS Code with your key. Copilot's agent mode can then use its tools.
Install it for your user from the terminal
code --add-mcp '{"name":"attorly","type":"http","url":"https://attorly.ai/api/mcp","headers":{"Authorization":"Bearer lbmcp_your_api_key"}}'Or share it with your team in the workspace; VS Code asks each person for their own key
{
"inputs": [
{
"type": "promptString",
"id": "attorly-api-key",
"description": "Attorly API key",
"password": true
}
],
"servers": {
"attorly": {
"type": "http",
"url": "https://attorly.ai/api/mcp",
"headers": {
"Authorization": "Bearer ${input:attorly-api-key}"
}
}
}
}If it does not work
- The server does not start.
- Run MCP: List Servers from the command palette, select attorly and choose Show Output to see the error.
- VS Code keeps asking to sign in.
- Run MCP: List Servers, select attorly and choose Restart. If it keeps happening, disconnect VS Code under Settings › Developers › Connect in Attorly and start the server again.
- Something else went wrong.
- Errors such as 401, insufficient_scope and rate_limited are explained in the MCP troubleshooting section. Every call also appears in Settings › Developers › Request logs, with the error it returned. MCP troubleshooting