Linear MCP Server
A production-ready MCP server for the Linear API, enabling AI assistants to list, inspect, and create issues, as well as manage teams and projects through controlled tools.
README
Linear MCP Server
A production-ready Model Context Protocol server for the Linear API.
This template lets Claude Desktop, Cursor, Windsurf, Claude Code, and other MCP-compatible clients list Linear issues, inspect issue details, create issues, list teams, and list projects through controlled Linear tools.
Built as a starter template for teams that want a secure baseline before adding company-specific issue tracking, engineering workflow, and project management automation.
Who this is for
This repository is useful for:
- developers building AI assistants for Linear workspaces,
- engineering teams connecting Linear to Claude, Cursor, or AI agents,
- platform engineers who need a clean TypeScript MCP server example,
- agencies building Linear automation for clients,
- teams that want controlled Linear read/write tools with authentication and rate limiting.
Features
- TypeScript + Express MCP server
- Linear GraphQL API client
- API key protection for
/mcp - Rate limiting for MCP requests
- Health endpoint at
/health - Structured Pino logging
- Zod-based environment validation
- MCP tools for issues, teams, and projects
- Jest + Supertest test setup
- GitHub Actions CI workflow
- Dockerfile and Docker Compose support
Architecture
Claude Desktop / Cursor / Windsurf
│
│ HTTP POST /mcp
│ X-API-Key: <MCP_API_KEY>
▼
Express Server
│
├── JSON body parser
├── Rate limiter
├── API key middleware
│
▼
MCP SDK Handler
│
├── list_issues ─┐
├── get_issue ─┤
├── create_issue ─┤──► Linear GraphQL API
├── list_teams ─┤
└── list_projects ─┘
GET /health → Linear API dependency status
See the larger diagram in docs/architecture.md.
Source Code
The complete production-ready Linear MCP Server template is available on GitHub.
Repository:
https://github.com/kamolc4/linear-mcp-server
The repository includes:
- Complete TypeScript source code
- Linear GraphQL API client
- MCP tools for issues, teams, and projects
- GitHub Actions CI
- Jest test suite
- MIT License
- Claude Desktop and Cursor configuration
- Production deployment examples
Fork the repository or download it as a ZIP to start building immediately.
Available MCP tools
| Tool | Purpose |
|---|---|
list_issues |
List Linear issues with optional filters for team, assignee, state, and priority. |
get_issue |
Retrieve a Linear issue by ID or identifier such as ENG-123. |
create_issue |
Create a new Linear issue in a selected team. |
list_teams |
List Linear teams available to the configured API key. |
list_projects |
List Linear projects, optionally filtered by team. |
Quick start
1. Clone and install
# Clone repository
git clone https://github.com/kamolc4/linear-mcp-server.git
cd linear-mcp-server
# Install dependencies
npm ci
2. Configure environment
cp .env.example .env
Edit .env:
PORT=3000
NODE_ENV=development
LOG_LEVEL=info
LINEAR_API_KEY=lin_api_your_linear_api_key
LINEAR_API_URL=https://api.linear.app/graphql
MCP_API_KEY=replace-with-a-long-random-secret
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX_REQUESTS=100
3. Run locally
npm run dev
4. Check health
curl http://localhost:3000/health \
-H "X-API-Key: replace-with-your-mcp-api-key"
5. List MCP tools
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-API-Key: replace-with-your-mcp-api-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Linear API setup
This starter template uses a Linear API key.
- Open Linear.
- Go to workspace settings.
- Open API settings.
- Create a personal API key or use a workspace token appropriate for your use case.
- Add it to
.envasLINEAR_API_KEY.
For production, use a managed secret store and rotate API keys regularly.
If your Linear deployment uses OAuth or a brokered token service, replace the static LINEAR_API_KEY loading with per-user or per-workspace token resolution.
Connect to Claude Desktop
Build and start the server first:
npm run build
npm start
Then add an MCP server entry in your Claude Desktop configuration:
{
"mcpServers": {
"linear": {
"url": "http://localhost:3000/mcp",
"headers": {
"X-API-Key": "replace-with-your-mcp-api-key"
}
}
}
}
Restart Claude Desktop after editing the configuration.
Connect to Cursor
In Cursor, add a new MCP server using the HTTP endpoint:
{
"name": "linear",
"url": "http://localhost:3000/mcp",
"headers": {
"X-API-Key": "replace-with-your-mcp-api-key"
}
}
Then restart Cursor or reload the MCP server list.
Security notes
This template is safer than a minimal demo, but you should harden it before production use.
Recommended production changes:
- Store
LINEAR_API_KEYandMCP_API_KEYin a managed secret manager, not in plain.envfiles. - Rotate
MCP_API_KEYregularly. - Add per-user or per-workspace authorization if multiple users will access the server.
- Restrict write tools such as
create_issuebehind approvals. - Add audit logs for every MCP tool call.
- Use HTTPS in production.
- Review Linear API permissions and keep scopes minimal.
- Add monitoring for Linear API failures and rate limit responses.
Security Review
Verify this server with MCPForge:
https://www.mcpforge.tech/verify
MCPForge can help review:
- exposed tools,
- authentication behavior,
- health checks,
- compatibility with MCP clients,
- risk level of write operations,
- security posture before publishing or deployment.
Verified MCP profile:
https://www.mcpforge.tech/verified/linear-mcp
Starter template on MCPForge:
https://www.mcpforge.tech/code/linear-api-client-template
Read the complete Linear MCP Server guide:
https://www.mcpforge.tech/blog/linear-mcp-server
Related MCPForge guides:
- Linear MCP OAuth: https://www.mcpforge.tech/blog/linear-mcp-oauth
- Linear MCP Setup: https://www.mcpforge.tech/blog/linear-mcp-setup
- Linear MCP with Claude: https://www.mcpforge.tech/blog/linear-mcp-with-claude
- Linear MCP with Cursor: https://www.mcpforge.tech/blog/linear-mcp-with-cursor
- Linear MCP Security Review: https://www.mcpforge.tech/blog/linear-mcp-security-review
- Best MCP Servers for Claude Code: https://www.mcpforge.tech/blog/best-mcp-servers-for-claude-code
Deployment
A common production setup:
- Deploy this service to Railway, Render, Fly.io, AWS, GCP, Azure, or a private Kubernetes cluster.
- Configure environment variables in the hosting provider.
- Set
LINEAR_API_KEYandMCP_API_KEYas protected secrets. - Verify
/healthbefore connecting production MCP clients. - Test
/mcpwithtools/list. - Run a public or private verification with MCPForge.
Local development commands
npm run lint
npm run typecheck
npm test
npm run build
API endpoints
| Method | Path | Description |
|---|---|---|
GET |
/health |
Health and Linear connectivity check. |
POST |
/mcp |
MCP endpoint protected by X-API-Key. |
Releases
Latest stable release:
v1.0.0
See the Releases page for the full changelog.
Contributing
Contributions are welcome.
If you want to improve this Linear MCP Server template, open an issue or submit a pull request.
Related MCP Server Templates
Looking for other production-ready MCP Server templates?
- GitHub MCP Server
- Slack MCP Server
- Stripe MCP Server
- Notion MCP Server
- Shopify MCP Server
- HubSpot MCP Server
- PostgreSQL MCP Server
Browse the complete collection:
https://www.mcpforge.tech/code
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。