Skip to content

Commit 3fae642

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 8cc3acf commit 3fae642

File tree

9 files changed

+389
-98
lines changed

9 files changed

+389
-98
lines changed

.codeboarding/Agent_Core.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The primary intelligence and orchestration unit. It manages the agent's lifecycl
2525

2626
**Related Classes/Methods**:
2727

28-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/agents/mcpagent.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.agents.mcpagent.MCPAgent` (1:1)</a>
28+
- <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

3131
### Base Agent
@@ -34,7 +34,7 @@ Provides the foundational structure and common functionalities for all agents wi
3434

3535
**Related Classes/Methods**:
3636

37-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/agents/base.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.agents.base.BaseAgent` (1:1)</a>
37+
- <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

4040
### MCP Server Registry/Connector
@@ -43,7 +43,7 @@ Manages connections and interactions with various MCP (Multi-Agent Communication
4343

4444
**Related Classes/Methods**:
4545

46-
- <a href="https://github.com/mcp-use/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>
46+
- <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

4949
### LLM Integration Layer
@@ -52,7 +52,7 @@ Facilitates the processing of outputs from Large Language Models (LLMs) and inte
5252

5353
**Related Classes/Methods**:
5454

55-
- <a href="https://github.com/mcp-use/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>
55+
- <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

5858
### Telemetry
@@ -61,7 +61,7 @@ Responsible for emitting telemetry events, providing insights into the agent's o
6161

6262
**Related Classes/Methods**:
6363

64-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/telemetry/telemetry.py#L55-L305" target="_blank" rel="noopener noreferrer">`mcp_use.telemetry.telemetry.Telemetry` (55:305)</a>
64+
- <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

6767
### MCP Session
@@ -70,4 +70,4 @@ Manages the state and context of an agent's session. It encapsulates session-spe
7070

7171
**Related Classes/Methods**:
7272

73-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/session.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.session.MCPSession` (1:1)</a>
73+
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/session.py#L1-L1" target="_blank" rel="noopener noreferrer">`mcp_use.session.MCPSession` (1:1)</a>

.codeboarding/Client_Server_Connectivity.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Serves as the primary client-side interface for initiating and managing interact
2828

2929
**Related Classes/Methods**:
3030

31-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/client.py" target="_blank" rel="noopener noreferrer">`mcp_use.client.MCPClient`</a>
31+
- <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

3434
### MCP Session Manager
@@ -37,7 +37,7 @@ Manages the state, lifecycle, and communication flow of an individual session wi
3737

3838
**Related Classes/Methods**:
3939

40-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/session.py" target="_blank" rel="noopener noreferrer">`mcp_use.session.MCPSession`</a>
40+
- <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

4343
### Base Connector Abstraction
@@ -46,7 +46,7 @@ Defines the abstract interface for all concrete connection types (e.g., WebSocke
4646

4747
**Related Classes/Methods**:
4848

49-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/connectors/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.base.BaseConnector`</a>
49+
- <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

5252
### Sandbox Connector
@@ -55,7 +55,7 @@ A concrete implementation of the Base Connector Abstraction, specifically design
5555

5656
**Related Classes/Methods**:
5757

58-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/connectors/sandbox.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.sandbox.SandboxConnector`</a>
58+
- <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

6161
### WebSocket Connector
@@ -64,7 +64,7 @@ A concrete implementation of the Base Connector Abstraction, responsible for est
6464

6565
**Related Classes/Methods**:
6666

67-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/connectors/websocket.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.websocket.WebSocketConnector`</a>
67+
- <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

7070
### Connection Task Manager
@@ -73,7 +73,7 @@ Manages the asynchronous tasks and operational lifecycle associated with specifi
7373

7474
**Related Classes/Methods**:
7575

76-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/task_managers/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.task_managers.base.ConnectionManager`</a>
76+
- <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

7979
### Server Manager
@@ -82,7 +82,7 @@ Manages the lifecycle and state of various MCP servers, providing an interface f
8282

8383
**Related Classes/Methods**:
8484

85-
- <a href="https://github.com/mcp-use/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>
85+
- <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

8888
### Base Agent Abstraction
@@ -91,4 +91,4 @@ Defines the abstract interface for all agent types within the MCP system. It pro
9191

9292
**Related Classes/Methods**:
9393

94-
- <a href="https://github.com/mcp-use/mcp-use/blob/main/mcp_use/agents/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.agents.base.BaseAgent`</a>
94+
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/agents/base.py" target="_blank" rel="noopener noreferrer">`mcp_use.agents.base.BaseAgent`</a>
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"description": "Abstract Components Overview",
3+
"components": [
4+
{
5+
"name": "External Integration Layer",
6+
"description": "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.",
7+
"referenced_source_code": [
8+
{
9+
"qualified_name": "mcp_use.adapters.base.BaseAdapter",
10+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/base.py",
11+
"reference_start_line": 0,
12+
"reference_end_line": 0
13+
},
14+
{
15+
"qualified_name": "mcp_use.adapters.langchain_adapter.LangChainAdapter",
16+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/langchain_adapter.py",
17+
"reference_start_line": 0,
18+
"reference_end_line": 0
19+
}
20+
],
21+
"can_expand": true
22+
},
23+
{
24+
"name": "Base Adapter",
25+
"description": "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.",
26+
"referenced_source_code": [
27+
{
28+
"qualified_name": "mcp_use.adapters.base.BaseAdapter",
29+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/base.py",
30+
"reference_start_line": 0,
31+
"reference_end_line": 0
32+
}
33+
],
34+
"can_expand": true
35+
},
36+
{
37+
"name": "LangChain Adapter",
38+
"description": "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.",
39+
"referenced_source_code": [
40+
{
41+
"qualified_name": "mcp_use.adapters.langchain_adapter.LangChainAdapter",
42+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/langchain_adapter.py",
43+
"reference_start_line": 0,
44+
"reference_end_line": 0
45+
}
46+
],
47+
"can_expand": true
48+
},
49+
{
50+
"name": "Connector Management Logic",
51+
"description": "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.",
52+
"referenced_source_code": [
53+
{
54+
"qualified_name": "mcp_use.connectors.base.BaseConnector",
55+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/connectors/base.py",
56+
"reference_start_line": 0,
57+
"reference_end_line": 0
58+
},
59+
{
60+
"qualified_name": "mcp_use.connectors.http.HttpConnector",
61+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/connectors/http.py",
62+
"reference_start_line": 0,
63+
"reference_end_line": 0
64+
},
65+
{
66+
"qualified_name": "mcp_use.connectors.sandbox.SandboxConnector",
67+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/connectors/sandbox.py",
68+
"reference_start_line": 0,
69+
"reference_end_line": 0
70+
},
71+
{
72+
"qualified_name": "mcp_use.connectors.stdio.StdioConnector",
73+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/connectors/stdio.py",
74+
"reference_start_line": 0,
75+
"reference_end_line": 0
76+
},
77+
{
78+
"qualified_name": "mcp_use.connectors.websocket.WebSocketConnector",
79+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/connectors/websocket.py",
80+
"reference_start_line": 0,
81+
"reference_end_line": 0
82+
},
83+
{
84+
"qualified_name": "mcp_use.session.MCPSession",
85+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/session.py",
86+
"reference_start_line": 0,
87+
"reference_end_line": 0
88+
}
89+
],
90+
"can_expand": true
91+
},
92+
{
93+
"name": "Tool/Resource/Prompt Conversion Helpers",
94+
"description": "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.",
95+
"referenced_source_code": [
96+
{
97+
"qualified_name": "mcp_use.adapters.langchain_adapter.LangChainAdapter._convert_prompt",
98+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/langchain_adapter.py",
99+
"reference_start_line": 0,
100+
"reference_end_line": 0
101+
},
102+
{
103+
"qualified_name": "mcp_use.adapters.langchain_adapter.LangChainAdapter._convert_resource",
104+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/langchain_adapter.py",
105+
"reference_start_line": 0,
106+
"reference_end_line": 0
107+
},
108+
{
109+
"qualified_name": "mcp_use.adapters.langchain_adapter.LangChainAdapter._convert_tool",
110+
"reference_file": "/mnt/e/StartUp/mcp-use/mcp_use/adapters/langchain_adapter.py",
111+
"reference_start_line": 0,
112+
"reference_end_line": 0
113+
}
114+
],
115+
"can_expand": false
116+
}
117+
],
118+
"components_relations": [
119+
{
120+
"relation": "contains",
121+
"src_name": "External Integration Layer",
122+
"dst_name": "Base Adapter"
123+
},
124+
{
125+
"relation": "contains",
126+
"src_name": "External Integration Layer",
127+
"dst_name": "LangChain Adapter"
128+
},
129+
{
130+
"relation": "defines the interface for",
131+
"src_name": "Base Adapter",
132+
"dst_name": "LangChain Adapter"
133+
},
134+
{
135+
"relation": "orchestrates",
136+
"src_name": "Base Adapter",
137+
"dst_name": "Connector Management Logic"
138+
},
139+
{
140+
"relation": "leverages",
141+
"src_name": "LangChain Adapter",
142+
"dst_name": "Tool/Resource/Prompt Conversion Helpers"
143+
}
144+
]
145+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# External Integration Layer
2+
```mermaid
3+
graph LR
4+
External_Integration_Layer["External Integration Layer"]
5+
Base_Adapter["Base Adapter"]
6+
LangChain_Adapter["LangChain Adapter"]
7+
Connector_Management_Logic["Connector Management Logic"]
8+
Tool_Resource_Prompt_Conversion_Helpers["Tool/Resource/Prompt Conversion Helpers"]
9+
External_Integration_Layer -- "contains" --> Base_Adapter
10+
External_Integration_Layer -- "contains" --> LangChain_Adapter
11+
Base_Adapter -- "defines the interface for" --> LangChain_Adapter
12+
Base_Adapter -- "orchestrates" --> Connector_Management_Logic
13+
LangChain_Adapter -- "leverages" --> Tool_Resource_Prompt_Conversion_Helpers
14+
click External_Integration_Layer href "/codeboarding/External_Integration_Layer.md" "Details"
15+
```
16+
17+
### Details
18+
19+
Abstract Components Overview
20+
21+
### External Integration Layer [[Expand]](./External_Integration_Layer)
22+
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.
23+
24+
25+
**Related Classes/Methods**:
26+
27+
- <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>
28+
- <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>
29+
30+
31+
### Base Adapter
32+
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.
33+
34+
35+
**Related Classes/Methods**:
36+
37+
- <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>
38+
39+
40+
### LangChain Adapter
41+
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.
42+
43+
44+
**Related Classes/Methods**:
45+
46+
- <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>
47+
48+
49+
### Connector Management Logic
50+
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.
51+
52+
53+
**Related Classes/Methods**:
54+
55+
- <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>
56+
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/connectors/http.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.http.HttpConnector`</a>
57+
- <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>
58+
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/connectors/stdio.py" target="_blank" rel="noopener noreferrer">`mcp_use.connectors.stdio.StdioConnector`</a>
59+
- <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>
60+
- <a href="https://github.com/CodeBoarding/mcp-use/blob/main/mcp_use/session.py" target="_blank" rel="noopener noreferrer">`mcp_use.session.MCPSession`</a>
61+
62+
63+
### Tool/Resource/Prompt Conversion Helpers
64+
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.
65+
66+
67+
**Related Classes/Methods**:
68+
69+
- <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._convert_prompt`</a>
70+
- <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._convert_resource`</a>
71+
- <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._convert_tool`</a>

0 commit comments

Comments
 (0)