Skip to main content
Glama
README.md
# Your Work Lore MCP

An [MCP](https://modelcontextprotocol.io) server for Your Work Lore, the work journal for resumes and interviews. It lets Claude (or any MCP client) read and write your journal, resume bullets and interview stories: "what did I do at Acme in 2024?", "draft bullets for my last job", "log what I did today".

It's a client of the Worklore API: every tool call is an API call made with **your** token, so it can see and do exactly what that token can.

## Connecting

The server speaks MCP over HTTP at `/mcp`. Authenticate with a Worklore **personal access token**, made in the app under Settings (the API is documented at [yourworklore.com/doc](https://yourworklore.com/doc)):

- `read`: the 15 read tools only. Claude can look, never change.
- `read_write`: also the 15 write tools.

**Claude Code:**

```sh
claude mcp add --transport http worklore https://yourworklore.com/mcp \
  --header "Authorization: Bearer wlp_..."
```

claude.ai and the Claude apps need OAuth, which is planned (phase 2).

## Tools

| Read | |
|---|---|
| `get_overview` | Profile, the resume's headline and summary, current positions, companies. The place to start. |
| `list_work_structure` | Companies → products → projects, to find ids by name |
| `list_positions` | Jobs held, for one company or all |
| `list_skills` | Every tag with its category and level |
| `search_journal` | Journal entries; full-text `q`, tag, dates, company, position, project, personal project |
| `summarize_journal` | Counts, span, projects and skills ranked by work, for the same filters |
| `get_journal_entry` | One entry in full |
| `list_accomplishments` / `get_accomplishment` | Resume bullets, with notes, skills and evidence |
| `list_stories` / `get_story` | STAR interview stories |
| `list_resume_sections` | Personal projects, certifications or education |
| `find_gaps` | What the record is missing, as questions to ask |
| `get_resume` | The resume as JSON Resume |
| `get_history` | Every change to one record |

| Write (`read_write` tokens only) | |
|---|---|
| `log_work` | Write a journal entry, under a project, a position or a personal project |
| `update_journal_entry` | Change one |
| `save_accomplishment` | Create or change a resume bullet |
| `save_story` | Create or replace a STAR story |
| `save_personal_project`, `save_certification`, `save_education` | Create or replace a resume record |
| `save_company`, `save_product`, `save_project` | Create or change the work structure that journal entries go under |
| `save_position` | Create or change a job; end it, or make it current again |
| `save_resume_summary` | Set the resume's headline and summary |
| `save_profile` | Set the contact details and links at the top of the resume |
| `ensure_tag` | Find a tag by name, or create it (and its category) |
| `archive` | Archive or restore any record; nothing is deleted |

**Prompts:** `draft_resume_bullets`, `interview_prep`, `fill_the_gaps`, `year_in_review`.

## Running

Needs [Bun](https://bun.sh) 1.3+.

```sh
bun install
cp .env.example .env    # set WORKLORE_API_URL
bun run dev             # restarts on changes
```

| Variable | |
|---|---|
| `WORKLORE_API_URL` | Required. The API's base URL, as this server reaches it. |
| `MCP_ALLOWED_HOSTS` | Hostnames it answers to besides localhost, e.g. `yourworklore.com`. Other `Host` headers get 403 (DNS rebinding protection). |
| `MCP_ALLOWED_ORIGINS` | Browser origins (hostnames) allowed to call it. Requests without an `Origin`, which is most MCP clients, always pass. |
| `PORT`, `HOST` | Where to listen (default `0.0.0.0:3000`) |
| `TOKEN_CACHE_SECONDS` | How long a verified token is trusted before asking the API again (default 60) |

**Docker:** `docker build -t worklore-mcp .`, then run it with `WORKLORE_API_URL` and `MCP_ALLOWED_HOSTS` set. `GET /health` answers `{"status": "ok"}`.

Your Work Lore runs this server for everyone at `https://yourworklore.com/mcp`; you only need to run your own to change it.

## Development

```sh
bun test            # unit and HTTP tests, against a fake API
bun run typecheck
```

Built on the MCP TypeScript SDK v2 (`@modelcontextprotocol/server`). The server is stateless: each request gets a fresh server instance, built for the caller's token (`src/server.ts`), so a read-only token never even sees the write tools.

```text
src/index.ts      Bun.serve entry
src/http.ts       /mcp and /health; Host/Origin checks; bearer auth
src/auth.ts       Verifies a token with GET /api/me, caches the answer
src/api.ts        Worklore API client
src/server.ts     Builds the MCP server for one caller
src/tools/        read.ts, write.ts, common.ts
src/prompts.ts    The prompts
```

## License

[BSD 3-Clause](LICENSE)