Skip to main content

Overview

Infisical provides end-to-end encrypted secrets management for your MCP Server. Store API keys, credentials, and configuration securely with automatic injection and rotation.
Infisical is an open-source alternative to HashiCorp Vault with a focus on developer experience and end-to-end encryption.

Why Infisical?

Security

  • End-to-end encryption
  • Zero-knowledge architecture
  • Audit logging
  • Secret versioning

Developer Experience

  • Simple API
  • CLI tools
  • SDK support
  • Auto-injection

Operations

  • Secret rotation
  • Access controls
  • Environment sync
  • Compliance ready

Integration

  • Kubernetes native
  • CI/CD pipelines
  • Cloud platforms
  • Docker Compose

Quick Start

1

Sign Up

  1. Go to https://app.infisical.com
  2. Create account
  3. Create organization
  4. Create project: “mcp-server-langgraph”
2

Create Service Account

In Infisical Dashboard:
  1. Go to Project Settings → Service Accounts
  2. Click “Create Service Account”
  3. Name: langgraph-production
  4. Select environment: production
  5. Set permissions: Read
  6. Copy Client ID and Client Secret
3

Configure Application

4

Add Secrets to Infisical

In Infisical Dashboard:
  1. Go to Secrets
  2. Select production environment
  3. Add secrets:
    • ANTHROPIC_API_KEY
    • GOOGLE_API_KEY
    • JWT_SECRET_KEY
    • KEYCLOAK_CLIENT_SECRET
    • REDIS_PASSWORD
5

Test Integration

Self-Hosted Deployment

Usage Patterns

Automatic Secret Loading

Secrets are automatically loaded on application startup:

Manual Secret Retrieval

Environment-Specific Secrets

Kubernetes Integration

Infisical Operator

Service Account Credentials

Auto-Inject Secrets

Secret Organization

Folder Structure

Naming Conventions

Good:
  • ANTHROPIC_API_KEY (service + type)
  • DATABASE_PASSWORD (resource + type)
  • JWT_SECRET_KEY (purpose + type)
Bad:
  • KEY1 (unclear)
  • secret (not descriptive)
  • temp_api_key (indicates temporary usage)

Access Control

Role-Based Access

Audit Logging

Enable audit logs to track secret access:

Secret Rotation

Manual Rotation

Automatic Rotation

Zero-Downtime Rotation

Best Practices

Never commit secrets to Git:
Create dedicated service accounts per environment:
  • langgraph-dev (development)
  • langgraph-staging (staging)
  • langgraph-prod (production)
  • cicd-deploy (CI/CD pipelines)
Grant minimal necessary permissions:
Establish rotation schedule:
  • API Keys: Every 90 days
  • Passwords: Every 60 days
  • JWT Secrets: Every 30 days
  • After Incidents: Immediately
Enable and review audit logs:

Migration from .env Files

1

Export Secrets

Import script

with open(‘secrets.txt’) as f: for line in f: key, value = line.strip().split(’=’, 1) client.create_secret( secret_name=key, secret_value=value, project_id=project_id, environment=“production” )
2

Verify

Troubleshooting

Check:
  • Secret name matches exactly (case-sensitive)
  • Correct environment selected
  • Service account has access
  • Project ID correct
Solutions:
  • Cache secrets locally
  • Use Kubernetes operator for auto-sync
  • Batch secret retrieval

Next Steps

Kubernetes Deployment

Deploy with Infisical operator

Security Overview

Learn security architecture

Production Checklist

Secrets management requirements

Configuration

Configure application

Secure by Default: Infisical ensures your secrets are encrypted and centrally managed!