|
4 | 4 | [](https://opensource.org/licenses/MIT)
|
5 | 5 | [](https://pypi.org/project/asktheapi-team-builder/)
|
6 | 6 |
|
7 |
| -A high-level Python library for building and managing networks of autonomous agents that collaborate to solve complex tasks. It’s designed to work seamlessly with APIs defined using the OpenAPI standard. The library provides a clean, type-safe interface for creating, configuring, and running teams of agents, making it easy to orchestrate multi-agent workflows with minimal boilerplate. |
| 7 | +A high-level Python library for building and managing networks of autonomous agents that collaborate to solve complex tasks. It's designed to work seamlessly with APIs defined using the OpenAPI standard. The library provides a clean, type-safe interface for creating, configuring, and running teams of agents, making it easy to orchestrate multi-agent workflows with minimal boilerplate. |
8 | 8 |
|
9 | 9 | ## Features
|
10 | 10 |
|
@@ -126,6 +126,37 @@ result = await team_builder.run_team(
|
126 | 126 | )
|
127 | 127 | ```
|
128 | 128 |
|
| 129 | +## MCP (Model Control Protocol) Support |
| 130 | + |
| 131 | +The library includes built-in support for Model Control Protocol, allowing you to expose your agent teams as API endpoints with automatic tool generation from OpenAPI specifications. |
| 132 | + |
| 133 | +```python |
| 134 | +from asktheapi_team_builder import MCPService, MCPConfig |
| 135 | + |
| 136 | +# Configure MCP service |
| 137 | +mcp_config = MCPConfig( |
| 138 | + transport="sse", # Server-Sent Events transport |
| 139 | + port=8000, # Port to run the MCP server |
| 140 | + name="asktheapi_mcp" # Service name |
| 141 | +) |
| 142 | + |
| 143 | +# Initialize MCP service |
| 144 | +mcp_service = MCPService(mcp_config) |
| 145 | + |
| 146 | +# Start MCP server with OpenAPI spec |
| 147 | +await mcp_service.start_from_spec( |
| 148 | + url_spec="https://api.example.com/openapi.json", |
| 149 | + headers={"Authorization": "Bearer your-token"} |
| 150 | +) |
| 151 | +``` |
| 152 | + |
| 153 | +The MCP service will: |
| 154 | +- Automatically download and parse the OpenAPI specification |
| 155 | +- Classify endpoints into logical groups |
| 156 | +- Generate appropriate tools for each group |
| 157 | +- Expose these tools through a Model Control Protocol interface |
| 158 | +- Handle real-time streaming of agent interactions |
| 159 | + |
129 | 160 | ## Contributing
|
130 | 161 |
|
131 | 162 | Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
|
|
0 commit comments