Linear MCP Server
This is an open-source Model Context Protocol (MCP) server for interacting with the Linear API.
Features
- Get Issues: Fetch issues from a specific team.
- Search Issues: Search for issues across the workspace.
- Create Issue: Create new issues in a specific team.
- Update Issue: Update issue details (status, priority, assignee, etc.).
- Add Comment: Add comments to issues.
- List Teams, Users, and Workflow States.
Prerequisites
- Node.js (v18 or higher)
- A Linear API Key
Getting Your Linear API Key (Keep it Private!)
- Go to your Linear workspace settings: Settings > API > Personal API keys.
- Click New API key and give it a name (e.g., "MCP Server").
- Copy the key immediately. You will not be able to see it again.
IMPORTANT: Never commit your actual API key to version control. This project uses an environment variable (LINEAR_API_KEY) to keep your key secure.
Setup Instructions
-
Clone the repository:
git clone <your-repo-url> cd linear-mcp-open-source -
Install dependencies:
npm install -
Configure Environment Variables:
- Copy the
.env.examplefile to create a new.envfile:cp .env.example .env - Open the
.envfile and replaceyour_linear_api_key_herewith your actual Linear API key:LINEAR_API_KEY=lin_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Note: The
.envfile is included in.gitignore, so it will not be committed to Git. - Copy the
-
Build the project:
npm run build
Usage
You can start the server manually using:
npm start
Or configure your MCP client (like Gemini CLI, Claude Desktop, or Cursor) to spawn this server by pointing it to the compiled dist/index.js file and passing the LINEAR_API_KEY in the environment.
Example configuration for an MCP client:
{
"mcpServers": {
"linear": {
"command": "node",
"args": ["/path/to/linear-mcp-open-source/dist/index.js"],
"env": {
"LINEAR_API_KEY": "your_linear_api_key_here"
}
}
}
}
License
ISC