loading…
Search for a command to run...
loading…
Provides direct access to AI governance framework documents, risks, and mitigations from FINOS repositories, enabling research and risk management through natur
Provides direct access to AI governance framework documents, risks, and mitigations from FINOS repositories, enabling research and risk management through natural language in Claude, VS Code, and other MCP-compatible tools.
AI governance framework document access through the Model Context Protocol.
This project provides direct access to AI governance framework documents from FINOS repositories through MCP, making them available in Claude, VS Code, Cursor, and other supported tools.
# Clone the repository
git clone https://github.com/finos/aigf-mcp-server.git
cd aigf-mcp-server
# Create and activate a virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -e .
# Required security setting (generate your own value; choose one)
export FINOS_MCP_CACHE_SECRET=$(python -c "import secrets; print(secrets.token_hex(32))")
# OR
export FINOS_MCP_CACHE_SECRET=$(openssl rand -hex 32)
# Test
finos-mcp --help
mcp list tools
Note: Using a virtual environment isolates project dependencies from your system Python, preventing conflicts and keeping your environment clean. This is the recommended approach for Python development.
→ Full Setup Guide - Connect to Claude, VS Code, Cursor, etc.
This repository now includes:
Dockerfile for a production-style container imagedocker-compose.yml for local deployment# 1) Create Docker env file
cp .env.docker.example .env.docker
# 2) Put a real 32+ char value in .env.docker
# FINOS_MCP_CACHE_SECRET=...
# 3) Start
docker compose up --build -d
# 4) Follow logs
docker compose logs -f finos-mcp-server
Server endpoint:
http://localhost:8000/mcpdocker build -t finos-mcp-server:latest .
docker run --rm -p 8000:8000 \
-e FINOS_MCP_CACHE_SECRET="$(openssl rand -hex 32)" \
-e FINOS_MCP_MCP_TRANSPORT=http \
-e FINOS_MCP_MCP_HOST=0.0.0.0 \
-e FINOS_MCP_MCP_PORT=8000 \
finos-mcp-server:latest
Use the same container image and pass environment variables at deploy time:
FINOS_MCP_CACHE_SECRET (required, minimum 32 chars)FINOS_MCP_MCP_TRANSPORT=httpFINOS_MCP_MCP_HOST=0.0.0.0FINOS_MCP_MCP_PORT (for example 8000)FINOS_MCP_GITHUB_TOKEN (recommended)FINOS_MCP_MCP_AUTH_ENABLED=true, then FINOS_MCP_MCP_AUTH_ISSUER, FINOS_MCP_MCP_AUTH_AUDIENCE, and one of FINOS_MCP_MCP_AUTH_JWKS_URI or FINOS_MCP_MCP_AUTH_PUBLIC_KEY are also required.Cloud mapping examples:
FINOS_MCP_CACHE_SECRETDeployment env vars + Secret for sensitive values| Tool Name | Description | Use Case |
|---|---|---|
list_frameworks |
List all available AI governance frameworks | Get overview of the runtime-discovered framework catalog |
get_framework |
Get complete content of a specific framework | Retrieve complete framework document content |
search_frameworks |
Search for text within framework documents | Find specific content within framework documents |
list_risks |
List all available risk documents | Get overview of AI governance risks |
get_risk |
Get complete content of specific risk documents | Retrieve detailed risk documentation |
| Tool Name | Description | Use Case |
|---|---|---|
search_risks |
Search within risk documentation | Find specific risks by keyword |
list_mitigations |
List all available mitigation documents | Get overview of available mitigations |
get_mitigation |
Get complete content of specific mitigation documents | Retrieve detailed mitigation strategies |
search_mitigations |
Search within mitigation documentation | Find specific mitigations by keyword |
| Tool Name | Description | Use Case |
|---|---|---|
get_service_health |
Get basic service health status | Monitor system availability and status |
get_cache_stats |
Get cache performance statistics | Monitor cache performance and efficiency |
list_frameworks to see the current catalog available to your deployment.| Risk Type | Description | Example Risks |
|---|---|---|
| Security | Information security and cybersecurity risks | Data leakage, prompt injection, adversarial attacks |
| Operational | Business and operational risks | AI bias, model drift, hallucination |
| Privacy | Data privacy and protection risks | Data exposure, unauthorized access |
| Transparency | Explainability and accountability risks | Model opacity, decision traceability |
| Mitigation Type | Description | Example Controls |
|---|---|---|
| Prevention | Proactive controls to prevent risks | Access controls, bias testing, data validation |
| Detection | Controls to detect and monitor risks | Performance monitoring, anomaly detection |
| Response | Controls to respond to identified risks | Incident response, model rollback procedures |
list_frameworks to see all supported governance frameworksget_framework to retrieve complete framework documentssearch_frameworks to find specific text within frameworkslist_risks to see all documented AI governance risksget_risk to retrieve complete risk documentationsearch_risks to find specific risks by keywordlist_mitigations to see all documented mitigation strategiesget_mitigation to retrieve complete mitigation documentationsearch_mitigations to find specific mitigations by keywordget_service_health to monitor system availabilityget_cache_stats to monitor cache performancesrc/finos_mcp/fastmcp_server.py): FastMCP server construction, model definitions, and tool registration wiringsrc/finos_mcp/api/): Dedicated tool/resource/prompt registration and MCP payload mappingsrc/finos_mcp/application/): Search text parsing, prompt composition, observability projection, and domain flowssrc/finos_mcp/content/): Dynamic content loading and cachingsrc/finos_mcp/security/): Request validation and protectionsrc/finos_mcp/fastmcp_server.py): Middleware-based rate limiting, safe error responses, and payload size enforcementunavailable responses when upstream content cannot be reached# Install development dependencies
pip install -e ".[dev,security,test]"
# Run CI-equivalent checks locally
./scripts/ci-local.sh
# Run tests
pytest
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run fast tests
pytest -c pytest.fast.ini
# Test MCP server
mcp list tools
Tool additions follow the layered runtime pattern:
src/finos_mcp/api/tools/src/finos_mcp/application/use_cases/src/finos_mcp/fastmcp_server.pytests/unit/ and integration coverage where neededEnvironment variables and configuration:
src/finos_mcp/content/cache.pysrc/finos_mcp/security/FINOS_MCP_CACHE_SECRET is required at startup.
# Option 1 (Python)
export FINOS_MCP_CACHE_SECRET=$(python -c "import secrets; print(secrets.token_hex(32))")
# Option 2 (OpenSSL)
export FINOS_MCP_CACHE_SECRET=$(openssl rand -hex 32)
Notes:
Use JWT validation (FastMCP JWTVerifier) to protect the MCP boundary in production.
export FINOS_MCP_MCP_AUTH_ENABLED=true
export FINOS_MCP_MCP_AUTH_ISSUER=https://auth.example.com
export FINOS_MCP_MCP_AUTH_AUDIENCE=finos-mcp-server
export FINOS_MCP_MCP_AUTH_JWKS_URI=https://auth.example.com/.well-known/jwks.json
export FINOS_MCP_MCP_AUTH_REQUIRED_SCOPES=governance:read,governance:write
Notes:
FINOS_MCP_MCP_AUTH_JWKS_URI or FINOS_MCP_MCP_AUTH_PUBLIC_KEY.Authorization: Bearer <JWT>.Transport and network binding are config-driven (no hardcoded host/port in runtime code):
# Local MCP client default
export FINOS_MCP_MCP_TRANSPORT=stdio
# HTTP exposure example
export FINOS_MCP_MCP_TRANSPORT=http
export FINOS_MCP_MCP_HOST=127.0.0.1
export FINOS_MCP_MCP_PORT=8000
# End-to-end stdio MCP test
FINOS_RUN_LIVE_MCP_TEST=1 ./venv/bin/pytest -q tests/integration/test_live_mcp_server.py
# End-to-end HTTP MCP test (starts server + probes /mcp)
./scripts/test-http-transport.sh
# End-to-end HTTP auth boundary test (unauthorized/forbidden/authorized)
./scripts/test-auth-http-transport.sh
Use .env.example as the canonical source and override by environment in production.
| Variable | Default | Required | Purpose / Guidance |
|---|---|---|---|
FINOS_MCP_MCP_TRANSPORT |
stdio |
No | Runtime transport. Use stdio for local clients; use http or streamable-http for network exposure. |
FINOS_MCP_MCP_HOST |
127.0.0.1 |
For non-stdio | Bind host for network transports. Keep loopback unless behind controlled ingress. |
FINOS_MCP_MCP_PORT |
8000 |
For non-stdio | Bind port for network transports. |
FINOS_MCP_MCP_AUTH_ENABLED |
false |
No | Enables JWT boundary authentication. Set true for production. |
FINOS_MCP_MCP_AUTH_ISSUER |
(none) | If auth enabled | Expected JWT iss claim. |
FINOS_MCP_MCP_AUTH_AUDIENCE |
(none) | If auth enabled | Expected JWT aud claim. |
FINOS_MCP_MCP_AUTH_JWKS_URI |
(none) | One of verifier pair | Recommended verifier source (supports key rotation). |
FINOS_MCP_MCP_AUTH_PUBLIC_KEY |
(none) | One of verifier pair | Static PEM verifier source. Do not set with JWKS_URI. |
FINOS_MCP_MCP_AUTH_REQUIRED_SCOPES |
(none) | No | Comma-separated required scopes for all requests. |
FINOS_MCP_HTTP_TIMEOUT |
30 |
No | Outbound request timeout in seconds. |
FINOS_MCP_ENABLE_CACHE |
true |
No | In-memory content cache toggle. |
FINOS_MCP_CACHE_MAX_SIZE |
1000 |
No | Max entries in cache. Increase carefully with memory limits. |
FINOS_MCP_CACHE_TTL_SECONDS |
3600 |
No | Cache TTL in seconds. |
FINOS_MCP_GITHUB_TOKEN |
(none) | Recommended | Raises GitHub API limits and stability for dynamic content sync. |
FINOS_MCP_LOG_LEVEL |
INFO |
No | Runtime log verbosity. |
FINOS_MCP_DEBUG_MODE |
false |
No | Enables verbose diagnostics; avoid in production unless troubleshooting. |
Production baseline:
FINOS_MCP_MCP_AUTH_ENABLED=trueFINOS_MCP_MCP_TRANSPORT=http (or streamable-http) behind TLS ingressFINOS_MCP_MCP_HOST=127.0.0.1 when fronted by reverse proxyFINOS_MCP_MCP_AUTH_JWKS_URI, FINOS_MCP_MCP_AUTH_ISSUER, FINOS_MCP_MCP_AUTH_AUDIENCERun full automated release gates:
./scripts/go-live-gate.sh
Includes:
./scripts/ci-local.shmcp list toolsSoftware License Content License
Выполни в терминале:
claude mcp add finos-ai-governance-mcp-server -- npx Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development