ctfd-mcp-server
by MrJamescot
Overview
Provides a Model Context Protocol (MCP) server to enable AI tools and automation to interact with the CTFd platform for challenge retrieval and flag submission.
Installation
python mcp_server.pyEnvironment Variables
- CTFD_BASE_URL
- CTFD_ADMIN_TOKEN
- CTFD_SESSION_COOKIE
- MCP_HOST
- MCP_PORT
- FILE_CACHE_DIR
Security Notes
The internal FastAPI backend (`server/main.py`) hardcodes the target CTFd instance to `https://demo.ctfd.io`, overriding all environment variables (`CTFD_BASE_URL` or `BASE_URL`) and user input through the `/set_base_url` endpoint. This creates a severe functional limitation and a potential security risk, as users attempting to connect to a private CTFd instance would unknowingly send credentials to `demo.ctfd.io`. Additionally, the project's internal communication is flawed: `ctfd_mcp_server.py` (the MCP interface, likely running on default FastAPI port 8000) attempts to call a backend at `http://127.0.0.1:8000`, which could result in a self-referential loop or connection failure since the actual backend (`server/main.py`) defaults to port `9999`. Authentication tokens, cookies, username, and password are saved unencrypted in `server_state.json`, which could be a risk if the server's file system is compromised.
Similar Servers
klavis
Develop and deploy AI agents that interact with a wide array of web services (e.g., Gmail, YouTube, LinkedIn, Supabase, Salesforce, Kubernetes) through a standardized Model Context Protocol (MCP), often orchestrated by an intelligent routing layer like Strata.
mcp-context-forge
Converts web content (HTML, PDF, DOCX, etc.) and local files from a URL into high-quality Markdown format. It supports multiple conversion engines, content optimization, batch processing, and image handling.
mcp-gateway
Aggregates multiple Model Context Protocol (MCP) servers into a single gateway, providing unified search, description, and invocation for their tools, primarily to mitigate context window limits for AI clients.
aap-mcp-server
A Model Context Protocol (MCP) service providing an OpenAPI-based interface for AI agents to interact with Ansible Automation Platform (AAP) APIs.