Skip to main content
Glama

Day 1 — Claude Code Mastery & Context Engineering Lab

This repository implements a custom Model Context Protocol (MCP) server for project task management and integrates it with Claude Code.

What This Project Demonstrates

  • A custom MCP server built in TypeScript

  • SQLite persistence

  • Three MCP tools:

    • create_task

    • list_tasks

    • update_task

  • Claude Code integration through .mcp.json

  • A structured CLAUDE.md

  • Project-scoped Claude Code permissions

  • Two custom Claude commands

  • A PostToolUse hook that typechecks TypeScript changes

  • An end-to-end Claude Code -> MCP -> SQLite workflow

Related MCP server: Mini Task MCP Server

Architecture

Claude Code
    |
    | stdio / MCP
    v
src/index.ts
    |
    v
src/server.ts
    |
    v
src/db.ts
    |
    v
SQLite (tasks.db)

Project Structure

.
├── .claude/
│   ├── commands/
│   │   ├── task-summary.md
│   │   └── verify-project.md
│   ├── hooks/
│   │   └── typecheck-on-ts-edit.sh
│   └── settings.json
├── .mcp.json
├── CLAUDE.md
├── README.md
├── src/
│   ├── db.ts
│   ├── index.ts
│   └── server.ts
├── package.json
└── tsconfig.json

MCP Tools

create_task

Creates a task.

Inputs:

  • title: string, required

  • description: string, optional

  • priority: low | medium | high | critical

list_tasks

Lists tasks with optional filters.

Inputs:

  • status: todo | in_progress | done

  • priority: low | medium | high | critical

update_task

Updates the status of an existing task.

Inputs:

  • id: positive integer

  • status: todo | in_progress | done

SQLite Schema

Tasks contain:

  • id

  • title

  • description

  • priority

  • status

  • created_at

  • updated_at

The database file is tasks.db and is intentionally ignored by Git.

Setup

Install dependencies:

npm install

Typecheck:

npm run typecheck

Build:

npm run build

Start the MCP server directly:

npm run dev

The process will wait for MCP messages over stdio.

Claude Code Integration

The project registers the MCP server in .mcp.json.

Verify it with:

claude mcp list

Then start Claude Code from the repository root:

claude

Claude Code should discover the project-manager MCP server.

End-to-End Workflow

Example prompts used to verify the MCP integration:

Create a task called "Set up CI/CD pipeline" with high priority

List all tasks

Update task 2 to in_progress

Show me all high priority tasks that are still todo

These prompts exercise the full flow:

Claude Code
-> project-manager MCP
-> MCP tool handler
-> SQLite
-> MCP result
-> Claude Code

Context Engineering

CLAUDE.md

CLAUDE.md documents:

  • project purpose

  • architecture

  • development commands

  • MCP tool contracts

  • database safety

  • code-change workflow

  • completion criteria

It is intentionally concise and structured rather than a large unorganized prompt.

Custom Commands

Two project commands are included.

/task-summary

Uses the MCP tools to summarize the current task database.

/verify-project

Checks:

  • TypeScript typechecking

  • project build

  • MCP configuration

  • exact MCP tool contract

  • Git ignore rules

PostToolUse Hook

.claude/hooks/typecheck-on-ts-edit.sh

The hook runs after Claude edits or writes TypeScript files under src/.

It automatically executes:

npm run typecheck

A successful typecheck exits normally. A failure returns the typecheck output to Claude.

Grading Criteria Mapping

Criterion 1 — Custom MCP Server + Workflow

Implemented by:

  • src/server.ts

  • src/db.ts

  • src/index.ts

  • .mcp.json

Verified through an end-to-end create/list/update workflow in Claude Code.

Criterion 2 — Context Engineering Configuration

Implemented by:

  • CLAUDE.md

  • .claude/settings.json

  • .claude/commands/task-summary.md

  • .claude/commands/verify-project.md

  • .claude/hooks/typecheck-on-ts-edit.sh

The configuration was tested directly inside Claude Code.

Verification

Run:

npm run typecheck
npm run build
claude mcp list
git status

Expected result:

  • typecheck passes

  • build passes

  • project-manager is connected

  • Git working tree is clean

