A simple fastMCP example for a personal MCP server. Uses a set of documentation files (not included in repo) to allow agents to build targetted profiles of employment and project history.
The live MCP server can be accessed at hjhero.com/mcp Configuration instructions available at hjhero.com
This MCP server can run as:
streamable-http(default) for hosted/network deploymentstdiofor local desktop MCP clients
python personal_mcp.pyBy default this starts:
- Transport:
streamable-http - Host:
0.0.0.0 - Port:
PORT(if set), otherwiseMCP_PORT(default8000) - MCP path:
/mcp
MCP_TRANSPORT=streamable-http|sse|stdioMCP_HOST(default0.0.0.0)PORT(cloud platform runtime port; preferred if set)MCP_PORT(default8000; used whenPORTis not set)MCP_STREAMABLE_HTTP_PATH(default/mcp)MCP_MOUNT_PATH(optional; SSE mount path)MCP_API_KEY(optional; if set, HTTP requests requireAuthorization: Bearer <key>orx-api-key: <key>)MCP_HEALTH_PATH(default/healthz)MCP_LOG_LEVEL(defaultinfo)
Example:
MCP_HOST=0.0.0.0 MCP_PORT=8080 MCP_TRANSPORT=streamable-http python personal_mcp.pypython personal_mcp.py --transport stdioBuild image:
docker build -t personal-mcp:latest .Run container:
docker run --rm -p 8000:8000 \
-e MCP_TRANSPORT=streamable-http \
-e MCP_HOST=0.0.0.0 \
-e MCP_PORT=8000 \
personal-mcp:latestThe docker container can be deployed to platforms like Render, Railway, Fly.io, Azure Container Apps, or ECS/Fargate. It is currently hosted on a Macbook Air.
Recommended production settings:
- Keep
MCP_TRANSPORT=streamable-http - Bind
MCP_HOST=0.0.0.0 - Use
PORTfrom the platform runtime (orMCP_PORTfallback) - Set
MCP_API_KEYso public HTTP requests require authentication - Keep health checks on
GET /healthz(or override withMCP_HEALTH_PATH) - Put TLS and auth in front of the service before exposing it publicly
- If
MCP_API_KEYis set, unauthenticated HTTP requests are rejected with401. - The health endpoint remains open by default for platform health probes.
- For internet exposure, still prefer placing this behind a managed API gateway/reverse proxy for rate limiting and audit logging.
