Legifrance MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Legifrance MCP Server
A production-ready template for developing Model Context Protocol (MCP) servers using Python and FastMCP. This server provides a foundation for creating MCP-compliant servers with comprehensive examples of tools, structured logging, configuration management, and containerized deployment.
The template includes three example MCP tools: a multiply calculator, a code review prompt generator, and a Red Hat logo tool. It demonstrates best practices for MCP server development including proper error handling, health checks, multiple transport protocols (HTTP, SSE, streamable-HTTP), SSL support, and comprehensive development tooling.
Features
FastMCP + FastAPI with multiple transport protocols (HTTP, SSE, streamable-HTTP)
Three example tools: multiply calculator, code review prompt, Red Hat logo
Pydantic configuration via environment variables
Structured JSON logging with structlog
SSL/TLS support for secure deployments
Container-ready with Red Hat UBI base image
OpenShift deployment manifests included
Full CI/CD with GitHub Actions (tests, linting, security, releases)
OAuth integration with PostgreSQL token storage
Related MCP server: MCP Template
Quick Start
git clone https://github.com/jfenal/legifrance-mcp
cd legifrance-mcp
make install # creates venv, installs deps + pre-commit hooks
make local # starts server on localhost:5001Pre-commit includes gitleaks (staged changes) and detect-private-key for secret scanning; CI also runs a full-repository Gitleaks scan. Also enable GitHub Secret Scanning and Push Protection on the repository for defense in depth.
Verify in another terminal:
curl http://localhost:5001/health# Create venv and install
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
pre-commit install
# Configure and run
cp .env.example .env
legifrance-mcp
# Verify
curl http://localhost:5001/healthHow to Use This Template
Option 1: GitHub Template (Recommended)
Click the "Use this template" button at the top of the repository page.
Name your new repository (e.g.,
my-mcp-server).Clone your new repository and follow the rename checklist below.
Option 2: Manual Clone
git clone https://github.com/jfenal/legifrance-mcp.git my-mcp-server
cd my-mcp-server
rm -rf .git
git initRename Checklist
After creating your project, replace all references to legifrance-mcp and legifrance_mcp with your project name. The following files require updates:
File / Directory | What to Change |
| Rename the package directory (e.g., |
|
|
| References in |
|
|
|
|
| App labels, image names, route hostnames in all manifests ( |
| Workflow names and paths |
| Title, description, clone URL, and all badge URLs (tests, coverage, Codespaces) |
| Adjust defaults if your server uses a different port or protocol |
Verify Rename
Run this to catch any leftover references:
grep -rn "template.mcp" --include="*.py" --include="*.yaml" --include="*.yml" --include="*.toml" --include="*.md" .The output should be empty (or only match this README section itself).
Configuration
Variable | Default | Description |
|
| Server bind address |
|
| Server port (1024-65535) |
|
| Transport protocol ( |
|
| SSL private key file path |
|
| SSL certificate file path |
|
| Enable OAuth authentication (see Auth Guide) |
|
| Browser-based OAuth for local dev |
|
| Logging level |
* ENABLE_AUTH defaults to False in .env.example but True in code. Always copy .env.example to .env to start with auth disabled.
Documentation
Guide | Description |
System diagrams, code structure, key components, MCP tools | |
Setup, running locally, testing, code quality | |
Podman, OpenShift, container configuration | |
Workflows, pipeline features, running CI locally | |
Development workflow, commit conventions, PR process | |
Vulnerability reporting policy | |
Release history | |
OAuth setup, auth modes, troubleshooting | |
Your First Tool in 5 Minutes | |
FastMCP and LangGraph client examples |
Contributing
See CONTRIBUTING.md for detailed guidelines.
# Fork, clone, and set up
git clone https://github.com/<your-username>/legifrance-mcp.git
cd legifrance-mcp
make install
# Create a branch, make changes, verify
git checkout -b feat/your-feature
make lint && make test && make pre-commit
# Commit and open a PR
git commit -m "feat: your descriptive message"
git push origin feat/your-featureLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Deterministic OpenAPI 3.x SemVer diff, SPF 10-lookup flattener & WCAG 2.2 / EN 301 549 MCP server.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA production-ready foundation template for building Model Context Protocol (MCP) servers with FastAPI, featuring modular tools, comprehensive testing, and OpenShift deployment configurations. Includes automated transformation scripts to create custom domain-specific MCP servers.71Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA production-ready Python template for building MCP servers with enterprise features including registry integration, configuration management, structured logging, and extensible patterns for tools, resources, and prompts.MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready FastMCP server template supporting local development with stdio and secure web deployment with HTTPS and OAuth.4MIT
- AlicenseNot gradedqualityCmaintenanceA production-ready template for developing Model Context Protocol (MCP) servers using Python and FastMCP.Apache 2.0