About MCP Code Agent With OpenAI LLMs
This project is an OpenAI LLM-based MCP client agent intended to access tools and resources through MCP servers. Code actions are still in progress; the project runs as a Chainlit app and includes a weather-server example.
Key features
- 01OpenAI LLM-based agent
- 02Connects to MCP servers
- 03Chainlit application interface
- 04Includes a weather-server example
Use cases
- 01Access tools and resources through MCP servers
- 02Run an OpenAI agent in Chainlit
- 03Try the project with its weather-server example
MCP support
The client connects to MCP servers to access tools and resources; the README demonstrates starting a weather server.
Details
From the project READMEMCP Code Agent With OpenAI LLMs
📘 Overview
This project implements an AI agent powered by OpenAI's LLMs, designed to interact with the MCP server to access various tools and resources. I plan to add support for the code actions, but currently it is in progress.
📦 Installation
First, ensure you have Poetry installed.
poetry install
🚀 Running the Project
-
Ensure Docker is Running Make sure the Docker daemon is active on your system. You can check this by running:
docker infoIf Docker is not installed, follow the official Docker installation guide for your operating system.
-
Start the MCP Weather Server Launch the weather server using:
poetry run poe weather_server -
Run the Chainlit Application Start the Chainlit app with:
poetry run poe app
Development Setup
This project uses pre-commit to ensure consistent code quality before commits.
poetry run pre-commit install
To manually run hooks:
poetry run pre-commit run --all-files
🛠 Available Tasks
Poe the Poet is used to define common development tasks.
You can list available tasks using:
poetry run poe --help
Defined Tasks
| Task | Description |
|---|---|
lint | Runs ruff to lint and auto-fix code |
typecheck | Runs mypy for static type checking |
check | Runs both lint and typecheck |
app | Runs the Chainlit application |
Run a task like:
poetry run poe check
📝 License
This repository is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.