kwork-mcp CLAUDE.md

Project instructions for kwork-mcp, a server that exposes tools for managing the Kwork freelance marketplace through Claude. They describe the project layout, commands, authentication, errors, and testing.

In plain words
What is it for?
Use them when developing, testing, or troubleshooting kwork-mcp and its Kwork marketplace tools.
Why use it?
They give an agent the project-specific context needed to work safely and consistently in the codebase. They also document how to check formatting, run tests, and start the server.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/simonether/kwork-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/simonether/kwork-mcp
Per session 1,424 This file is loaded in full into every session.
When invoked 1,424 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01424 $0.01424
Opus 5 $0.00712 $0.00712
Sonnet 5 $0.00285 $0.00285
Haiku 4.5 $0.00142 $0.00142

Measured 2d ago against content hash 4e1690319ecc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kwork-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

kwork-mcp

MCP server exposing 25 tools for managing Kwork freelance marketplace via Claude. Wraps pykwork (kwork>=0.2.0) with FastMCP 3.x.

Commands

  • uv run ruff check . — lint
  • uv run ruff format --check . — format check
  • uv run python -m pytest tests/ -x -v — run tests
  • uv run python -m pytest tests/ -x -v --cov=kwork_mcp --cov-report=term-missing — tests + coverage
  • uv run python -m kwork_mcp — start server (stdio)

Project Map

src/kwork_mcp/
  __init__.py        — main() entry point (loguru -> stderr, then server.run stdio)
  __main__.py        — python -m kwork_mcp
  config.py          — KworkConfig (pydantic-settings, KWORK_ env prefix)
  session.py         — KworkSessionManager (lazy auth, token persistence, web login, get_exchange_info)
  server.py          — FastMCP("kwork", lifespan=lifespan), tool registration
  errors.py          — api_guard() context manager (KworkException -> ToolError, auto-relogin on 401)
  rate_limiter.py    — InProcessRateLimiter (sliding window, deque + asyncio.Lock)
  utils.py           — shared utilities (formatting, validation, response helpers, tool annotations)
  tools/             — 8 modules, 28 tools (profile, projects, offers, orders, dialogs, kworks, categories, notifications)
tests/               — config, rate_limiter, session, errors, utils, tools tests (97 tests)

Architecture

  • FastMCP 3.x lifespan yields {"session": KworkSessionManager} — tools access via ctx.lifespan_context["session"]
  • Auth priority: KWORK_TOKEN env -> ~/.kwork_token file -> fresh login (KWORK_LOGIN + KWORK_PASSWORD)
  • Rate limiter: in-process sliding window (no Redis) — call session.rate_limit() before every API call
  • Web flow: submit_offer requires ensure_web_client() (triggers web_login("/exchange") once)
  • Transport: stdio only — all logging to stderr via loguru (stdout = MCP JSON-RPC)
  • pykwork direct: use kwork.Kwork (aka KworkClient) directly, NOT Pikka's wrapper
  • Auto-relogin: api_guard(session=session) catches 401 and calls session.relogin()
  • Error sanitization: error details go to loguru (stderr), not to the agent; mask_error_details=True on FastMCP
  • Tool annotations: ANNO_READ / ANNO_WRITE / ANNO_DESTRUCTIVE from utils.py
  • Input validation: validate_positive_int() (alias validate_positive_id), validate_page(), validate_not_empty() from utils.py

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 93 lines · 1,424 tokens per session scan A 4e1690319ecc

Subscribe to this mod's changes

kwork-mcp CLAUDE.md is an instructions file published in the GitHub repository simonether/kwork-mcp (3 stars, last pushed 1mo ago), licensed MIT. It adds 1,424 tokens to every session, about $0.0071 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

deepagents AGENTS.md

AGENTS.md instructions for langchain-ai/deepagents, covering global development guidelines for the deep agents monorepo, corridor security analysis, development workflow, suppressing ruff rules and pr conventions.

langchain-ai/deepagents · 2,268 tokens

python-cheatsheet copilot-instructions.md

Copilot instructions for labex-labs/python-cheatsheet, covering python cheatsheet - ai coding assistant instructions, project overview, architecture & key patterns, content structure and routing & layout system.

labex-labs/python-cheatsheet · 1,155 tokens

autoharness AGENTS.md

Instructions for tigerless-labs/autoharness: This repo uses Open Knowledge — collaborative markdown via MCP. .open-knowledge/config.yml (with optional /.open-knowledge/config.yml; CLI/env may override) is the path contract: content.dir is the root for relative paths; content.include lists globs that add markdown…

tigerless-labs/autoharness · 2,201 tokens

cookiecutter-mlops-package AGENTS.md

Instructions for fmind/cookiecutter-mlops-package, covering agents.md, project overview, setup & core commands, definition of done and conventions & idioms.

fmind/cookiecutter-mlops-package · 1,296 tokens

martex-quant CLAUDE.md

Instructions for martex-dev/martex-quant, covering session start — read these first, project instructions, ai trading bot project - master instructions, role and project objective.

martex-dev/martex-quant · 6,161 tokens

ZipAgent AGENTS.md

Instructions for JiayuXu0/ZipAgent, covering repository guidelines, project structure & module organization, build, test & development commands, coding style & naming conventions and testing guidelines.

JiayuXu0/ZipAgent · 504 tokens