线性mcp用户界面
基于Hono的MCP服务器,其工具以交互式HTML UI的形式返回线性相关信息。
特性
- 列出分配给经过身份验证的用户的所有线性票证。
- 用于浏览门票的交互式UI仪表板。
- 公开用于程序化和基于UI的票证列表的MCP工具。
入门指南
先决条件
安装
bun install配置
复制 .env.example 到 .env 并添加您的Linear API密钥:
cp .env.example .env编辑 .env:
LINEAR_API_KEY=your-linear-api-key-here运行应用程序
bun run dev打开 http://localhost:3000 在您的浏览器中。
项目结构
src/
index.tsx # Entry point, sets up Hono app and MCP server
components/
IssuesTable.tsx # UI component for displaying issues
Layout.tsx # HTML layout component
lib/
linear.ts # Linear API integration
types.ts # Shared types
utils.ts # Utility functions
mcp/
server.ts # MCP server setup
tools/
list-issues.ts # MCP tool for listing issues (JSON)
ui-tools/
list-issues.ts # MCP tool for listing issues (UI/HTML)
routes/
issues.tsx # Hono route for issues dashboardMCP工具
listLinearTickets:将所有分配的Linear票证作为资源返回。listLinearTicketsUI:返回门票的交互式HTML仪表板。
发展
- 格式化:已配置Prettier(请参阅
prettier.config.js). - TypeScript:启用严格模式。
