agentleFS
MicrosoftKnown publishermicrosoft/AKS-Lab-GitHubCopilot/.github/skills/mcp-server-skeleton/SKILL.md

mcp-server-skeleton

Skill8 starsChanged 5 months agoMITView on GitHub

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every request / response is a Pydantic v2 model with model_config = ConfigDict(frozen=True).

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: MCP Server Skeleton (FastMCP, streamable-http)

Reference layout

src/mcp_servers/<name>/
├── __init__.py
├── models.py
├── store.py
├── server.py
└── Dockerfile

server.py template

from __future__ import annotations

from mcp.server.fastmcp import FastMCP
import structlog
from starlette.requests import Request
from starlette.responses import JSONResponse

from .models import StockQuery, StockReport
from .store import lookup_stock

log = structlog.get_logger("<name>-mcp")
mcp = FastMCP("<name>-mcp", host="0.0.0.0", port=8080, streamable_http_path="/mcp")


@mcp.custom_route("/healthz", methods=["GET"])
async def healthz(_request: Request) -> JSONResponse:
    """Return process health for container probes."""

    return JSONResponse({"status": "ok"})


@mcp.custom_route("/readyz", methods=["GET"])
async def readyz(_request: Request) -> JSONResponse:
    """Return readiness for ACA ingress probes."""

    return JSONResponse({"status": "ready", "name": "<name>-mcp"})


@mcp.tool()
async def check_stock(query: StockQuery) -> StockReport:
    """Return on-hand stock and reorder point for each requested location.

    Args:
        query: SKU and list of location IDs.
    Returns:
        StockReport with one LocationStock per requested location.
    """
    log.info("tool.check_stock", sku=query.sku, locations=query.locations)
    return await lookup_stock(query)


if __name__ == "__main__":
    mcp.run(transport="streamable-http")

models.py rules

  • Every request / response is a Pydantic v2 model with model_config = ConfigDict(frozen=True).
  • Field names are snake_case; alias to camelCase only if an external API requires it.

store.py rules

  • In-memory dict keyed by primary key. Leave the marker:
    # TODO: replace with Cosmos DB (see specs/storage.md)
  • Seed with at least: SKU ZS-1042; locations store-101, store-202, wh-east.

Acceptance

uv run python -m src.mcp_servers.<name>.server &
sleep 1 && curl -fsS http://localhost:8080/healthz
curl -fsS http://localhost:8080/readyz
kill %1

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.