Skip to content

Commit 86cbf3a

Browse files
committed
docs: update codeboarding documentation and generate architecture
## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service and automatically generated architecture documentation. ### 📊 Summary - Documentation files created/updated: 5 - JSON files created/updated: 6 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .mdx - Repository analyzed: https://github.com/CodeBoarding/mcp-use - Architecture documentation: docs/development/architecture.mdx (auto-generated) The generated .mdx files have been automatically appended to the development documentation, and the architecture.mdx file has been generated from the CodeBoarding analysis files. 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
1 parent 0cc2b40 commit 86cbf3a

File tree

7 files changed

+59
-59
lines changed

7 files changed

+59
-59
lines changed

.codeboarding/Agent_Core.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ graph LR
1919

2020
The `Agent Core` subsystem is the central orchestrator within the `mcp-use` framework, responsible for the agent's decision-making, lifecycle, and overall execution flow. It integrates various components to interact with the external environment and manage its operational state.
2121

22-
22+
### Agent Core
2323
The primary intelligence and orchestration unit. It manages the agent's lifecycle, decision-making processes, and coordinates interactions with other components to execute tasks and communicate with external services.
2424

2525

@@ -28,7 +28,7 @@ The primary intelligence and orchestration unit. It manages the agent's lifecycl
2828
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/agents/mcpagent.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.agents.mcpagent.MCPAgent` (1:1)</a>
2929

3030

31-
31+
### Base Agent
3232
Provides the foundational structure and common functionalities for all agents within the framework. It serves as an abstract base class that `Agent Core` extends.
3333

3434

@@ -37,7 +37,7 @@ Provides the foundational structure and common functionalities for all agents wi
3737
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/agents/base.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.agents.base.BaseAgent` (1:1)</a>
3838

3939

40-
40+
### MCP Server Registry/Connector
4141
Manages connections and interactions with various MCP (Multi-Agent Communication Protocol) servers. It acts as an interface for the `Agent Core` to discover and communicate with available services.
4242

4343

