jaf-py
Functional Python agent framework with MCP support, enterprise security, immutable state, and production-ready observability for building scalable AI systems.
claude mcp add --transport stdio xynehq-jaf-py python -m jaf.server \ --env JAF_LOG_LEVEL="INFO (or desired log level)" \ --env JAF_CONFIG_PATH="path/to/config (optional)"
How to use
JAF-py is a Python implementation of the Juspay Agent Framework (MCP) server. It provides a production-grade FastAPI server with built-in observability, security guards, and a robust MCP (Model Context Protocol) tool integration layer. The server exposes MCP-compliant endpoints to load, execute, and manage tools, enabling agents to call tools, receive structured outputs, and transport data via Stdio or SSE. With the Python backend, you get type-safe models (via Pydantic), immutable state patterns, and a rich set of security and auditing features suitable for enterprise deployments. You can use the MCP client capabilities to dynamically discover and load tools at runtime, integrate with external services, and orchestrate multi-step agent workflows through hierarchical tool usage and session management.
To interact with the server, run the FastAPI-based service (as configured in the mcp_config) and utilize the MCP protocol methods to request tool execution, handle tool outputs, and manage session contexts. The server supports standard MCP transports, including Stdio and SSE, enabling seamless communication with agents and clients in various environments. If you’re new to JAF-py, start from the official documentation and examples to see practical MCP tool integration and agent orchestration workflows.
How to install
Prerequisites:
- Python 3.10 or newer
- pip (Python package manager)
- Optional: virtual environment tool (venv, conda, etc.)
Install from GitHub (latest development version):
# Install directly from GitHub (editable install for development)
pip install git+https://github.com/xynehq/jaf-py.git
Install with server-related extras (recommended for MCP server usage):
# Optional: install all server-related features
pip install "jaf-py[server]" @ git+https://github.com/xynehq/jaf-py.git
Run the server locally (example):
# If you installed via pip, you can run the server module directly
python -m jaf.server
Verify installation and basic style checks (optional during development):
pytest
mypy jaf/
ruff check jaf/
Documentation and development setup:
# Clone the repository for development
git clone https://github.com/xynehq/jaf-py
cd jaf-py
pip install -e ".[dev]"
Notes:
- If you’re deploying, consider using a production ASGI server (e.g., Uvicorn with Gunicorn) and appropriate reverse proxy configuration.
- Enable optional extras as needed (visualization, tracing, memory providers) using the provided [server] and other feature sets.
Additional notes
Environment variables and configuration tips:
- JAF_LOG_LEVEL: Set logging level (e.g., INFO, DEBUG) to control output verbosity.
- JAF_CONFIG_PATH: Optional path to a YAML/JSON config file for MCP server bootstrapping.
- When using MCP transport, ensure proper firewall and network policies allow Stdio or SSE connections as required by your deployment scenario.
- If you extend the server with additional tools, consider using the MCP auto-discovery feature to dynamically load tools at runtime.
- For production, enable OpenTelemetry, Langfuse tracing, and structured logging to improve observability and debugging.
Related MCP Servers
mcp-agent
Build effective agents using Model Context Protocol and simple workflow patterns
sec-edgar
A SEC EDGAR MCP (Model Context Protocol) Server
decipher-research-agent
Turn topics, links, and files into AI-generated research notebooks — summarize, explore, and ask anything.
neurolink
Universal AI Development Platform with MCP server integration, multi-provider support, and professional CLI. Build, test, and deploy AI applications with multiple ai providers.
prospectio-api
MCP/API server that helps you to connect to different lead generation app
local-history
MCP server for accessing VS Code/Cursor's Local History