Lattice MCP Server
Automates Lattice HR objectives (create, update, delete, list) via browser session replay. No API key required — authenticates through SSO and persists the session for headless Playwright reuse.
Prerequisites
- Python 3.10+
- Chrome/Chromium (for SSO login)
- A display environment (local machine or X-forwarded) for initial login
Installation
pip install lattice-mcp
playwright install chromium
Authentication
The server uses a saved Playwright browser session (~/.config/lattice/browser-state.json). You must log in once via SSO to create it.
Option A: Local machine with a display
lattice ui login [--hostname <your-company>.latticehq.com]
If --hostname is omitted, it falls back to the LATTICE_WEB_HOSTNAME environment variable (see Configuration).
A Chromium window opens — complete your SSO login. The window closes automatically once authenticated and the session is saved. The session is reusable until it expires on Lattice's side (typically days to weeks).
Option B: Headless server (attach to running Chrome)
# On a machine with a display, start Chrome with remote debugging:
google-chrome --remote-debugging-port=9223 --user-data-dir=/tmp/chrome-lattice --no-first-run &
# Complete SSO in that browser, then capture the session:
lattice ui login --cdp-url http://127.0.0.1:9223
Session expiry
If tools return "Session expired", re-run lattice ui login.
Configuration
All configuration is via environment variables — no code changes needed to point at your own Lattice tenant:
| Variable | Purpose | Default |
|---|---|---|
LATTICE_WEB_HOSTNAME |
Your Lattice tenant, e.g. acme.latticehq.com |
c3.latticehq.com |
LATTICE_USER_ENTITY_ID |
Your Lattice user entity UUID — the default owner for lattice_objectives |
unset (tools require an explicit owner_id) |
LATTICE_CONFIG_DIR |
Where credentials and the browser session are stored | ~/.config/lattice |
lattice ui login also accepts --hostname directly (takes precedence over the env var). The hostname is not saved with the session — the MCP server re-reads LATTICE_WEB_HOSTNAME on every call, so set it wherever the server is launched (see below).
To find your user entity ID: open any Lattice page filtered to your objectives and copy the UUID from the URL (ownerEntityIdsFilter=...), or inspect a GraphQL response in your browser's devtools.
MCP Server Setup (Claude Code)
Add to your project's .mcp.json:
{
"mcpServers": {
"lattice": {
"command": "lattice-mcp",
"env": {
"LATTICE_WEB_HOSTNAME": "<your-company>.latticehq.com",
"LATTICE_USER_ENTITY_ID": "<your-user-entity-uuid>"
}
}
}
}
Restart Claude Code to load the server. The tools appear as lattice_* in your session.
Available Tools
| Tool | Description |
|---|---|
lattice_session_status |
Check if the browser session is active |
lattice_objectives |
List active objectives for a user (defaults to you) |
lattice_create_objective |
Create a new objective (title, optional priority/due date) |
lattice_update_objective |
Post a status update + comment to an objective |
lattice_delete_objective |
Delete an objective by entityId |
lattice_scrape |
Scrape any Lattice page and return visible text |
Example usage (via Claude Code)
> list my lattice objectives
> create a lattice objective titled "Ship feature X"
> update objective <entityId> status green comment "Merged PR, deploying tomorrow"
> delete objective <entityId>
Multi-server workflow (with Jira MCP)
If you also have a Jira MCP server in your session, you can chain them:
> fetch PLAT-0000 and PLAT-0001 from jira, then create lattice objectives from their summaries
Claude calls the Jira server to get ticket details, then calls lattice_create_objective for each — no glue code needed.
How It Works
- Tools launch headless Chromium with the saved session cookies
- Navigate to the relevant Lattice page
- Interact with the UI (fill forms, click buttons) via Playwright
- GraphQL mutations fire as a side-effect of the UI interaction
- Cloudflare passes because the session includes valid clearance cookies
There is no direct API access — Lattice does not issue API keys to non-admins. See DESIGN.md for the full decision log.
Troubleshooting
| Problem | Fix |
|---|---|
| "No browser session" | Run lattice ui login |
| "Session expired" | Re-run lattice ui login |
| Cloudflare blocks (403) | Session stale — re-login to get fresh cf_clearance cookies |
| Tool times out | Lattice page may be slow; try again |
| Create succeeds but objective not visible | Check the "All time" filter on /goals — it may default to current quarter |
Metadata
Release files for lattice-mcp 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lattice_mcp-0.1.8.tar.gz | 20.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lattice_mcp-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / lattice_mcp-0.1.8.tar.gz
| Download URL | lattice_mcp-0.1.8.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6822abb27cbc1e7defda50bc78665fe5095fa43381365f73044e0346f58d7c7f
|
|
BLAKE2b-256 checksum How to use checksums |
65024f4bb410413aad1e68ac3fc904bada5a049e3daa7426c25bb148a023dc2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / lattice_mcp-0.1.8-py3-none-any.whl
| Download URL | lattice_mcp-0.1.8-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fdd40ec62cd4a1150207e1c5998cb26831fbb8b95c6b7c1850c4dbf4c31fbfa
|
|
BLAKE2b-256 checksum How to use checksums |
ede991a100bc0e4706f808229c56294b808aa17aa94cf7ea648c8fc2d7562999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|