Potencialize seu agente
Instalação do publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
Ainda não há uma versão empacotada no registro. Siga o README do repositório.
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirFull CI/CD status & all badges: docs/ci-cd/badges.mdx | Telemetry Dashboard: vishnu2kmohan.github.io/mcp-server-langgraph
A production-ready cookie-cutter template for building MCP servers with LangGraph's Functional API. Features comprehensive authentication (JWT), fine-grained authorization (OpenFGA), secrets management (Infisical), and OpenTelemetry-based observability.
🎯 Opinionated, production-grade foundation for your MCP server projects.
Pick the quickstart that matches your needs:
New here? → Start with Day-1 Developer Guide for step-by-step instructions
This project uses 19 GitHub Actions workflows with Google Cloud Platform (GCP) Workload Identity Federation for secure deployments.
Quick setup: SECRETS.md | Full CI/CD status: docs/ci-cd/badges.mdx | Workflow details: .github/archive/audits-2025-11/WORKFLOW_AUDIT_REMAINING.md
Quick Links:
Main Sections:
# Generate your own MCP server project
uvx cookiecutter gh:vishnu2kmohan/mcp-server-langgraph
# Answer a few questions and get a fully configured project!
See Cookiecutter Template Strategy for detailed information.
Choose the approach that matches your goals:
💡 Recommendation: Use As Template for production projects, Clone Directly for learning and testing.
This project achieves reference-quality implementation of Anthropic's AI agent best practices with measurable improvements:
See: Complete Assessment | ADR-0023, ADR-0024, ADR-0025
Execute Python code securely with comprehensive validation and sandboxing:
search_tools endpoint (Anthropic best practice)Test Coverage: 162 tests (100% passing) | Security: 96% code coverage | Backends: Docker + Kubernetes
Complete GDPR compliance with 6 API endpoints (Articles 15-21) and PostgreSQL storage backend. Features include atomic deletions, 7-year audit logs, and 14x cost savings vs Redis. Covers GDPR, HIPAA §164.312/§164.316, and SOC2 CC6.6/PI1.4.
See: GDPR API Reference | ADR-0041: PostgreSQL Storage | Storage Configuration | GDPR Compliance Guide
Install optional features on demand: Code Execution ([code-execution]), Secrets Management ([secrets]), Self-Hosted Embeddings ([embeddings]), All Features ([all]). Production requires persistent storage (PostgreSQL/Redis) for GDPR compliance—in-memory mode is blocked.
Code Execution: Requires Docker (local) or Kubernetes (production). Enable with ENABLE_CODE_EXECUTION=true.
27+ property tests, 20+ contract tests, performance regression tracking, mutation testing (80%+ target), strict typing (gradual rollout), OpenAPI validation. See Testing Strategy.
Kubernetes-ready for GKE/EKS/AKS with Helm charts, Kustomize overlays, automated CI/CD, HA (anti-affinity, HPA, PDB), 25+ Prometheus alerts, 4 Grafana dashboards. Service mesh compatible. See Deployment Guide.
Primary Resources:
Deployment & Operations:
Examples: Examples Directory with demos for dynamic context loading, parallel execution, note-taking, and complete workflows
See Production Checklist for detailed requirements.
Using uv (10-100x faster than pip, reproducible builds):
# From PyPI
uv pip install mcp-server-langgraph
# Or clone and develop
git clone https://github.com/vishnu2kmohan/mcp-server-langgraph.git
cd mcp-server-langgraph
uv sync # Installs all dependencies from pyproject.toml + uv.lock
Verify: python -c "import mcp_server_langgraph; print(mcp_server_langgraph.__version__)"
See: Complete Installation Guide for Docker, venv setup, optional dependencies, and configuration
System Flow: MCP Client → Auth Middleware (JWT + OpenFGA) → LangGraph Agent → Observability Stack (Jaeger/Prometheus/Grafana)
Agentic Loop: Implements Anthropic's gather-action-verify-repeat cycle with 6 enhancements:
Multi-Database Design: Single PostgreSQL instance with dedicated databases per service for clear separation of concerns and optimized schema management.
Databases use environment-aware naming for clear separation:
# Development/Staging/Production
gdpr, openfga, keycloak
# Test Environment
gdpr_test, openfga_test, keycloak_test
Detection: Automatic environment detection from POSTGRES_DB variable (suffix _test triggers test mode)
Database initialization is fully automated via migrations/000_init_databases.sh:
Validation: Runtime validation via src/mcp_server_langgraph/health/database_checks.py ensures architecture compliance per ADR-0056.
# Docker Compose (automatic initialization)
docker-compose up -d postgres
# Manual validation
python -c "
from mcp_server_langgraph.health.database_checks import validate_database_architecture
import asyncio
result = asyncio.run(validate_database_architecture())
print(f'Valid: {result.is_valid}')
print(f'Databases: {list(result.databases.keys())}')
"
Get the complete stack running in 2 minutes:
# Quick start script handles everything
./scripts/docker-compose-quickstart.sh
This starts:
Then setup OpenFGA:
python scripts/setup/setup_openfga.py
# Add OPENFGA_STORE_ID and OPENFGA_MODEL_ID to .env
docker-compose restart agent
Test the agent:
curl http://localhost:8000/health
See Docker Compose documentation for details.
uv sync # Install dependencies
make git-hooks # Setup git hooks (REQUIRED for contributors)
cp .env.example .env # Configure (add GOOGLE_API_KEY)
docker-compose up -d openfga postgres # Start infrastructure
python scripts/setup/setup_openfga.py # Setup auth (save IDs to .env)
python -m mcp_server_langgraph.mcp.server_streamable # Run agent
curl http://localhost:8000/health # Test
Git Hooks (2-stage validation):
SECURITY NOTE: As of version 2.8.0, InMemoryUserProvider no longer seeds default users (alice, bob, admin) to prevent hard-coded credential vulnerabilities (CWE-798).
For testing/development with InMemoryUserProvider, explicitly create users:
from mcp_server_langgraph.auth.user_provider import InMemoryUserProvider
# Create provider with password hashing
provider = InMemoryUserProvider(use_password_hashing=True)
# Add test users
provider.add_user(
username="testuser",
password="secure-password-123",
email="[email protected]",
roles=["user", "premium"]
)
provider.add_user(
username="admin",
password="admin-secure-password",
email="[email protected]",
roles=["admin"]
)
For Production: Use KeycloakUserProvider instead of InMemoryUserProvider. See Authentication for configuration details.
python -m mcp_server_langgraph.mcp.server_stdio
python examples/client_stdio.py
Add to your MCP client config (e.g., Claude Desktop):
{
"mcpServers": {
"langgraph-agent": {
"command": "python",
"args": ["/path/to/mcp_server_langgraph/src/mcp_server_langgraph/mcp/server_stdio.py"]
}
}
}
Enterprise-grade authentication and fine-grained authorization powered by Keycloak and OpenFGA:
Quick Example (JWT Authentication):
# 1. Login to get JWT
response = httpx.post("http://localhost:8000/auth/login",
json={"username": "alice", "password": "alice123"})
token = response.json()["access_token"]
# 2. Use token in tool calls
response = httpx.post("http://localhost:8000/message",
json={"method": "tools/call", "params": {"name": "agent_chat", "arguments": {"token": token, "message": "Hello!"}}})
Development Users (⚠️ Plaintext passwords - dev only):
alice / alice123 (premium user) | bob / bob123 (standard user) | admin / admin123 (admin)Production: Use AUTH_PROVIDER=keycloak with proper SSO. See Keycloak Integration Guide for setup.
Production-grade pipeline with 19 GitHub Actions workflows organized into four categories:
Key Metrics: 12 min avg build (66% faster), 80%+ coverage enforced, ~$40/month cost, automated staging + manual prod approval
Multi-layered testing approach ensuring production quality:
Quick Start: make test (runs unit + integration tests)
Coverage Report: make test-coverage (opens htmlcov/index.html)
Complete Details: See Testing Documentation for metrics, strategies, and CI/CD integration
Tests run in parallel across multiple GitHub Actions workflows for comprehensive quality assurance:
Infrastructure:
Parallelization:
Pre-push Hooks:
make validate-pre-push runs all test suites including integration tests (~8-12 min)Best Practice: All workflows run in parallel for fast feedback. Integration tests now have full CI visibility with parallelization, catching infrastructure issues before merge.
Control features dynamically without code changes:
# Enable/disable features via environment variables
FF_ENABLE_PYDANTIC_AI_ROUTING=true # Type-safe routing (default: true)
FF_ENABLE_LLM_FALLBACK=true # Multi-model fallback (default: true)
FF_ENABLE_OPENFGA=true # Authorization (default: true)
FF_OPENFGA_STRICT_MODE=false # Fail-closed vs fail-open (default: false)
FF_PYDANTIC_AI_CONFIDENCE_THRESHOLD=0.7 # Routing confidence (default: 0.7)
# All flags with FF_ prefix (20+ available)
Key Flags:
enable_pydantic_ai_routing: Type-safe routing with confidence scoresenable_llm_fallback: Automatic fallback to alternative modelsenable_openfga: Fine-grained authorization (disable for development)openfga_strict_mode: Fail-closed (deny on error) vs fail-open (allow on error)enable_experimental_*: Master switches for experimental featuresSee: src/mcp_server_langgraph/core/feature_flags.py for all flags and validation
Dual observability stack: OpenTelemetry for infrastructure + LangSmith for LLM-specific tracing.
Set LANGSMITH_API_KEY for automatic tracing of all LLM calls. Features: prompt engineering, evaluations, user feedback, cost tracking, debugging. View at smith.langchain.com.
End-to-end distributed tracing with Jaeger (http://localhost:16686), metrics with Prometheus (http://localhost:9090), structured JSON logging with trace correlation. Automatic collection of 30+ metrics (tool calls, auth failures, response duration).
Quick Start: Run docker compose up to launch full observability stack (Jaeger, Prometheus, Grafana).
The agent uses the functional API with:
src/mcp_server_langgraph/core/agent.py)Add tools in src/mcp_server_langgraph/core/agent.py:
def custom_tool(state: AgentState) -> AgentState:
# Your tool logic
return state
workflow.add_node("custom_tool", custom_tool)
workflow.add_edge("router", "custom_tool")
All settings via environment variables, Infisical, or .env file. Key variable categories:
ANTHROPIC_API_KEY, MODEL_NAME (Claude Sonnet 4.5 default), GOOGLE_API_KEYJWT_SECRET_KEY, OPENFGA_STORE_ID, OPENFGA_MODEL_ID, AUTH_PROVIDER (inmemory/keycloak)OTLP_ENDPOINT, LANGSMITH_API_KEY, LOG_LEVELAccess Grafana at http://localhost:3000 (admin/admin) and create dashboards using:
Example queries:
rate(agent_tool_calls_total[5m])rate(agent_calls_failed_total[5m])histogram_quantile(0.95, agent_response_duration_bucket)🔒 Production Checklist:
Choose your deployment platform based on operational needs:
Kubernetes Platform Maturity:
Quick Kubernetes Deploy:
# Helm deployment
helm install langgraph-agent ./deployments/helm/langgraph-agent --set image.tag=v1.0.0
# Or Kustomize
kubectl apply -k deployments/kustomize/overlays/production
Kong API Gateway integration provides:
# Deploy with Kong rate limiting
helm install langgraph-agent ./deployments/helm/langgraph-agent \
--set kong.enabled=true \
--set kong.rateLimitTier=premium
# Or apply Kong manifests directly
kubectl apply -k deployments/kubernetes/kong/
See Kong Gateway Integration for complete Kong setup and rate limiting configuration.
The agent supports multiple MCP transports:
# StreamableHTTP (recommended for web/production)
python -m mcp_server_langgraph.mcp.server_streamable
# stdio (local/desktop)
python -m mcp_server_langgraph.mcp.server_stdio
# Access StreamableHTTP endpoints
POST /message # Main MCP endpoint (streaming or regular)
GET /tools # List tools
GET /resources # List resources
Why StreamableHTTP?
Registry compliant - Includes manifest files for MCP Registry publication.
See MCP Registry Guide for registry deployment and transport configuration.
Quality Score: 9.6/10 across 7 dimensions (Code Organization, Testing, Type Safety, Documentation, Error Handling, Observability, Security).
Quality Gates: Pre-commit hooks (Ruff linting + formatting, mypy type checking, bandit security scanning) + CI/CD (unit/integration/property/contract/regression/mutation tests, OpenAPI validation). All tests run on Python 3.10-3.12.
Linting & Formatting (consolidated to Ruff for 10-100x faster performance):
make lint-check - Run Ruff linter (replaces flake8 + isort checks)make lint-fix - Auto-fix linting issues + format code (replaces black + isort)make lint-format - Format code only (replaces black)make lint-type-check - Run mypy type checking (unchanged)make lint-security - Run bandit security scan (unchanged)Testing:
make test-unit - Fast unit tests with mocked dependenciesmake test-integration - End-to-end with real infrastructuremake test-coverage - Generate coverage reportmake validate-pre-push - Quick validation (skip integration tests)CI_PARITY=1 make validate-pre-push - Full CI-equivalent validation (includes integration tests)Development: Branch protection, conventional commits, code review required, 59 ADRs documenting architectural decisions.
Thanks to all the amazing people who have contributed to this project! 🙌
This project follows the all-contributors specification.
Want to be listed here? See CONTRIBUTING.md!
Need help? Check out our Support Guide for:
MIT - see LICENSE file for details
Built with:
Special thanks to the open source community!
We welcome contributions from the community! 🎉
Read the guides:
Find something to work on:
Get help:
This project uses tiered validation hooks optimized for developer productivity:
Key Points:
git push --no-verify (use sparingly!)Validation Tiers:
make validate-commit # Tier-1: < 30s (quick checks)
make validate-push # Tier-2: 3-5min (focused validation)
make validate-pre-push # Tier-3: 8-12min (CI-equivalent, includes integration)
See CONTRIBUTING.md for detailed validation workflow.
All contributors will be recognized in our Contributors section!
Agent Studio with Federated Single Sign-On and Fine-Grained Access Controls
Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
MCP Server Langgraph roda localmente via stdio.
Última verificação: 2026-10-28. Agent Studio with Federated Single Sign-On and Fine-Grained Access Controls