@@ -46,7 +46,7 @@ Manages connections and interactions with various MCP (Multi-Agent Communication
4646
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/managers/server_manager.py#L16-L89" target="_blank" rel="noopener noreferrer">`mcp_use.managers.server_manager.ServerManager` (16:89)</a>
4747

4848

49-
49+
### LLM Integration Layer
5050
Facilitates the processing of outputs from Large Language Models (LLMs) and integrates with LangChain-based tools. It acts as an adapter, translating agent requests into LLM-compatible formats and vice-versa.
5151

5252

@@ -55,7 +55,7 @@ Facilitates the processing of outputs from Large Language Models (LLMs) and inte
5555
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/adapters/langchain_adapter.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.adapters.langchain_adapter.LangChainAdapter` (1:1)</a>
5656

5757

58-
58+
### Telemetry
5959
Responsible for emitting telemetry events, providing insights into the agent's operational status, performance, and interactions. This component supports observability within the `Agent Core` subsystem.
6060

6161

@@ -64,7 +64,7 @@ Responsible for emitting telemetry events, providing insights into the agent's o
6464
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/telemetry/telemetry.py#L55-L305" target="_blank" rel="noopener noreferrer">`mcp_use.telemetry.telemetry.Telemetry` (55:305)</a>
6565

6666

67-
67+
### MCP Session
6868
Manages the state and context of an agent's session. It encapsulates session-specific data and provides mechanisms for maintaining continuity across interactions.
6969

7070

.codeboarding/Client_Server_Connectivity.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ graph LR
2222

2323
One paragraph explaining the functionality which is represented by this graph. What the main flow is and what is its purpose.
2424

25-
25+
### MCP Client
2626
Serves as the primary client-side interface for initiating and managing interactions with MCP servers. It orchestrates the creation and lifecycle of communication sessions.
2727

2828

@@ -31,7 +31,7 @@ Serves as the primary client-side interface for initiating and managing interact
3131
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/client.py" target="_blank" rel="noopener noreferrer">`mcp_use.client.MCPClient`</a>
3232

3333

34-
34+
### MCP Session Manager
3535
Manages the state, lifecycle, and communication flow of an individual session with an MCP server. It acts as an intermediary, utilizing specific connectors for underlying communication.
3636

3737

@@ -40,7 +40,7 @@ Manages the state, lifecycle, and communication flow of an individual session wi
4040
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/session.py" target="_blank" rel="noopener noreferrer">`mcp_use.session.MCPSession`</a>
4141

4242

43-
43+
### Base Connector Abstraction
4444
Defines the abstract interface for all concrete connection types (e.g., WebSocket, Sandbox). It provides a unified contract for establishing and managing connections, enabling extensibility for new protocols.
4545

4646

@@ -49,7 +49,7 @@ Defines the abstract interface for all concrete connection types (e.g., WebSocke
4949
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/connectors/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.base.BaseConnector`</a>
5050

5151

52-
52+
### Sandbox Connector
5353
A concrete implementation of the Base Connector Abstraction, specifically designed to handle connections and communication with Sandbox MCP servers.
5454

5555

@@ -58,7 +58,7 @@ A concrete implementation of the Base Connector Abstraction, specifically design
5858
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/connectors/sandbox.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.sandbox.SandboxConnector`</a>
5959

6060

61-
61+
### WebSocket Connector
6262
A concrete implementation of the Base Connector Abstraction, responsible for establishing and managing connections using the WebSocket protocol with MCP servers.
6363

6464

@@ -67,7 +67,7 @@ A concrete implementation of the Base Connector Abstraction, responsible for est
6767
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/connectors/websocket.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.websocket.WebSocketConnector`</a>
6868

6969

70-
70+
### Connection Task Manager
7171
Manages the asynchronous tasks and operational lifecycle associated with specific connector types, ensuring robust and efficient connection handling.
7272

7373

@@ -76,7 +76,7 @@ Manages the asynchronous tasks and operational lifecycle associated with specifi
7676
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/task_managers/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.task_managers.base.ConnectionManager`</a>
7777

7878

79-
79+
### Server Manager
8080
Manages the lifecycle and state of various MCP servers, providing an interface for clients to connect, disconnect, and retrieve server information. It orchestrates server-side operations and interacts with agents.
8181

8282

@@ -85,7 +85,7 @@ Manages the lifecycle and state of various MCP servers, providing an interface f
8585
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/managers/server_manager.py#L16-L89" target="_blank" rel="noopener noreferrer">`mcp_use.managers.server_manager.ServerManager` (16:89)</a>
8686

8787

88-
88+
### Base Agent Abstraction
8989
Defines the abstract interface for all agent types within the MCP system. It provides a common contract for agents to interact with sessions and execute operations.
9090

9191

.codeboarding/External_Integration_Layer.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ graph LR
1818

1919
Abstract Components Overview
2020

21-
21+
### External Integration Layer
2222
The overarching component responsible for abstracting and managing interactions with external AI frameworks and systems. It acts as the primary interface for `mcp-use` to leverage external functionalities, ensuring loose coupling and adaptability.
2323

2424

@@ -28,7 +28,7 @@ The overarching component responsible for abstracting and managing interactions
2828
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/adapters/langchain_adapter.py" target="_blank" rel="noopener noreferrer">`mcp_use.adapters.langchain_adapter.LangChainAdapter`</a>
2929

3030

31-
31+
### Base Adapter
3232
Defines the abstract interface and contract for all external integrations. It establishes the common methods and properties that any concrete adapter must implement, ensuring a consistent approach to integrating diverse external systems. It also orchestrates the lifecycle of connectors.
3333

3434

@@ -37,7 +37,7 @@ Defines the abstract interface and contract for all external integrations. It es
3737
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/adapters/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.adapters.base.BaseAdapter`</a>
3838

3939

40-
40+
### LangChain Adapter
4141
A concrete implementation of the `BaseAdapter` specifically tailored for integrating with the LangChain framework. It translates `mcp-use`'s internal requests and data structures into LangChain-compatible formats and vice-versa, enabling the use of LangChain's agents, tools, and chains.
4242

4343

@@ -46,7 +46,7 @@ A concrete implementation of the `BaseAdapter` specifically tailored for integra
4646
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/adapters/langchain_adapter.py" target="_blank" rel="noopener noreferrer">`mcp_use.adapters.langchain_adapter.LangChainAdapter`</a>
4747

4848

49-
49+
### Connector Management Logic
5050
An internal helper component responsible for the initialization, configuration, and lifecycle management of connectors to external systems. It ensures that the necessary connections are established and maintained for adapters to function correctly.
5151

5252

@@ -60,7 +60,7 @@ An internal helper component responsible for the initialization, configuration,
6060
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/session.py" target="_blank" rel="noopener noreferrer">`mcp_use.session.MCPSession`</a>
6161

6262

63-
63+
### Tool/Resource/Prompt Conversion Helpers
6464
An internal helper component that performs specific data transformations, such as converting `mcp-use`'s internal tool definitions, resources, or prompt templates into formats compatible with external frameworks (e.g., LangChain's tool schema or prompt templates), and vice-versa.
6565

6666

.codeboarding/Tool_Abstraction_Management.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ graph LR
2828

2929
Abstract Components Overview
3030

31-
31+
### Agent Core
3232
The central orchestrator of the AI agent framework. It interprets user requests, leverages the LLM Integration Layer for reasoning and decision-making, and utilizes the Tool Abstraction & Management component to dynamically select and execute appropriate tools to achieve its goals. This component embodies the "Agent-based Architecture" pattern.
3333

3434

@@ -37,7 +37,7 @@ The central orchestrator of the AI agent framework. It interprets user requests,
3737
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/agents/mcpagent.py" target="_blank" rel="noopener noreferrer">`mcp_use.agents.mcpagent.MCPAgent`</a>
3838

3939

40-
40+
### LLM Integration Layer
4141
Provides a standardized, abstract interface for interacting with various Large Language Models. It encapsulates the specifics of different LLM APIs, allowing the Agent Core to communicate with them seamlessly for tasks such as natural language understanding, generation, and complex reasoning.
4242

