DEV Community

Tomasz Krystman
Tomasz Krystman

Posted on Fully Autonomous

Connect an AI Agent to Linear with MCP: Setup and Permission Checks

Giving an AI agent access to Linear involves more than exposing issue tools: the connection uses a specific account, and actions are limited by that account’s permissions. A practical starting point is to connect through MCP, try a read-only task, verify the results in Linear, and add write actions only with a review step.

MCP standardizes how an agent discovers and calls tools. It does not grant access by itself; the integration and the connected Linear account determine which actions are available.

What an agent can do through a Linear connection

Depending on the available tools and permissions, an agent can find issues, create or edit issues, add comments, list cycles, and retrieve project details.

Linear product screenshot

For example, an agent might find open issues assigned to a user and summarize them. It could also draft a bug report; creating that issue requires an available write action and permission from the connected account.

Choose MCP or a direct API integration

Use MCP when your agent framework supports MCP and you want to expose Linear actions through an MCP endpoint. A direct API integration may fit better when your application executes tools through its own provider or SDK pattern.

Composio supports both approaches. Its MCP setup creates a session scoped to Linear and returns connection details for an MCP client. Its API approach exposes tools for an agent to execute through an SDK. Choose based on your framework and how you manage agent sessions.

Set up a Linear MCP connection

The general setup has three stages: install the dependencies for your framework, create a session with Linear enabled, and configure an MCP client with that session’s connection details.

1. Install the required packages

Install the Composio package along with the MCP client or agent-framework packages your implementation needs. The exact package set depends on the language and framework, so use the current installation instructions for those dependencies.

2. Create a session scoped to Linear

Initialize Composio and create a session that enables Linear as a toolkit and MCP as the connection method. The session returns an MCP URL and headers for the client.

Protect these connection details. Do not put credentials in prompts or source control.

3. Configure the client and start with a read-only task

Give the agent’s MCP client the session URL and headers, then provide a task that uses an appropriate Linear action. Start with a read-oriented request, such as listing open issues assigned to a user, before trying actions that create or modify records.

Verify the account, permissions, and results

Review the permissions shown during Linear authorization. Agent actions run through the connected account and are attributed to that account in Linear. A work account may also require administrator approval.

After a read-only request, check the response against Linear to confirm that the expected account, team, and issue data were used. If the connection expires or access is revoked, reconnect the account before asking the agent to act again.

For side-effecting actions such as creating, updating, or archiving work, have the agent prepare a proposed change first. Confirm the target and intended update before allowing execution.

Manage connected accounts and access

Composio supports separate connected accounts and managed authentication for its Linear connection, including token refresh. If the agent can access more than one account, specify which account to use and verify it before approving a write action.

You can revoke the connection in Linear. Once access is revoked or invalidated, the agent cannot continue acting through that account until it is reconnected. Token refresh does not replace authorization after revocation.

Common questions

Does the agent act as the connected Linear user?

Yes. Actions through the connection are attributed to the connected account. Review the authorization permissions and use an approval step for changes to issues or projects.

Can I connect more than one Linear account?

Composio supports multiple connected accounts. Keep their authorizations separate, identify the account for each request, and verify the selected account before approving write actions.

What if Linear access is revoked?

The agent cannot act through that account until it is reconnected. Composio can refresh tokens for an active connection, but revocation requires renewed authorization.

When should I use MCP instead of a direct API integration?

Use MCP if your agent framework supports it and you want Linear actions available through that interface. Use a direct API integration if your application is built around SDK-based tool execution. Either way, check permissions and review actions that change data.

Top comments (0)