- Explore MCP Servers
- agno_mcp_openai_demo
Agno Mcp Openai Demo
What is Agno Mcp Openai Demo
The Agno OpenAI compatible API service provides an interface for clients, such as Cherry Studio, to connect to an agent that functions as a calendar appointment assistant. This service allows users to manage their calendar events through natural language queries and interactions while maintaining compatibility with the OpenAI API.
Use cases
Users can query their schedules, create new events, modify existing appointments, delete unnecessary events, and set reminders simply by using natural language. Common inquiries include checking upcoming appointments for a specific time period or canceling meetings.
How to use
To use the service, install the required dependencies with pip install fastapi uvicorn agno mcp. Then, start the API by running python simple_openai_agent_api.py, which will host the service at http://localhost:8010. Clients can send POST requests to the /v1/chat/completions endpoint to interact with the calendar assistant.
Key features
The API is fully compatible with the OpenAI Chat Completions API, supports streaming responses, includes error handling and logging, and integrates with CalDAV MCP tools for calendar management. It allows users to manage events through direct conversation in multiple languages, including Chinese and emoji.
Where to use
This service can be utilized in applications requiring calendar management functionalities, like personal assistants, scheduling tools, or any client that supports the OpenAI API. It is particularly beneficial for users looking to simplify how they manage their schedules without modifying existing software.
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 Agno Mcp Openai Demo
The Agno OpenAI compatible API service provides an interface for clients, such as Cherry Studio, to connect to an agent that functions as a calendar appointment assistant. This service allows users to manage their calendar events through natural language queries and interactions while maintaining compatibility with the OpenAI API.
Use cases
Users can query their schedules, create new events, modify existing appointments, delete unnecessary events, and set reminders simply by using natural language. Common inquiries include checking upcoming appointments for a specific time period or canceling meetings.
How to use
To use the service, install the required dependencies with pip install fastapi uvicorn agno mcp. Then, start the API by running python simple_openai_agent_api.py, which will host the service at http://localhost:8010. Clients can send POST requests to the /v1/chat/completions endpoint to interact with the calendar assistant.
Key features
The API is fully compatible with the OpenAI Chat Completions API, supports streaming responses, includes error handling and logging, and integrates with CalDAV MCP tools for calendar management. It allows users to manage events through direct conversation in multiple languages, including Chinese and emoji.
Where to use
This service can be utilized in applications requiring calendar management functionalities, like personal assistants, scheduling tools, or any client that supports the OpenAI API. It is particularly beneficial for users looking to simplify how they manage their schedules without modifying existing software.
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
Agno OpenAI 兼容API服务
本项目提供了一个OpenAI兼容的API服务,允许使用支持OpenAI API的客户端(如Cherry Studio)连接到Agno Agent,实现日历预约助手功能。
项目目的
该项目的核心目的是暴露一个OpenAI兼容的API接口,使得像Cherry Studio这样的客户端能够像使用普通大语言模型一样,简单便捷地使用具有工具能力的Agent。这种设计使得不需要修改现有客户端,就能立即获得Agent的高级能力。
本示例中的Agent被赋予了CalDAV MCP工具的能力,可以与远程日历服务器交互,实现日历事件的增删改查等操作。用户可以通过自然语言对话的方式查询自己的日程安排、创建新的日历事件、修改或删除已有事件,如"这个月我有什么日程?"、"取消今天的会议"等。
项目结构
simple_openai_agent_api.py- 主程序文件,启动FastAPI服务并处理请求agno_openai_adapter.py- 适配器模块,封装了OpenAI API兼容层的实现
功能特点
- 完全兼容OpenAI Chat Completions API
- 支持流式(Stream)响应
- 支持中文和emoji表情符号
- 集成了日历管理CalDAV MCP工具,可操作远程日历服务器
- 支持日历事件的增删改查等多种操作
- 通过自然语言对话方式管理日程
- 优雅的错误处理和日志记录
使用场景示例
- 查询指定时间段的日程安排
- 创建新的日历事件和会议
- 修改已有日程的时间或详情
- 取消/删除不需要的日程
- 设置日程提醒
使用方法
安装依赖
pip install fastapi uvicorn agno mcp
启动服务
python simple_openai_agent_api.py
服务将在 http://localhost:8010 上运行。
API端点
Chat Completions API:
- 端点:
/v1/chat/completions - 方法: POST
- 参数示例:
{
"model": "deepseek-v3",
"messages": [
{
"role": "user",
"content": "我的日程安排是什么?"
}
],
"stream": true
}
健康检查:
- 端点:
/health - 方法: GET
设计理念
本项目采用了适配器设计模式,将OpenAI API兼容层的实现详情封装在单独的适配器模块中,使得主程序代码更加简洁明了。这种设计使得将来的维护和扩展变得更加容易。
这种桥接设计允许现有的AI客户端应用立即使用具有工具能力的Agent,无需任何修改,打通了大模型与Agent工具调用的通道。
日志
服务运行日志保存在 agno_api.log 文件中,记录了请求和响应的详细信息。
Dev Tools 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.










