mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Fix broken documentation links (#2952)
This commit is contained in:
parent
3af9de197a
commit
3df38584cf
69 changed files with 179 additions and 179 deletions
|
|
@ -17,7 +17,7 @@ Every code block in this tutorial is a complete, runnable example. You can copy
|
|||
|
||||
### Prerequisites
|
||||
|
||||
Make sure you have FastMCP installed. If not, follow the [installation guide](/getting-started/installation).
|
||||
Make sure you have FastMCP installed. If not, follow the [installation guide](/v2/getting-started/installation).
|
||||
|
||||
```bash
|
||||
pip install fastmcp
|
||||
|
|
@ -152,7 +152,7 @@ Now you can run your server from the command line:
|
|||
```bash
|
||||
python my_mcp_server.py
|
||||
```
|
||||
This starts the server using the default **STDIO transport**, which is how clients like Claude Desktop communicate with local servers. To learn about other transports, like HTTP, see the [Running Your Server](/deployment/running-server) guide.
|
||||
This starts the server using the default **STDIO transport**, which is how clients like Claude Desktop communicate with local servers. To learn about other transports, like HTTP, see the [Running Your Server](/v2/deployment/running-server) guide.
|
||||
|
||||
## The Complete Server
|
||||
|
||||
|
|
@ -191,8 +191,8 @@ if __name__ == "__main__":
|
|||
|
||||
You've successfully built an MCP server! From here, you can explore more advanced topics:
|
||||
|
||||
- [**Tools in Depth**](/servers/tools): Learn about asynchronous tools, error handling, and custom return types.
|
||||
- [**Resources & Templates**](/servers/resources): Discover different resource types, including files and HTTP endpoints.
|
||||
- [**Prompts**](/servers/prompts): Create reusable prompt templates for your LLM.
|
||||
- [**Running Your Server**](/deployment/running-server): Deploy your server with different transports like HTTP.
|
||||
- [**Tools in Depth**](/v2/servers/tools): Learn about asynchronous tools, error handling, and custom return types.
|
||||
- [**Resources & Templates**](/v2/servers/resources): Discover different resource types, including files and HTTP endpoints.
|
||||
- [**Prompts**](/v2/servers/prompts): Create reusable prompt templates for your LLM.
|
||||
- [**Running Your Server**](/v2/deployment/running-server): Deploy your server with different transports like HTTP.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ def get_weather(city: str) -> dict:
|
|||
return {"city": city, "temperature": "72F", "forecast": "Sunny"}
|
||||
```
|
||||
|
||||
[**Learn more about Tools →**](/servers/tools)
|
||||
[**Learn more about Tools →**](/v2/servers/tools)
|
||||
|
||||
### Resources: Read-Only Data
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ def get_user_profile(user_id: str) -> dict:
|
|||
return {"id": user_id, "name": "Zaphod Beeblebrox"}
|
||||
```
|
||||
|
||||
[**Learn more about Resources & Templates →**](/servers/resources)
|
||||
[**Learn more about Resources & Templates →**](/v2/servers/resources)
|
||||
|
||||
### Prompts: Reusable Instructions
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ def summarize_text(text_to_summarize: str) -> str:
|
|||
"""
|
||||
```
|
||||
|
||||
[**Learn more about Prompts →**](/servers/prompts)
|
||||
[**Learn more about Prompts →**](/v2/servers/prompts)
|
||||
|
||||
## Advanced Capabilities
|
||||
|
||||
|
|
@ -117,4 +117,4 @@ Beyond the core components, MCP also supports more advanced interaction patterns
|
|||
|
||||
Now that you understand the core concepts of the Model Context Protocol, you're ready to start building. The best place to begin is our step-by-step tutorial.
|
||||
|
||||
[**Tutorial: How to Create an MCP Server in Python →**](/tutorials/create-mcp-server)
|
||||
[**Tutorial: How to Create an MCP Server in Python →**](/v2/tutorials/create-mcp-server)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Every code block in this tutorial is a complete, runnable example. You can copy
|
|||
|
||||
### Prerequisites
|
||||
|
||||
Make sure you have FastMCP installed. If not, follow the [installation guide](/getting-started/installation).
|
||||
Make sure you have FastMCP installed. If not, follow the [installation guide](/v2/getting-started/installation).
|
||||
|
||||
```bash
|
||||
pip install fastmcp
|
||||
|
|
@ -35,7 +35,7 @@ For this tutorial, we'll use the [JSONPlaceholder API](https://jsonplaceholder.t
|
|||
Now for the magic. We'll use `FastMCP.from_openapi`. This method takes an `httpx.AsyncClient` configured for your API and its OpenAPI specification, and automatically converts **every endpoint** into a callable MCP `Tool`.
|
||||
|
||||
<Tip>
|
||||
Learn more about working with OpenAPI specs in the [OpenAPI integration docs](/integrations/openapi).
|
||||
Learn more about working with OpenAPI specs in the [OpenAPI integration docs](/v2/integrations/openapi).
|
||||
</Tip>
|
||||
|
||||
<Note>
|
||||
|
|
@ -92,7 +92,7 @@ And that's it! With just a few lines of code, you've created an MCP server that
|
|||
Let's verify that our new MCP server works. We can use the `fastmcp.Client` to connect to it and inspect its tools.
|
||||
|
||||
<Tip>
|
||||
Learn more about the FastMCP client in the [client docs](/clients/client).
|
||||
Learn more about the FastMCP client in the [client docs](/v2/clients/client).
|
||||
</Tip>
|
||||
|
||||
Create a separate file, `api_client.py`:
|
||||
|
|
@ -144,7 +144,7 @@ However, for clients that support the full MCP spec, representing `GET` requests
|
|||
FastMCP allows users to customize this behavior using the concept of "route maps". A `RouteMap` is a mapping of an API route to an MCP type. FastMCP checks each API route against your custom maps in order. If a route matches a map, it's converted to the specified `mcp_type`. Any route that doesn't match your custom maps will fall back to the default behavior (becoming a `Tool`).
|
||||
|
||||
<Tip>
|
||||
Learn more about route maps in the [OpenAPI integration docs](/integrations/openapi#route-mapping).
|
||||
Learn more about route maps in the [OpenAPI integration docs](/v2/integrations/openapi#route-mapping).
|
||||
</Tip>
|
||||
|
||||
Here’s how you can add custom route maps to turn `GET` requests into `Resources` and `ResourceTemplates` (if they have path parameters):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue