docs: convert bold cross-references into links, link SEP and RFC mentions (#3017)
This commit is contained in:
parent
f2e63c979a
commit
24fdd909ac
2 changed files with 167 additions and 167 deletions
|
|
@ -30,7 +30,7 @@ Run the app on its own (`uvicorn server:app`) and you never think about either.
|
|||
!!! tip
|
||||
`streamable_http_app()` takes the same keyword arguments as `mcp.run("streamable-http", ...)`,
|
||||
minus `port`: the port belongs to whatever serves the app. `host` is still accepted but binds
|
||||
nothing here; the next section is what it actually controls. **Running your server** covers the
|
||||
nothing here; the next section is what it actually controls. **[Running your server](index.md)** covers the
|
||||
options themselves.
|
||||
|
||||
`mcp.sse_app()` does the same for the superseded SSE transport.
|
||||
|
|
@ -168,4 +168,4 @@ A browser-based client needs two permissions from you: to **send** its MCP reque
|
|||
* Browser clients need CORS: `allow_headers` for the `Mcp-*` request headers, `expose_headers=["Mcp-Session-Id"]` for the response.
|
||||
* `@mcp.custom_route()` adds plain, unauthenticated HTTP endpoints next to `/mcp`.
|
||||
|
||||
Once the server is reachable at a real URL, **The Client** connects to it with that URL instead of a server object.
|
||||
Once the server is reachable at a real URL, **[The Client](../client/index.md)** connects to it with that URL instead of a server object.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ python server.py
|
|||
|
||||
Nothing prints, and it doesn't return. It is waiting on stdin for a host to speak first.
|
||||
|
||||
That also means stdout **is the wire**. A stray `print()` corrupts the stream; the `logging` module writes to stderr and is the right tool. That story is in **Logging**.
|
||||
That also means stdout **is the wire**. A stray `print()` corrupts the stream; the `logging` module writes to stderr and is the right tool. That story is in **[Logging](../tutorial/logging.md)**.
|
||||
|
||||
### Try it
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ Each transport has its own keyword arguments, all on `run()`:
|
|||
* `streamable_http_path`: where the MCP endpoint lives. Default `/mcp`.
|
||||
* `json_response=True`: answer with plain JSON instead of an SSE stream.
|
||||
* `stateless_http=True`: a fresh transport per request, no session tracking.
|
||||
* `event_store`, `retry_interval`, `transport_security`: resumability and DNS-rebinding protection. They can wait, until you deploy somewhere other than localhost; **ASGI** covers `transport_security`.
|
||||
* `event_store`, `retry_interval`, `transport_security`: resumability and DNS-rebinding protection. They can wait, until you deploy somewhere other than localhost; **[ASGI](asgi.md)** covers `transport_security`.
|
||||
|
||||
!!! warning
|
||||
Transport options go to `run()`, **not** to `MCPServer(...)`. The constructor describes what
|
||||
|
|
@ -78,7 +78,7 @@ Each transport has its own keyword arguments, all on `run()`:
|
|||
TypeError: MCPServer.__init__() got an unexpected keyword argument 'port'
|
||||
```
|
||||
|
||||
`run()` is the short road. The moment you need more (your server mounted inside an existing app, two servers in one process, CORS for browser clients), you build the ASGI app yourself and hand it to any ASGI host. That is **ASGI**.
|
||||
`run()` is the short road. The moment you need more (your server mounted inside an existing app, two servers in one process, CORS for browser clients), you build the ASGI app yourself and hand it to any ASGI host. That is **[ASGI](asgi.md)**.
|
||||
|
||||
## Server settings
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ uv run mcp install server.py -v API_KEY=abc123 -f .env
|
|||
|
||||
!!! tip
|
||||
`mcp dev` and `mcp run` only understand `MCPServer`. If you build with the low-level `Server`,
|
||||
you run it yourself. See **The low-level Server**.
|
||||
you run it yourself. See **[The low-level Server](../advanced/low-level-server.md)**.
|
||||
|
||||
## Recap
|
||||
|
||||
|
|
@ -143,4 +143,4 @@ uv run mcp install server.py -v API_KEY=abc123 -f .env
|
|||
* `mcp dev` for the Inspector, `mcp run` to execute a file, `mcp install` for Claude Desktop, `mcp version` for the version.
|
||||
* The transport never changes what your server *is*: all three files on this page expose the identical tool.
|
||||
|
||||
When `run()` itself is the limit (your server inside an app that already exists), the next step is **ASGI**.
|
||||
When `run()` itself is the limit (your server inside an app that already exists), the next step is **[ASGI](asgi.md)**.
|
||||
|
|
|
|||
Loading…
Reference in a new issue