Available Tools

3 tools
create_taskA

Create a new project task with a title, optional description, and priority. Use this when the user wants to add work to the project task list.

ParametersJSON Schema
NameRequiredDescriptionDefault
titleYesTask title
priorityYesTask priority
descriptionNoOptional detailed description of the task

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the create action and does not mention side effects, return values, validation failures, permissions, or whether the task is immediately visible. This is a meaningful gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, with the core action and target resource front-loaded. No filler or redundant restatement of schema fields.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple three-parameter tool with full schema coverage, the description is minimally viable: clear purpose, clear trigger, and clear parameter hints. However, it omits output/return behavior and side-effect details, so it does not fully stand alone without annotations or an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema documents all three parameters with descriptions, so the baseline is 3. The description adds little beyond noting that the description parameter is optional, which is already visible in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Create a new project task.' It also names the key fields (title, optional description, priority), and the sibling tools list_tasks and update_task make the create-vs-manage distinction unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use the tool: 'Use this when the user wants to add work to the project task list.' It does not spell out exclusions, but the sibling names make the division of responsibility clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tasksA

List project tasks, optionally filtering by status and/or priority. Use this when the user wants to inspect, search, or summarize existing tasks.

ParametersJSON Schema
NameRequiredDescriptionDefault
statusNoOptional task status filter
priorityNoOptional task priority filter

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so description must carry the burden. It implies read-only behavior by saying 'list' and 'inspect' but doesn't explicitly state that no modifications occur, nor does it describe output format or pagination. The description is adequate but not rich on behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no fluff. The core purpose and usage context are front-loaded, and it delivers all necessary information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with two optional enum parameters and full schema coverage, the description is nearly complete. It could mention output format or that no task creation occurs, but the tool's simplicity makes the current description sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented in the schema. The description's mention of 'optionally filtering' adds minimal extra meaning beyond the schema's 'Optional' descriptions. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it lists project tasks with optional filtering by status and priority, distinguishing it from create/update siblings. The verb 'list' plus resource 'tasks' is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: when the user wants to inspect, search, or summarize existing tasks. It does not explicitly mention alternatives (create_task/update_task) or when not to use, but the context is clear enough for an agent to select this tool for read-only queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_taskA

Update the status of an existing project task by numeric ID. Use this when work begins, completes, or otherwise changes state.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesNumeric task ID
statusYesNew task status

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden of disclosing behavior. It clearly indicates this is a state-changing operation on an existing task, but it does not mention constraints such as valid status transitions, side effects, or permissions. The schema already enumerates the allowed statuses, so the description adds only modest behavioral context beyond it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the core operation stated first and the usage context second. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter enum-based update operation, the description plus schema is nearly sufficient. It covers what, when, and the allowed values. The only notable omissions are return value expectations and potential transition restrictions, but the simplicity of the tool lowers the completeness burden.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters. The description adds a helpful mapping from real-world moments to status values ('work begins' implies in_progress, 'completes' implies done), but this is contextual rather than additional parameter detail. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Update') and resource ('status of an existing project task'), and clearly references the numeric ID. It distinguishes itself from sibling tools like create_task and list_tasks by focusing on mutating an existing task's state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this when work begins, completes, or otherwise changes state' provides explicit context for when to invoke the tool. It does not explicitly mention when not to use it or name alternatives, but the sibling tool names make the boundary reasonably clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedcreate_task
    • First observedlist_tasks
    • First observedupdate_task

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct action on the task domain: creating, listing, and updating status. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a clear verb_noun pattern in snake_case: create_task, list_tasks, update_task. The only minor deviation is the plural 'tasks' for list, but it is a common convention and does not break consistency.

Tool Count4/5

Three tools is on the lean side but appropriate for a focused task-management server covering create, read, and status update. It is not so sparse as to feel trivial, and the tightly scoped surface is easy to navigate.

Completeness3/5

The server covers the core create/list/update-status workflow, but lacks delete functionality and does not allow updating fields like title, description, or priority after creation. This is a notable gap for full task management, but agents can still complete basic workflows with workarounds.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers