Linear Integration
STDIOMCP server allowing Claude to interact with Linear's API for managing teams and issues.
MCP server allowing Claude to interact with Linear's API for managing teams and issues.
This is a Model Context Protocol (MCP) server for Linear, allowing Claude to interact with Linear's API to manage teams, issues, projects, and cycles.
For Cline MCP Marketplace users:
linear_search_issues
See the detailed Installation and Verification sections below.
npm install
npm run build
The installation process has three main steps:
⚠️ Your installation is not complete until you've verified the connection works!
The server requires a Linear OAuth token to authenticate with the Linear API. You can set this token in the MCP configuration file.
http://localhost:3000/callback
Add the following to your MCP configuration file:
{ "mcpServers": { "github.com/cpropster/linear-mcp-server": { "command": "node", "args": [ "/path/to/linear-mcp-server/build/index.js" ], "env": { "LINEAR_CLIENT_ID": "your-client-id", "LINEAR_CLIENT_SECRET": "your-client-secret", "LINEAR_REDIRECT_URI": "http://localhost:3000/callback", "LINEAR_REFRESH_TOKEN": "your-refresh-token" }, "disabled": false, "autoApprove": [] } } }
Replace the placeholder credentials with your actual credentials.
⚠️ IMPORTANT: Your installation is not complete until you verify that the MCP connection is working correctly.
After configuring the MCP server, you must test the connection to ensure it's working properly:
linear_search_issues
tool:use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_search_issues",
arguments={
"first": 5
}
)
If successful, you'll see a response like this:
{ "issues": { "nodes": [ { "id": "123abc", "title": "Example issue 1", "identifier": "TEAM-123", "description": "This is an example issue" // ... other issue data }, // ... more issues ] } }
If the connection is working, you'll see a list of issues from your Linear account. If you see an error, check your configuration and credentials.
Common issues:
args
fieldUse the linear_get_teams
tool to retrieve all teams:
use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_get_teams",
arguments={}
)
Use the linear_search_issues
tool to search for issues:
use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_search_issues",
arguments={
"query": "Optional search query",
"teamIds": ["Optional team IDs"],
"first": 10 // Number of issues to return (default: 50)
}
)
Use the linear_get_cycles
tool to retrieve cycles for a team:
use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_get_cycles",
arguments={
"teamId": "required-team-id"
}
)
Use the linear_get_projects
tool to retrieve projects:
use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_get_projects",
arguments={
"teamId": "optional-team-id",
"first": 10 // Number of projects to return (default: 50)
}
)
Use the linear_create_issue
tool to create a new issue:
use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_create_issue",
arguments={
"teamId": "required-team-id",
"title": "Required issue title",
"description": "Optional issue description",
"assigneeId": "optional-assignee-id",
"stateId": "optional-state-id",
"priority": 0, // Optional priority (0-4)
"estimate": 1, // Optional estimate
"cycleId": "optional-cycle-id",
"projectId": "optional-project-id",
"labelIds": ["optional-label-ids"]
}
)
Use the linear_update_issue
tool to update an existing issue:
use_mcp_tool(
server_name="github.com/cpropster/linear-mcp-server",
tool_name="linear_update_issue",
arguments={
"issueId": "required-issue-id",
"title": "Optional new title",
"description": "Optional new description",
"assigneeId": "optional-assignee-id",
"stateId": "optional-state-id",
"priority": 0, // Optional priority (0-4)
"estimate": 1, // Optional estimate
"cycleId": "optional-cycle-id",
"projectId": "optional-project-id",
"labelIds": ["optional-label-ids"]
}
)
If you encounter issues during the verification step, or if the MCP connection stops working, you can use these debugging techniques:
Check MCP Configuration: Ensure your MCP configuration file has the correct server path and credentials.
Run the Test Client: Use the included test client to verify the server can connect to Linear:
node test-client.js
This will run a series of tests to verify that the server can connect to Linear and retrieve data.
Check Linear API Status: Verify that the Linear API is operational at status.linear.app.
Inspect Server Logs: If you're running the server manually, check the console output for error messages.
The server is built using TypeScript and the Linear SDK. The main implementation is in src/index.ts
.
To make changes to the server:
src/
npm run build
This MCP server requires access to your Linear account. To keep your data secure:
.env
file and any files containing tokens are excluded in .gitignore
The server uses the official Linear SDK and communicates with Linear's API over HTTPS, ensuring your data is transmitted securely.
MIT