You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/learn/architecture.mdx
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,9 @@ The Model Context Protocol includes the following projects:
28
28
29
29
### Participants
30
30
31
-
MCP follows a client-server architecture where an MCP host — an AI application like [Claude Code](https://www.anthropic.com/claude-code) or [Claude Desktop](https://www.claude.ai/download) — establishes connections to one or more MCP servers. The MCP host accomplishes this by creating one MCP client for each MCP server. Each MCP client maintains a dedicated one-to-one connection with its corresponding MCP server.
31
+
MCP follows a client-server architecture where an MCP host — an AI application like [Claude Code](https://www.anthropic.com/claude-code) or [Claude Desktop](https://www.claude.ai/download) — establishes connections to one or more MCP servers. The MCP host accomplishes this by creating one MCP client for each MCP server. Each MCP client maintains a dedicated connection with its corresponding MCP server.
32
+
33
+
Local MCP servers that use the STDIO transport typically serve a single MCP client, whereas remote MCP servers that use the Streamable HTTP transport will typically serve many MCP clients.
32
34
33
35
The key participants in the MCP architecture are:
34
36
@@ -37,24 +39,25 @@ The key participants in the MCP architecture are:
37
39
-**MCP Server**: A program that provides context to MCP clients
38
40
39
41
**For example**: Visual Studio Code acts as an MCP host. When Visual Studio Code establishes a connection to an MCP server, such as the [Sentry MCP server](https://docs.sentry.io/product/sentry-mcp/), the Visual Studio Code runtime instantiates an MCP client object that maintains the connection to the Sentry MCP server.
40
-
When Visual Studio Code subsequently connects to another MCP server, such as the [local filesystem server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem), the Visual Studio Code runtime instantiates an additional MCP client object to maintain this connection, hence maintaining a one-to-one
41
-
relationship of MCP clients to MCP servers.
42
+
When Visual Studio Code subsequently connects to another MCP server, such as the [local filesystem server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem), the Visual Studio Code runtime instantiates an additional MCP client object to maintain this connection.
42
43
43
44
```mermaid
44
45
graph TB
45
46
subgraph "MCP Host (AI Application)"
46
47
Client1["MCP Client 1"]
47
48
Client2["MCP Client 2"]
48
49
Client3["MCP Client 3"]
50
+
Client4["MCP Client 4"]
49
51
end
50
52
51
-
Server1["MCP Server 1<br/>(e.g., Sentry)"]
52
-
Server2["MCP Server 2<br/>(e.g., Filesystem)"]
53
-
Server3["MCP Server 3<br/>(e.g., Database)"]
53
+
ServerA["MCP Server A - Local<br/>(e.g. Filesystem)"]
54
+
ServerB["MCP Server B - Local<br/>(e.g. Database)"]
55
+
ServerC["MCP Server C - Remote<br/>(e.g. Sentry)"]
54
56
55
-
Client1 ---|"One-to-one<br/>connection"| Server1
56
-
Client2 ---|"One-to-one<br/>connection"| Server2
57
-
Client3 ---|"One-to-one<br/>connection"| Server3
57
+
Client1 ---|"Dedicated<br/>connection"| ServerA
58
+
Client2 ---|"Dedicated<br/>connection"| ServerB
59
+
Client3 ---|"Dedicated<br/>connection"| ServerC
60
+
Client4 ---|"Dedicated<br/>connection"| ServerC
58
61
```
59
62
60
63
Note that **MCP server** refers to the program that serves context data, regardless of
0 commit comments