lifesciences-research: Command for Claude Code

.claude/commands/scaffold-fastmcp.md

scaffold-fastmcp is a command for Claude Code from donbr/lifesciences-research. It costs 19 tokens per session (1,733 once invoked), scanned A, original, MIT.

A command that creates the starting files for a FastMCP server connected to a named life-science API. FastMCP is a framework for building servers that expose tools to AI assistants.

In plain words
What is it for?
Use it to start a server for APIs such as UniProt, ChEMBL, or Open Targets, including placeholder server code and unit and integration test files.
Why use it?
It removes the repetitive setup work and applies the project's existing structure and patterns consistently.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is donbr/lifesciences-research's own configuration. It tells Claude Code how to work on lifesciences-research itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lifesciences-research configures →

Reuse

Borrowing it

Nothing to install: this file belongs to donbr/lifesciences-research. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/donbr/lifesciences-research/main/.claude/commands/scaffold-fastmcp.md
Clone the repo
git clone --depth 1 https://github.com/donbr/lifesciences-research

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scaffold-fastmcp

README.md
[![agentmods](https://agentmods.dev/badge/commands/donbr/lifesciences-research/scaffold-fastmcp/github.svg)](https://agentmods.dev/commands/donbr/lifesciences-research/scaffold-fastmcp)
Your own site
<a href="https://agentmods.dev/commands/donbr/lifesciences-research/scaffold-fastmcp"><img src="https://agentmods.dev/badge/commands/donbr/lifesciences-research/scaffold-fastmcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scaffold-fastmcp

Your own site · 80×15
<a href="https://agentmods.dev/commands/donbr/lifesciences-research/scaffold-fastmcp"><img src="https://agentmods.dev/badge/commands/donbr/lifesciences-research/scaffold-fastmcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00019 $0.01733
Opus 5 $0.00010 $0.00866
Sonnet 5 $0.00004 $0.00347
Haiku 4.5 $0.00002 $0.00173

Measured 12d ago against content hash db217e0c7f20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

scaffold-fastmcp 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 12d 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/commands/scaffold-fastmcp.md · 256 lines

How it starts

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

User Input

$ARGUMENTS

You MUST consider the user input before proceeding. Expected format:

  • <api-name> - e.g., "uniprot", "chembl", "opentargets"

If no argument provided, ask the user for the API name.

Goal

Create the complete scaffolding for a new FastMCP MCP server following the Life Sciences project architecture defined in ADR-001. This skill implements Constitution Principle VI (Platform Skill Delegation) to ensure consistent project structure.

Generated Structure

src/lifesciences_mcp/
├── servers/
│   └── <api>.py              # FastMCP server with tool stubs
└── (existing files preserved)

tests/
├── unit/
│   └── test_<api>_models.py  # Unit test stubs
└── integration/
    └── test_<api>_api.py     # Integration test stubs

Execution Steps

1. Validate Input

  • Extract API name from arguments (lowercase, alphanumeric with underscores)
  • Validate against existing servers in src/lifesciences_mcp/servers/
  • If server already exists, abort with message

2. Read Existing Patterns

Read the following files to understand established patterns:

  • src/lifesciences_mcp/servers/hgnc.py - Server pattern
  • src/lifesciences_mcp/client.py - Client pattern
  • src/lifesciences_mcp/models/envelopes.py - Envelope models
  • tests/integration/test_hgnc_api.py - Test pattern

3. Generate Server File

Create src/lifesciences_mcp/servers/<api>.py with:

"""<API_NAME> MCP Server - <Brief description>.

This server provides tools for <API purpose>:
- search_<entities>: Fuzzy search returning ranked candidates
- get_<entity>: Strict lookup by <ID_TYPE> CURIE

Usage:
    uv run fastmcp run src/lifesciences_mcp/servers/<api>.py
"""

from fastmcp import FastMCP

from lifesciences_mcp.clients import <API>Client
from lifesciences_mcp.models import (
    ErrorEnvelope,
    PaginationEnvelope,
)

# Initialize the MCP server
mcp = FastMCP("<API_NAME> Server")

# Shared client instance (connection pooling)
_client: <API>Client | None = None


async def get_client() -> <API>Client:
    """Get or create the shared <API> client."""
    global _client
    if _client is None:
        _client = <API>Client()
    return _client


@mcp.tool
async def search_<entities>(
    query: str,
    slim: bool = False,
    cursor: str | None = None,
    page_size: int = 50,
) -> PaginationEnvelope | ErrorEnvelope:
    """Fuzzy search for <entities>.

    Args:
        query: Search term.
        slim: If true, return minimal fields (~20 tokens per entity).
        cursor: Opaque cursor for pagination.
        page_size: Number of results per page (1-100, default 50).

    Returns:
        PaginationEnvelope with items, or ErrorEnvelope on failure.
    """
    client = await get_client()
    # TODO: Implement search logic
    raise NotImplementedError("Implement search_<entities>")


@mcp.tool
async def get_<entity>(<id_param>: str) -> dict | ErrorEnvelope:
    """Get complete <entity> record by <ID_TYPE> CURIE.

    Args:
        <id_param>: <ID_TYPE> CURIE in format '<PREFIX>:NNNNN'.

    Returns:
        <Entity> record, or ErrorEnvelope on failure.
    """
    client = await get_client()
    # TODO: Implement lookup logic
    raise NotImplementedError("Implement get_<entity>")


if __name__ == "__main__":
    mcp.run()

Read the full file on GitHub · 256 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. 12d ago First seen · 256 lines · 19 tokens per session scan A db217e0c7f20

Subscribe to this mod's changes

scaffold-fastmcp is a command published in the GitHub repository donbr/lifesciences-research (7 stars, last pushed 9d ago), licensed MIT. It adds 19 tokens to every session and 1,733 once invoked, about $0.0001 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.