Langgraph Clean Arch
БесплатноНе проверенMCP server implementing clean architecture with LangGraph for building and managing agent workflows.
Описание
MCP server implementing clean architecture with LangGraph for building and managing agent workflows.
README
A Model Context Protocol (MCP) server written in Python from scratch using LangGraph for orchestration, structured around the principles of Clean Architecture.
🏛️ Architecture Overview
This project is divided into four concentric layers to enforce the Dependency Inversion Principle (outer layers can import inner layers, but inner layers must NEVER know about outer layers):
[Domain] <-- [Use Cases] <-- [Adapters] <-- [Frameworks]
- Domain (
src/domain/): Contains core entity dataclasses (Message,ConversationState). Entirely framework-free. - Use Cases (
src/usecases/): Application business rules (RunAgentUseCase) and abstract gateway interfaces (AgentGateway,HistoryRepository). - Interface Adapters (
src/adapters/): Gateway implementations (InMemoryHistoryRepository) and interface bindings for external communication (McpController). - Frameworks & Drivers (
src/frameworks/): External libraries and composition root (LangGraphAgent,config.py,main.py).
🚀 Getting Started
1. Requirements
- Python >= 3.13
2. Set Up Virtual Environment (Already Done)
The virtual environment has already been created in this folder at .venv. To activate it:
Windows PowerShell:
.venv\Scripts\Activate.ps1
Windows CMD:
.venv\Scripts\activate.bat
Bash / Git Bash:
source .venv/bin/activate
3. Configure API Key
Create a .env file in the project root:
OPENAI_API_KEY=your_openai_api_key_here
Note: If no API key is specified, the application will fallback to Simulation Mode, which lets you test the execution pipeline locally without incurring cost or requiring keys.
4. Running the Verification Test
Verify the layers and data flow run properly inside the virtual environment:
python test_app.py
5. Running the MCP Server
To execute the server via the stdio transport protocol:
python src/main.py
Note: Normal logs are written to sys.stderr to avoid corrupting the protocol communication channel on stdout.
🔌 Connecting to Host Clients
Claude Desktop
Add this server to your Claude Desktop config file (located at %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"langgraph-clean-arch": {
"command": "C:\\Users\\faria\\.gemini\\antigravity-ide\\scratch\\mcp-langgraph-clean-arch\\.venv\\Scripts\\python.exe",
"args": ["C:\\Users\\faria\\.gemini\\antigravity-ide\\scratch\\mcp-langgraph-clean-arch\\src\\main.py"]
}
}
}
Cursor
Go to Settings > Features > MCP:
- Click + Add New MCP Server.
- Set Name to
langgraph-clean-arch. - Set Type to
command. - Set Command to:
C:\Users\faria\.gemini\antigravity-ide\scratch\mcp-langgraph-clean-arch\.venv\Scripts\python.exe C:\Users\faria\.gemini\antigravity-ide\scratch\mcp-langgraph-clean-arch\src\main.py - Click Save and verify the status shows active green.
Установка Langgraph Clean Arch
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/FranciscoValadao/mcp-langgraph-clean-archFAQ
Langgraph Clean Arch MCP бесплатный?
Да, Langgraph Clean Arch MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Langgraph Clean Arch?
Нет, Langgraph Clean Arch работает без API-ключей и переменных окружения.
Langgraph Clean Arch — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Langgraph Clean Arch в Claude Desktop, Claude Code или Cursor?
Открой Langgraph Clean Arch на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Langgraph Clean Arch with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
