Migrate from Heroku and get up to $10k in credits

Get started

MCP server template - Python

Deploy the MCP Server Python template on Render with one click. Includes FastMCP, auth, and health checks ready to go.

Why deploy an MCP server (Python) on Render?

MCP Server Python is a template for building Model Context Protocol servers in Python using the official MCP Python SDK. It provides a ready-to-deploy structure with authentication, health checks, and example tooling so developers can quickly expose custom tools to AI agents and LLM-powered applications via a standardized protocol.

This template gives you a production-ready MCP server with bearer token authentication already configured—Render auto-generates a secure MCP_API_TOKEN on deploy, so you skip the setup of secrets management entirely. Instead of manually wiring up Streamable HTTP transport, health checks, and auth middleware, you get a working server with one click that's ready to extend with your own tools. The included AGENTS.md file means AI coding assistants can scaffold new MCP tools for you directly, and Render's environment variable management makes token rotation as simple as editing a value in the dashboard.

Architecture

What you can build

After deploying, you'll have a live MCP server endpoint that AI coding tools like Cursor, Claude Desktop, or Codex can connect to immediately. The server comes with token-based auth (auto-generated on deploy) and a sample tool you can replace with your own. It's a starting point for giving LLMs access to custom tools you define in Python.

Key features

  • Streamable HTTP transport: Uses the MCP Python SDK with Streamable HTTP transport for building MCP-compliant servers that work with Cursor, Claude Desktop, and Codex.
  • Bearer token auth: Auto-generates MCP_API_TOKEN on deploy and validates Authorization headers, with auth disabled when unset for local development.
  • Decorator-based tools: Add new tools with @mcp.tool() decorators where docstrings automatically become tool descriptions exposed to LLMs.
  • Render Blueprint deploy: Includes render.yaml for one-click deployment with pre-configured health checks and environment variables.
  • AI assistant scaffolding: Ships with AGENTS.md so Cursor, Copilot, and Codex can automatically generate new tools following project conventions.

Use cases

  • Solo dev deploys a private API tool for Claude Desktop
  • Team lead prototypes custom MCP tools before production rollout
  • Freelancer gives clients AI access to project-specific utilities
  • Hobbyist learns MCP patterns with a deployable starter template

What's included

Service
Type
Purpose

Next steps

  1. Open the Render Dashboard, navigate to your service's Environment tab, and copy the MCP_API_TOKEN value — you should see a randomly generated token string that was auto-created during deployment.
  2. Configure your MCP client (Cursor, Claude Desktop, or Codex) with your service URL and token using the examples in the README — when you restart the client, it should connect without authentication errors and list hello as an available tool.
  3. Test the hello tool by asking your MCP client to run it with a name parameter — you should receive a greeting response like "Hello, [name]!" confirming the server is processing tool calls correctly.

Resources

Stack

python

Tags

ai
mcp