AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Template Fastapi

mcp-ks6088ts-labs-template-fastapi · by ks6088ts-labs

A comprehensive FastAPI template

No reviews yet
0 installs
28 views
0.0% view→install

Install

$ agentstack add mcp-ks6088ts-labs-template-fastapi

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-ks6088ts-labs-template-fastapi)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Template Fastapi? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

[](https://github.com/ks6088ts-labs/template-fastapi/actions/workflows/test.yaml?query=branch%3Amain) [](https://github.com/ks6088ts-labs/template-fastapi/actions/workflows/docker.yaml?query=branch%3Amain) [](https://github.com/ks6088ts-labs/template-fastapi/actions/workflows/docker-release.yaml) [](https://github.com/ks6088ts-labs/template-fastapi/actions/workflows/ghcr-release.yaml) [](https://github.com/ks6088ts-labs/template-fastapi/actions/workflows/github-pages.yaml)

template-fastapi

A comprehensive FastAPI template with Azure cloud services integration, Agent-based workflows, and multi-service API architecture.

Features

  • Multiple API Services: Items management, file operations, restaurant discovery, speech transcription, and agent-based chat
  • Azure Cloud Integration: CosmosDB, Blob Storage, OpenAI, AI Speech, and Application Insights
  • Agent Workflows: LangGraph and Azure AI Foundry integration for conversational AI
  • Real-time Communication: WebSocket-based chat functionality
  • Comprehensive Logging: Configurable log levels with structured error handling
  • Testing & Quality: 37+ automated tests with logging and monitoring
  • Container Ready: Docker support with multi-stage builds

Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/ks6088ts-labs/template-fastapi.git
cd template-fastapi

# Install dependencies
make install-deps-dev

# Copy environment template
cp .env.template .env
# Edit .env with your Azure service credentials

Running the Application

# Development server with hot reload
make dev

# Production server
make run

# Run tests
make test

# View documentation
make docs-serve

The API will be available at http://localhost:8000 with interactive documentation at http://localhost:8000/docs.

API Services

Core Services

  • Items API (/items/): CRUD operations for item management
  • Files API (/files/): File upload, download, and management with Azure Blob Storage
  • Restaurants API (/foodies/): Restaurant discovery with geospatial search
  • Speech API (/speeches/): Batch transcription jobs using Azure AI Speech

Agent Services

  • LangGraph Agents (/agents/langgraph/): AI agents with custom tools
  • Azure AI Foundry (/agents/azure-ai-foundry/): Thread-based conversations
  • Chat Interface (/chats/): Real-time WebSocket chat with agent integration

Demo & Utilities

  • Demo Endpoints (/demos/): Dice rolling, flaky endpoints for testing
  • Health & Monitoring: Application Insights integration with OpenTelemetry

Configuration

Environment Variables

Key configuration options in .env:

# Logging
LOG_LEVEL=INFO  # DEBUG, INFO, WARNING, ERROR, CRITICAL

# Azure OpenAI
AZURE_OPENAI_ENDPOINT=https://.openai.azure.com/
AZURE_OPENAI_API_KEY=
AZURE_OPENAI_MODEL_CHAT=gpt-4o

# Azure Storage & Database
AZURE_COSMOSDB_CONNECTION_STRING=
AZURE_BLOB_STORAGE_CONNECTION_STRING=

# Monitoring
APPLICATIONINSIGHTS_CONNECTION_STRING=

See .env.template for complete configuration options.

Docker Deployment

# Build image
make docker-build

# Run container
docker run -p 8000:8000 --env-file .env ks6088ts/template-fastapi:latest

Development

Project Structure

template_fastapi/
├── routers/          # API route handlers
│   ├── agents/       # Agent-based endpoints
│   ├── chats.py      # WebSocket chat
│   ├── demos.py      # Demo endpoints
│   ├── files.py      # File operations
│   ├── foodies.py    # Restaurant API
│   ├── items.py      # Items CRUD
│   └── speeches.py   # Speech transcription
├── models/           # Pydantic data models
├── repositories/     # Data access layer
├── settings/         # Configuration management
└── templates/        # Jinja2 templates

Testing

# Run all tests
make test

# Run with coverage
pytest --cov=template_fastapi

# Run specific test file
pytest tests/test_api.py -v

Code Quality

# Format code
make format

# Lint code
make lint

# Apply auto-fixes
make fix

Azure Functions Deployment

The application supports Azure Functions deployment:

# Export requirements
uv export --format requirements-txt --no-dev --no-hashes --output-file requirements.txt

# Deploy to Azure Functions
func azure functionapp publish 

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run quality checks (make ci-test)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.