Get the FREE Ultimate OpenClaw Setup Guide →

mcp -cookiecutter

Cookiecutter template for MCP server development with FastMCP

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio biocontext-ai-mcp-server-cookiecutter uvx your_package_name \
  --env UV_PYTHON="3.12 // or required Python version"

How to use

This MCP server is a Python-based template (cookiecutter) designed to help you scaffold a BioContextAI-compliant MCP server using the FastMCP framework. The template generates a Python package that can be run with the uvx tool, allowing you to expose your server to MCP clients via the standard mcp.json configuration. To use it, create your server package with the cookiecutter template, then run your package with uvx to start the MCP server. The included example demonstrates how to register your server in an mcp.json file so clients can discover and communicate with it. You can customize the server behavior through the generated Python package, add endpoints, and configure any required environment variables for your biology-focused MCP workflows.

How to install

Prerequisites

  • Python 3.11+ (or as required by the template)
  • uvx tool (the MCP runner) installed system-wide or in a user environment
  • cookiecutter (for generating the template)

Installation steps

  1. Install cookiecutter (if not already installed): python3 -m pip install --user cookiecutter

  2. Generate the MCP server template from the cookiecutter repository: cookiecutter https://github.com/biocontext-ai/mcp-server-cookiecutter.git

  3. Follow the prompts to customize the generated project (package name, description, etc.).

  4. Build/run the server using uvx: uvx your_package_name

  5. If you prefer to publish and install via PyPI, build a Python package for your MCP server and publish it, then install with uvx your_package_name on any host.

Note: The examples assume you will run the server package name you provided during template generation.

Additional notes

Tips and common considerations:

  • Use the UV_PYTHON environment variable to specify the Python version required by your MCP server, if needed.
  • Ensure your generated package exposes the standard entry points expected by the MCP ecosystem (as per the cookiecutter template).
  • The mcp.json snippet in your client configurations should reference command: "uvx" and args: ["your_package_name"] to start the server.
  • If you encounter environment-related issues, verify that your Python interpreter and uvx are accessible in your PATH.
  • When publishing to PyPI, ensure you set up a release workflow that packages your MCP server correctly and that the registry metadata points to your package name.
  • For testing locally, you can run the server in a virtual environment to avoid conflicts with system Python packages.

Related MCP Servers

Sponsor this space

Reach thousands of developers