Back to Home
fast-ish icon

mcp-server-template

Verified Safe

by fast-ish

Overview

A template for building Model Context Protocol (MCP) servers, enabling AI assistants to interact with external tools, data, and reusable prompts in a structured way.

Installation

Run Command
npx @modelcontextprotocol/inspector python -m src.server

Environment Variables

  • MCP_ALLOWED_DIR
  • OAUTH_CLIENT_ID
  • OAUTH_CLIENT_SECRET
  • OAUTH_ISSUER_URL
  • DATABASE_URL
  • LOG_LEVEL
  • DEBUG

Security Notes

The server template explicitly incorporates strong security principles outlined in its 'SECURITY.md'. Key measures include: strict input validation (Zod/Pydantic), robust path traversal prevention for file system access via `MCP_ALLOWED_DIR` environment variable, comprehensive URL validation (blocking private networks, enforcing HTTPS) for HTTP client tools, guidance on parameterized queries for database interactions to prevent SQL injection, and a focus on secure error handling. Authentication via OAuth 2.1 is advised for HTTP transport. No 'eval' or malicious patterns were found, and it avoids hardcoded secrets by directing users to use environment variables.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Stars0
Forks0
Last Update2025-12-14

Tags

mcpaibackendtypescriptpython