- Python 3.13+
- uv (package manager)
- ruff (linting/formatting)
- ty (type checking)
- Docker (for testing bundles)
# Clone the repo
git clone https://github.com/NimbleBrainInc/mcp-example.git
cd mcp-example
# Install dependencies
uv sync --dev
# Run checks
make checkThese skills automate common development tasks:
mpak skill install @nimblebraininc/nimblebrain-contributor
mpak skill install @nimblebraininc/build-mcpb- Add response models to
src/mcp_example/api_models.py - Add client methods to
src/mcp_example/api_client.py - Add the tool to
src/mcp_example/server.pyusing@mcp.tool() - Add tests to
tests/ - Run checks:
make check
- One tool per API operation (
list_items,get_item,create_item) - Clear docstrings with Args/Returns sections
- Optional
ctx: Context | None = Noneparameter for logging - Return Pydantic models, not raw dicts
- Catch API errors and log via context
All code must pass before merging:
uv run ruff format src/ tests/ # Format code
uv run ruff check src/ tests/ # Lint
uv run ty check src/ # Type check
uv run pytest tests/ -v # Run testsOr simply: make check
- Create a branch from
main - Make your changes
- Run
make checkand fix any issues - Push and create a PR
- CI must pass (lint, typecheck, test, bundle)
- All new tools have docstrings with Args/Returns
- Pydantic models added for API responses
- Tests added for new functionality
-
make checkpasses locally - No hardcoded secrets or API keys
- 5+ tools implemented
- manifest.json valid (v0.4)
- 5+ tests passing
- CI/CD workflow passing
- MTF scanner passes (no critical/high findings)
- SKILL.md with complete frontmatter
- Composes 2+ tools into a workflow
mpak skill validatepasses- At least 2 usage examples