16
16
<!-- omit in toc -->
17
17
## Table of Contents
18
18
19
- - [ Overview] ( #overview )
20
- - [ Installation] ( #installation )
21
- - [ Quickstart] ( #quickstart )
22
- - [ What is MCP?] ( #what-is-mcp )
23
- - [ Core Concepts] ( #core-concepts )
24
- - [ Server] ( #server )
25
- - [ Resources] ( #resources )
26
- - [ Tools] ( #tools )
27
- - [ Prompts] ( #prompts )
28
- - [ Images] ( #images )
29
- - [ Context] ( #context )
30
- - [ Running Your Server] ( #running-your-server )
31
- - [ Development Mode] ( #development-mode )
32
- - [ Claude Desktop Integration] ( #claude-desktop-integration )
33
- - [ Direct Execution] ( #direct-execution )
34
- - [ Mounting to an Existing ASGI Server] ( #mounting-to-an-existing-asgi-server )
35
- - [ Examples] ( #examples )
36
- - [ Echo Server] ( #echo-server )
37
- - [ SQLite Explorer] ( #sqlite-explorer )
38
- - [ Advanced Usage] ( #advanced-usage )
39
- - [ Low-Level Server] ( #low-level-server )
40
- - [ Writing MCP Clients] ( #writing-mcp-clients )
41
- - [ MCP Primitives] ( #mcp-primitives )
42
- - [ Server Capabilities] ( #server-capabilities )
43
- - [ Documentation] ( #documentation )
44
- - [ Contributing] ( #contributing )
45
- - [ License] ( #license )
19
+ - [ MCP Python SDK] ( #mcp-python-sdk )
20
+ - [ Overview] ( #overview )
21
+ - [ Installation] ( #installation )
22
+ - [ Adding MCP to your python project] ( #adding-mcp-to-your-python-project )
23
+ - [ Running the standalone MCP development tools] ( #running-the-standalone-mcp-development-tools )
24
+ - [ Quickstart] ( #quickstart )
25
+ - [ What is MCP?] ( #what-is-mcp )
26
+ - [ Core Concepts] ( #core-concepts )
27
+ - [ Server] ( #server )
28
+ - [ Resources] ( #resources )
29
+ - [ Tools] ( #tools )
30
+ - [ Prompts] ( #prompts )
31
+ - [ Images] ( #images )
32
+ - [ Context] ( #context )
33
+ - [ Running Your Server] ( #running-your-server )
34
+ - [ Development Mode] ( #development-mode )
35
+ - [ Claude Desktop Integration] ( #claude-desktop-integration )
36
+ - [ Direct Execution] ( #direct-execution )
37
+ - [ Mounting to an Existing ASGI Server] ( #mounting-to-an-existing-asgi-server )
38
+ - [ Examples] ( #examples )
39
+ - [ Echo Server] ( #echo-server )
40
+ - [ SQLite Explorer] ( #sqlite-explorer )
41
+ - [ Advanced Usage] ( #advanced-usage )
42
+ - [ Low-Level Server] ( #low-level-server )
43
+ - [ Writing MCP Clients] ( #writing-mcp-clients )
44
+ - [ MCP Primitives] ( #mcp-primitives )
45
+ - [ Server Capabilities] ( #server-capabilities )
46
+ - [ Documentation] ( #documentation )
47
+ - [ Contributing] ( #contributing )
48
+ - [ License] ( #license )
46
49
47
50
[ pypi-badge ] : https://img.shields.io/pypi/v/mcp.svg
48
51
[ pypi-url ] : https://pypi.org/project/mcp/
@@ -143,8 +146,8 @@ The FastMCP server is your core interface to the MCP protocol. It handles connec
143
146
``` python
144
147
# Add lifespan support for startup/shutdown with strong typing
145
148
from contextlib import asynccontextmanager
149
+ from collections.abc import AsyncIterator
146
150
from dataclasses import dataclass
147
- from typing import AsyncIterator
148
151
149
152
from fake_database import Database # Replace with your actual DB type
150
153
@@ -441,7 +444,7 @@ For more control, you can use the low-level server implementation directly. This
441
444
442
445
``` python
443
446
from contextlib import asynccontextmanager
444
- from typing import AsyncIterator
447
+ from collections.abc import AsyncIterator
445
448
446
449
from fake_database import Database # Replace with your actual DB type
447
450
0 commit comments