How pratikchetry/agentic-ai-client-server-system works
Nexus takes terminal input through the CLI, enriches it with mentioned documents or server-side slash prompts, then runs an LLM tool-use loop over MCP. Tools are dispatched to the server and results return to the model before the final response is displayed. The document server exposes tools, resources, and formatting prompts; README also documents a summarize prompt, though its implementation is not shown. Edges are based on the excerpts and README; server capability links reflect documented MCP behavior.
Main entry points: main.py Application setup · mcp_server.py MCP document server · cli_chat.py CLI chat logic · mcp_client.py MCP client
Components 14
Terminal interface
- Prompt UI
core/cli.py - Application setup
main.py
Chat orchestration
- CLI chat logic
core/cli_chat.py - Agent loop
core/chat.py - Tool dispatch
core/tools.py
Model integration
- Groq adapter
core/claude.py
MCP document services
- MCP client
mcp_client.py - MCP document server
mcp_server.py - In-memory documents
mcp_server.py - Read and edit tools
mcp_server.py - Document resources
mcp_server.py - Format and summarize prompts
mcp_server.py
Other components
- Terminal user
- Groq API
Connections 20
- Terminal user → Prompt UI: enters query
README.md - Application setup → Prompt UI: starts UI
main.py - Application setup → MCP client: opens session
main.py - Application setup → Groq adapter: configures model
main.py - Application setup → CLI chat logic: constructs chat
main.py - Prompt UI → CLI chat logic: submits query
core/cli.py - CLI chat logic → Agent loop: delegates run
core/cli_chat.py - CLI chat logic → MCP client: reads docs and prompts
core/cli_chat.py - Agent loop → Groq adapter: requests completion
core/chat.py - Groq adapter → Groq API: calls completion API
core/claude.py - Agent loop → Tool dispatch: executes tool requests
core/chat.py - Tool dispatch → MCP client: lists and calls tools
core/tools.py - MCP client → MCP document server: stdio protocol
README.md - MCP document server → Read and edit tools: registers tools
mcp_server.py - MCP document server → Document resources: registers resources
mcp_server.py - MCP document server → Format and summarize prompts: registers prompts
mcp_server.py - Read and edit tools → In-memory documents: reads and edits
mcp_server.py - Document resources → In-memory documents: lists and fetches
mcp_server.py - Format and summarize prompts → Read and edit tools: directs edit tool use
mcp_server.py - Format and summarize prompts → In-memory documents: uses document identifier
mcp_server.py