Extended Linear MCP server for querying initiatives, projects, and documents with full GraphQL support. Provides comprehensive access to Linear workspace data including initiative hierarchies, project details, and associated documentation.
- Initiatives: List and get detailed information about Linear initiatives
- Projects: Query projects with filtering by team or initiative
- Documents: Access Linear documents with project/initiative filtering
- Full pagination support for all list operations
- Detailed views including related entities (projects in initiatives, issues in projects, etc.)
- Python 3.11+
- Linear API key (get it from Linear Settings)
uvpackage manager
- Clone the repository:
git clone <your-repo-url>
cd linear-api- Install dependencies using uv:
uv sync- Set up your Linear API key:
cp .env.example .env
# Edit .env and add your Linear API keyYou can run the server in several ways:
uv run python server.pyuv run fastmcp run server.pyuv run fastmcp dev server.pyAdd the following to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"linear-api": {
"command": "uv",
"args": ["run", "python", "/path/to/linear-api/server.py"],
"env": {
"LINEAR_API_KEY": "your-linear-api-key-here"
}
}
}
}-
list_initiatives - List all initiatives
- Parameters:
limit(int): Number of results to return (max 250)search(string): Search term for filtering by nameinclude_archived(bool): Include archived initiativescursor_after(string): Pagination cursorcursor_before(string): Backward pagination cursor
- Parameters:
-
get_initiative - Get detailed initiative information
- Parameters:
id(string): Initiative ID
- Parameters:
-
list_projects - List all projects
- Parameters:
limit(int): Number of results to return (max 250)search(string): Search term for filtering by nameinclude_archived(bool): Include archived projectsteam_id(string): Filter by team IDinitiative_id(string): Filter by initiative IDcursor_after(string): Pagination cursorcursor_before(string): Backward pagination cursor
- Parameters:
-
get_project_with_milestones_and_associated_issues - Get detailed project information with milestones and issues
- Parameters:
id(string): Project ID
- Extended features:
- Project milestones with progress and status
- Issues within each milestone (id, identifier, title)
- Issues not assigned to any milestone
- Issue count per milestone
- Parameters:
-
list_documents - List all documents
- Parameters:
limit(int): Number of results to return (max 250)search(string): Search term for filtering by titleinclude_archived(bool): Include archived documentsproject_id(string): Filter by project IDinitiative_id(string): Filter by initiative IDcursor_after(string): Pagination cursorcursor_before(string): Backward pagination cursor
- Parameters:
-
get_document - Get detailed document information
- Parameters:
id(string): Document ID
- Parameters:
Once connected to an MCP client, you can use the tools like this:
// List all active initiatives
list_initiatives(limit=10)
// Search for specific projects
list_projects(search="Mobile App", include_archived=false)
// Get detailed information about a specific project with milestones and issues
get_project_with_milestones_and_associated_issues(id="PROJECT_ID_HERE")
// Returns project details including:
// - Milestones with their associated issues
// - Issues not assigned to any milestone
// - Issue counts per milestone
// List documents for a specific initiative
list_documents(initiative_id="INITIATIVE_ID", limit=20)
Before running any tests, verify your Linear API connection:
uv run python test_connection.pyThis will:
- Check if your API key is set correctly
- Verify the API key format
- Test authentication with Linear
- Show your Linear account details if successful
You can test the Linear API functions directly without setting up an MCP client:
Run comprehensive tests of all functions:
uv run python test_api.pyTest specific functions with custom parameters:
# Interactive menu mode
uv run python interactive_test.py
# Quick test mode (command line)
uv run python interactive_test.py list_initiatives 10
uv run python interactive_test.py get_initiative <INITIATIVE_ID>
uv run python interactive_test.py list_projects 5
uv run python interactive_test.py get_project <PROJECT_ID>
uv run python interactive_test.py list_documents 20
uv run python interactive_test.py get_document <DOCUMENT_ID>To modify or extend the server:
- Edit
server.pyto add new tools or modify existing ones - Update
linear_client.pyto add new GraphQL queries - Test locally using
uv run fastmcp dev server.py - Use
test_api.pyorinteractive_test.pyto test your changes
MIT