Update architecture.mdx

This commit is contained in:
Laurent AJDNIK 2024-12-10 08:26:18 +01:00 • committed by GitHub
commit c52f1282fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -123,22 +123,14 @@ MCP has these main types of messages:
}
```
2. **Notifications** are one-way messages that don't expect a response:
```typescript
interface Notification {
method: string;
params?: { ... };
}
```
3. **Results** are successful responses to requests:
2. **Results** are successful responses to requests:
```typescript
interface Result {
[key: string]: unknown;
}
```
4. **Errors** indicate that a request failed:
3. **Errors** indicate that a request failed:
```typescript
interface Error {
code: number;
@ -147,6 +139,14 @@ MCP has these main types of messages:
}
```
4. **Notifications** are one-way messages that don't expect a response:
```typescript
interface Notification {
method: string;
params?: { ... };
}
```
## Connection lifecycle
### 1. Initialization