Linear Integration
Goal
Use Linear as an external issue context source for MCP workflows:
- search relevant issues
- read issue details for short context
- keep memory recall memory-first
What You Need
- Linear API key
- Create from Linear settings (Personal API key)
- Optional custom API URL (default:
https://api.linear.app/graphql) workspace_keyin memory-core (example:personal)
Environment Variables (Fallback)
MEMORY_CORE_LINEAR_API_KEYMEMORY_CORE_LINEAR_API_URL
Step-by-Step Setup
- Generate Linear API key
- Use a dedicated service account or admin account for team stability.
- Store it in your secret manager.
- Save config in Admin UI
- Open
admin-ui-> Integrations -> Linear. - Save:
enabled=trueapi_keyapi_url(optional)
- Optional:
write_on_commitwrite_on_merge- These currently drive audit/hook routing, not provider-side write.
- Save config via API (optional)
curl -X PUT "$MEMORY_CORE_URL/v1/integrations" \
-H "Authorization: Bearer $MEMORY_CORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_key": "personal",
"provider": "linear",
"enabled": true,
"reason": "enable linear issue context",
"config": {
"api_key": "lin_api_xxx",
"api_url": "https://api.linear.app/graphql"
}
}'
- Validate with API
curl -G "$MEMORY_CORE_URL/v1/linear/search" \
-H "Authorization: Bearer $MEMORY_CORE_API_KEY" \
--data-urlencode "workspace_key=personal" \
--data-urlencode "q=incident runbook" \
--data-urlencode "limit=5"
curl -G "$MEMORY_CORE_URL/v1/linear/read" \
-H "Authorization: Bearer $MEMORY_CORE_API_KEY" \
--data-urlencode "workspace_key=personal" \
--data-urlencode "issue_key=ENG-123" \
--data-urlencode "max_chars=2000"
- Validate from MCP tools
linear_search({ q, limit? })linear_read({ issue_key, max_chars? })
API Endpoints
GET /v1/linear/search?workspace_key=<ws>&q=<query>&limit=10GET /v1/linear/read?workspace_key=<ws>&issue_key=<ENG-123>&max_chars=4000
Permissions and Audit
- Linear read/search requires workspace member access
- All calls are logged to
audit_logs:linear.searchlinear.read
Env vs Admin UI Priority
- Default: workspace config in Admin UI wins over env fallback.
- Lock option:
MEMORY_CORE_INTEGRATION_LOCKED_PROVIDERS=linear- When locked, Admin UI updates are blocked and env-only is enforced.
Troubleshooting
Integration not configuredstyle errors- Verify workspace has
api_keysaved andenabled=true.
- Verify workspace has
- Search works but read fails
- Confirm issue key exists and API key has access to the team/project.