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/development/roadmap.mdx
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,11 @@ description: Our plans for evolving Model Context Protocol
7
7
8
8
The Model Context Protocol is rapidly evolving. This page outlines our current thinking on key priorities and direction for approximately **the next six months**, though these may change significantly as the project develops. To see what's changed recently, check out the **[specification changelog](/specification/2025-03-26/changelog/)**.
9
9
10
-
<Note>The ideas presented here are not commitments—we may solve these challenges differently than described, or some may not materialize at all. This is also not an _exhaustive_ list; we may incorporate work that isn't mentioned here.</Note>
10
+
<Note>
11
+
12
+
The ideas presented here are not commitments—we may solve these challenges differently than described, or some may not materialize at all. This is also not an _exhaustive_ list; we may incorporate work that isn't mentioned here.
13
+
14
+
</Note>
11
15
12
16
We value community participation! Each section links to relevant discussions where you can learn more and contribute your thoughts.
@@ -86,25 +89,27 @@ The protocol layer handles message framing, request/response linking, and high-l
86
89
"""Handle incoming notification from other side."""
87
90
# Notification handling implementation
88
91
```
92
+
89
93
</Tab>
90
94
</Tabs>
91
95
92
96
Key classes include:
93
97
94
-
*`Protocol`
95
-
*`Client`
96
-
*`Server`
98
+
-`Protocol`
99
+
-`Client`
100
+
-`Server`
97
101
98
102
### Transport layer
99
103
100
104
The transport layer handles the actual communication between clients and servers. MCP supports multiple transport mechanisms:
101
105
102
106
1.**Stdio transport**
107
+
103
108
- Uses standard input/output for communication
104
109
- Ideal for local processes
105
110
106
-
2.**HTTP with SSE transport**
107
-
- Uses Server-Sent Events for server-to-client messages
111
+
2.**Streamable HTTP transport**
112
+
- Uses HTTP with optional Server-Sent Events for streaming
108
113
- HTTP POST for client-to-server messages
109
114
110
115
All transports use [JSON-RPC](https://www.jsonrpc.org/) 2.0 to exchange messages. See the [specification](/specification/) for detailed information about the Model Context Protocol message format.
@@ -114,36 +119,39 @@ All transports use [JSON-RPC](https://www.jsonrpc.org/) 2.0 to exchange messages
114
119
MCP has these main types of messages:
115
120
116
121
1.**Requests** expect a response from the other side:
117
-
```typescript
118
-
interfaceRequest {
119
-
method:string;
120
-
params?: { ... };
121
-
}
122
-
```
122
+
123
+
```typescript
124
+
interfaceRequest {
125
+
method:string;
126
+
params?: { ... };
127
+
}
128
+
```
123
129
124
130
2.**Results** are successful responses to requests:
125
-
```typescript
126
-
interfaceResult {
127
-
[key:string]:unknown;
128
-
}
129
-
```
131
+
132
+
```typescript
133
+
interfaceResult {
134
+
[key:string]:unknown;
135
+
}
136
+
```
130
137
131
138
3.**Errors** indicate that a request failed:
132
-
```typescript
133
-
interfaceError {
134
-
code:number;
135
-
message:string;
136
-
data?:unknown;
137
-
}
138
-
```
139
+
140
+
```typescript
141
+
interfaceError {
142
+
code:number;
143
+
message:string;
144
+
data?:unknown;
145
+
}
146
+
```
139
147
140
148
4.**Notifications** are one-way messages that don't expect a response:
141
-
```typescript
142
-
interfaceNotification {
143
-
method:string;
144
-
params?: { ... };
145
-
}
146
-
```
149
+
```typescript
150
+
interfaceNotification {
151
+
method:string;
152
+
params?: { ... };
153
+
}
154
+
```
147
155
148
156
## Connection lifecycle
149
157
@@ -176,6 +184,7 @@ After initialization, the following patterns are supported:
176
184
### 3. Termination
177
185
178
186
Either party can terminate the connection:
187
+
179
188
- Clean shutdown via `close()`
180
189
- Transport disconnection
181
190
- Error conditions
@@ -191,13 +200,14 @@ enum ErrorCode {
191
200
InvalidRequest=-32600,
192
201
MethodNotFound=-32601,
193
202
InvalidParams=-32602,
194
-
InternalError=-32603
203
+
InternalError=-32603,
195
204
}
196
205
```
197
206
198
207
SDKs and applications can define their own error codes above -32000.
199
208
200
209
Errors are propagated through:
210
+
201
211
- Error responses to requests
202
212
- Error events on transports
203
213
- Protocol-level error handlers
@@ -208,6 +218,7 @@ Here's a basic example of implementing an MCP server:
208
218
209
219
<Tabs>
210
220
<Tabtitle="TypeScript">
221
+
211
222
```typescript
212
223
import { Server } from"@modelcontextprotocol/sdk/server/index.js";
0 commit comments