4343

@@ -46,7 +46,7 @@ Provides a standardized, abstract interface for interacting with various Large L
4646
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/adapters/langchain_adapter.py" target="_blank" rel="noopener noreferrer">`mcp_use.adapters.langchain_adapter.LangChainAdapter`</a>
4747

4848

49-
49+
### Tool Abstraction & Management
5050
This component serves as the central Tool/Server Abstraction Layer. It provides a unified, high-level interface for agents to discover, manage, and execute tools exposed by connected MCP servers. It abstracts the complexities of tool interaction, server lifecycle management, and tool execution, aligning with the "Adapter Pattern" and "Client-Server Architecture (Internal)" principles. It is crucial for the framework's extensibility and modularity.
5151

5252

@@ -61,7 +61,7 @@ This component serves as the central Tool/Server Abstraction Layer. It provides
6161
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/managers/server_manager.py#L16-L89" target="_blank" rel="noopener noreferrer">`mcp_use.managers.server_manager.ServerManager` (16:89)</a>
6262

6363

64-
64+
### MCP Server Communication Layer
6565
Responsible for the low-level, concrete communication with external MCP (Multi-Component Platform) servers. It handles network requests, data serialization/deserialization, and error handling specific to server interactions, translating abstract tool execution requests from the Tool Abstraction & Management component into concrete server API calls.
6666

6767

@@ -73,7 +73,7 @@ Responsible for the low-level, concrete communication with external MCP (Multi-C
7373
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/connectors/websocket.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.websocket.WebSocketConnector`</a>
7474

7575

76-
76+
### Configuration Management
7777
Manages the loading, parsing, and access of configuration settings for the entire framework. This includes details about registered MCP servers, API keys, and other operational parameters. It ensures that various components can dynamically retrieve necessary settings, supporting the "Configuration-Driven Design" pattern.
7878

7979

@@ -82,7 +82,7 @@ Manages the loading, parsing, and access of configuration settings for the entir
8282
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/config.py" target="_blank" rel="noopener noreferrer">`mcp_use.config.Config`</a>
8383

8484

85-
85+
### Asynchronous Execution Engine
8686
Provides the core asynchronous capabilities for the framework, enabling non-blocking I/O operations and concurrent execution. It is fundamental for efficiently handling long-running tasks such as LLM API calls and external tool executions, leveraging asyncio throughout the system. This aligns with the "Asynchronous Processing" architectural pattern.
8787

8888

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"commit_hash": "3fae6421f6a7b104109cc034d333c1518a98179a",
2+
"commit_hash": "0cc2b40a441e9e576638fd155f03e3d250e01d0f",
33
"code_boarding_version": "0.1.0"
44
}

.codeboarding/on_boarding.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This documentation was generated by [CodeBoarding](https://github.com/CodeBoardi
2929

3030
mcp-use is a Python library designed for building and orchestrating AI agents, primarily focusing on interaction with MCP servers. Its architecture is centered around the Agent Core, which serves as the central decision-making and execution unit. This core interacts with the Client & Server Connectivity component to manage connections and sessions with various MCP servers. The Tool Abstraction & Management component provides the agent with a unified way to discover and utilize tools exposed by these connected servers, relying on the connectivity layer to retrieve them. Furthermore, an External Integration Layer allows `mcp-use` to seamlessly adapt and integrate with other AI frameworks like LangChain, ensuring broad interoperability for agent development.
3131

32-
32+
### Agent Core
3333
The central intelligence and orchestration unit, responsible for the agent's decision-making, lifecycle management, and overall execution flow. It leverages other components to interact with the external environment.
3434

3535

@@ -38,7 +38,7 @@ The central intelligence and orchestration unit, responsible for the agent's dec
3838
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/agents/mcpagent.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.agents.mcpagent.MCPAgent` (1:1)</a>
3939

4040

41-
41+
### Client & Server Connectivity
4242
Manages all aspects of establishing, maintaining, and terminating connections with various MCP servers (e.g., WebSocket, Sandbox). It provides the foundational communication layer and handles session management.
4343

4444

@@ -52,7 +52,7 @@ Manages all aspects of establishing, maintaining, and terminating connections wi
5252
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/task_managers/base.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.task_managers.base.ConnectionManager` (1:1)</a>
5353

5454

55-
55+
### Tool Abstraction & Management
5656
Provides a unified interface for agents to discover, list, search, and execute tools exposed by connected MCP servers. It abstracts the complexities of tool interaction and lifecycle.
5757

5858

@@ -66,7 +66,7 @@ Provides a unified interface for agents to discover, list, search, and execute t
6666
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/managers/tools/use_tool.py#L21-L153" target="_blank" rel="noopener noreferrer">`mcp_use.managers.tools.use_tool.UseToolFromServerTool` (21:153)</a>
6767

6868

69-
69+
### External Integration Layer
7070
Acts as an adapter, enabling `mcp-use` to seamlessly integrate with and leverage functionalities from external AI frameworks (e.g., LangChain) or other systems by translating interfaces and data structures.
7171

7272

0 commit comments

Comments
 (0)