MCP Server — FastAPI
Enables code review of merge requests through GitLab.
Allows creating, retrieving, and drawing boards, and managing design rules on Miro.
Provides browser automation for testing using Selenium.
Sends job notifications to Slack channels.
Performs security scanning of websites and scenarios using OWASP ZAP.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server — FastAPIrun a ZAP security scan on https://staging.example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Model Context Protocol (MCP) Server — FastAPI
A FastAPI-based MCP Server that exposes automation and AI tools via both REST API and MCP protocol. Tools cover performance testing (JMeter), security scanning (OWASP ZAP), browser automation (Playwright, Selenium), code review (GitLab), AI code generation (unit tests, scenario tests, API specs), knowledge retrieval (RAG/Knowledge Base), and design collaboration (Miro).
Table of Contents
Related MCP server: Awesome MCP FastAPI
1. Prerequisites
Docker Compose (included with Docker Desktop)
2. Project Structure
├── functions/
│ └── main.py # FastAPI entry point; registers all routers; configures MCP
├── routers/ # One file per domain (REST endpoints)
├── services/ # Core business logic
├── batch_jobs/
│ ├── base/
│ │ └── subprocess_job_runner.py # Spawns worker processes; tracks state
│ └── jobs/ # One job file per async tool
├── schemas/ # Pydantic request/response models
├── models/ # DynamoDB models, job registry, OWASP ZAP state
├── constants/
│ └── config.py # All env-var constants (source of truth)
├── jobs/
│ └── scheduler.py # APScheduler: background sync jobs
├── prompts/ # Jinja2 prompt templates (organized by feature)
├── skills/ # Markdown skill definitions for agent workflows
├── subagents/ # Agent role documentation for multi-step pipelines
├── ui_s3_manager/ # Sub-app mounted at /ui-s3-manager and /ui-s3
├── data/
│ └── DDL/ # DynamoDB table creation scripts
├── public/ # Static files (served at /public)
├── docker/ # Dockerfiles for fastapi (ZAP uses zaproxy/zap-stable in compose)
├── docker-compose.yml
├── requirements.txt
├── .env.example
└── ruff-guide.md3. Environment Variables
Copy .env.example to .env and fill in the required values:
cp .env.example .envVariable | Required | Description |
| Yes | AWS region for S3, DynamoDB, Bedrock, etc. |
| Yes | AWS credentials |
| Yes | AWS credentials |
| Yes | S3 bucket for uploads and report storage |
GitLab host allowlist | Code | Edit |
| Removed | Replaced by per-request |
| Yes* | Redis host for Miro OAuth state and per-user token storage |
| Yes* | Redis port (default |
| Yes | JWT secret for |
| Yes | Bedrock model ID (e.g. |
| No | Slack incoming webhook URL for job notifications |
| No | Slack channel for notifications |
| No | Backlog domain for backlog sync jobs |
| No | Backlog API key |
| No | Comma-separated Backlog project keys |
| No | Base URL for local LLM (e.g. Ollama: |
| No | Local LLM model name (e.g. |
| No | AWS Bedrock Agent ID |
| No | AWS Bedrock Agent Alias ID |
| No | S3 folder to seed the RAG knowledge base on startup |
Yes*= required only when using that specific tool group.
See .env.example for all RAG, Selenium, and Redis tuning options.
4. Start the Server
Use the OS-specific wrapper script instead of calling docker compose directly. Each script auto-detects the host architecture and sets the correct platform before delegating to Docker.
macOS (Intel or Apple Silicon)
One-time prerequisite for Apple Silicon (M1/M2/M3):
Docker Desktop → Settings → General → enable "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" → Apply & Restart
Step 1 — Build and start:
# All services
./run.sh up --build
# Minimal setup (fastapi + redis only)
./run.sh up --build fastapi redis
# Run in background
./run.sh up -d fastapi redisOn Apple Silicon you will see:
[run.sh] Apple Silicon (arm64) detected — running linux/amd64 containers via Rosetta 2 emulationWindows
# All services
.\run.ps1 up --build
# Minimal setup (fastapi + redis only)
.\run.ps1 up --build fastapi redis
# Run in background
.\run.ps1 up -d fastapi redisCommon commands (both OSes)
# Stop all containers
./run.sh down # macOS
.\run.ps1 down # Windows
# View logs
./run.sh logs -f fastapi
# Open a shell inside the container
docker exec -it fastapi_app bashStep 2 — (One-time) Create DynamoDB tables:
docker exec -it fastapi_app python ./data/DDL/create_dynamodb_tables.pyCheck container logs:
docker logs fastapi_app5. API & MCP Access
Interface | URL |
REST API docs (Swagger) | |
MCP endpoint | |
S3 File Manager UI |
Integrate into an LLM client (MCP config):
{
"mcpServers": {
"local-mcp": {
"url": "http://localhost:8000/mcp"
}
}
}6. Architecture
Request Flow
Client → Router → Service → (optional) Batch Job → DynamoDB / Redis
↑
Client polls GET /api/history/{operation_id} ───────────┘Router (
routers/) — validates the request schema and calls the service.Service (
services/) — core business logic. Short operations (reading rules, file uploads, Miro API calls) return a result immediately. Long-running operations (test execution, security scans, LLM generation) spawn a batch job and return anoperation_id.Batch Job (
batch_jobs/jobs/) — runs in a subprocess viaSubprocessJobRunner; writes status to DynamoDB/Redis. Only used for async operations.Client — polls
GET /api/history/{operation_id}(exposed as theget_resultMCP tool) until the job resolves. Only needed after async operations.
Infrastructure
Service | Description | Exposed Port |
| Main app ( |
|
| 5 parallel OWASP ZAP instances |
|
| Job state / caching |
|
LLM Integration
Service | Description |
| Direct AWS Bedrock invocations |
| Local LLM via |
Model IDs are configured via AWS_BEDROCK_LLM_MODEL in constants/config.py.
MCP Exposure
Only operations listed in include_operations inside functions/main.py are exposed as MCP tools. Endpoints tagged "allure" are additionally exposed via include_tags.
When adding a new router endpoint intended for MCP, add its
operation_idtoinclude_operationsinfunctions/main.py.
Authentication
AuthMiddleware (services/auth_service.py) is applied globally to all routes. JWT secret is configured via AUTH_JWT_SECRET.
7. Available Tools (MCP)
Domain | Operation IDs |
JMeter |
|
OWASP ZAP |
|
Playwright |
|
GitLab |
|
Miro |
|
Spec Generator |
|
Unit Test Generator |
|
Scenario Test Generator |
|
Knowledge Base |
|
Allure | all endpoints tagged |
History |
|
8. Development
All linting and formatting commands run inside the container:
# Open a shell in the container
docker exec -it fastapi_app bash
# Lint
ruff check .
ruff check . --fix # auto-fix
ruff check path/to/file.py
# Format
ruff format .
ruff format path/to/file.py
ruff format . --check # dry run (no changes)This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vandien284/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server