Papi
What is Papi
pAPI (Python API / Pluggable API) is a modular micro-framework built on FastAPI, designed for creating composable, plugin-oriented web APIs. It enhances FastAPI’s routing capabilities for agent-based applications and modular service architectures.
Use cases
Use cases for pAPI include building scalable web applications, creating tools that can be exposed as MCP-compatible services, and developing applications that require flexible database interactions and dynamic routing.
How to use
To use pAPI, install it via pip and define your API endpoints using the provided decorators. You can register dynamic endpoints, manage dependencies, and transform HTTP endpoints into MCP-compatible tools effortlessly.
Key features
Key features of pAPI include a plug-and-play architecture for dynamic endpoint registration, native MCP integration for seamless tool exposure, and multi-database support allowing connections to various databases like MongoDB, SQL databases, and Redis.
Where to use
pAPI can be used in web development projects that require modular and composable APIs, particularly in applications that utilize microservices, agent-based systems, or require integration with multiple databases.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Papi
pAPI (Python API / Pluggable API) is a modular micro-framework built on FastAPI, designed for creating composable, plugin-oriented web APIs. It enhances FastAPI’s routing capabilities for agent-based applications and modular service architectures.
Use cases
Use cases for pAPI include building scalable web applications, creating tools that can be exposed as MCP-compatible services, and developing applications that require flexible database interactions and dynamic routing.
How to use
To use pAPI, install it via pip and define your API endpoints using the provided decorators. You can register dynamic endpoints, manage dependencies, and transform HTTP endpoints into MCP-compatible tools effortlessly.
Key features
Key features of pAPI include a plug-and-play architecture for dynamic endpoint registration, native MCP integration for seamless tool exposure, and multi-database support allowing connections to various databases like MongoDB, SQL databases, and Redis.
Where to use
pAPI can be used in web development projects that require modular and composable APIs, particularly in applications that utilize microservices, agent-based systems, or require integration with multiple databases.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
pAPI – Python/Pluggable API Framework
pAPI is a modular micro-framework built on top of FastAPI for composing scalable, tool-oriented APIs. It extends FastAPI’s routing system with native support for modular service architectures, addon discovery, and LLM tooling.
📚 Documentation: Full documentation is currently a work in progress (WIP).
👉 https://efirvida.github.io/pAPI/
🧪 Example addons are available in theextra_addons
branch
✨ Key Features
-
🔌 Plug-and-Play Architecture
Modular addon system with automatic route discovery and dependency resolution. -
🧠 LLM Tooling & MCP Integration
Expose endpoints as tools for agent frameworks using SSE and standard response models. -
🧬 Multi-Database Support
Native support for MongoDB (Beanie), SQL databases (SQLAlchemy), and Redis. -
📦 Standardized API Responses
Unified success/error format with automatic metadata injection and exception handling. -
⚡ Performance-Optimized
Fully async, lazily loaded, and built on FastAPI’s high-performance core. -
🛠️ Developer Tooling
Async-enabled IPython shell for rapid development.
🧩 Addon System
pAPI is built around a composable addon architecture, where each addon functions like a LEGO® piece—self-contained, reusable, and designed to interlock with others.
These addons can:
- Register API routes (
RESTRouter
) - Define database models (Beanie or SQLAlchemy)
- Hook into startup, shutdown processes (
AddonSetupHook
)
Together, they form a cohesive and scalable API system, enabling you to build robust, modular services by simply connecting or extending the building blocks your application needs.
Addons are declared in config.yaml
, allowing clean separation of concerns and easy configuration.
📊 Use Cases
-
AI Agent Tooling
Build modular tools for LLMs and agents. -
Composable Microservices
Create reusable, pluggable service components. -
Rapid API Prototyping
Launch structured APIs quickly with standardized behavior. -
Security and Auth Systems
Implement RBAC/ABAC policies using addon-based security modules.
🚀 Getting Started
git clone https://github.com/efirvida/pAPI.git
cd pAPI
rye sync
rye run python papi/cli.py --help
🧠 Learn More
Check the documentation for:
- Addon development
- CLI usage
- Response formatting
- Database integrations
- MCP/LLM support
👉 https://efirvida.github.io/pAPI/
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature
) - Commit your changes
- Push and open a Pull Request
🪪 License
MIT License © 2025 — Eduardo Miguel Firvida Donestevez
DevTools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.