mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 04:54:17 +02:00
Restructure docs: move transforms to dedicated section (#2956)
This commit is contained in:
parent
2cf7b0b0d7
commit
6dba73b69d
12 changed files with 35 additions and 36 deletions
|
|
@ -149,7 +149,7 @@ Transforms apply at two levels:
|
|||
- **Provider-level**: `provider.add_transform()` - affects only that provider's components
|
||||
- **Server-level**: `server.add_transform()` - affects all components from all providers
|
||||
|
||||
Documentation: `docs/servers/providers/transforms.mdx`, `docs/servers/visibility.mdx`
|
||||
Documentation: `docs/servers/transforms/transforms.mdx`, `docs/servers/visibility.mdx`
|
||||
|
||||
### ResourcesAsTools and PromptsAsTools
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ Both transforms:
|
|||
- Fall back to direct provider methods for plain providers
|
||||
- Return JSON for easy parsing by tool-only clients
|
||||
|
||||
Documentation: `docs/servers/providers/resources-as-tools.mdx`, `docs/servers/providers/prompts-as-tools.mdx`
|
||||
Documentation: `docs/servers/transforms/resources-as-tools.mdx`, `docs/servers/transforms/prompts-as-tools.mdx`
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -157,12 +157,12 @@
|
|||
{
|
||||
"group": "MCP Transforms",
|
||||
"pages": [
|
||||
"servers/providers/transforms",
|
||||
"servers/providers/namespace",
|
||||
"servers/providers/tool-transformation",
|
||||
"servers/transforms/transforms",
|
||||
"servers/transforms/namespace",
|
||||
"servers/transforms/tool-transformation",
|
||||
"servers/visibility",
|
||||
"servers/providers/resources-as-tools",
|
||||
"servers/providers/prompts-as-tools"
|
||||
"servers/transforms/resources-as-tools",
|
||||
"servers/transforms/prompts-as-tools"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -846,14 +846,14 @@
|
|||
"destination": "/servers/providers/mounting",
|
||||
"source": "/servers/composition"
|
||||
},
|
||||
{
|
||||
"destination": "/servers/providers/transforms",
|
||||
"source": "/servers/providers/namespacing"
|
||||
},
|
||||
{
|
||||
"destination": "/servers/providers/transforms",
|
||||
"source": "/patterns/tool-transformation"
|
||||
}
|
||||
{
|
||||
"destination": "/servers/transforms/transforms",
|
||||
"source": "/servers/providers/namespacing"
|
||||
},
|
||||
{
|
||||
"destination": "/servers/transforms/transforms",
|
||||
"source": "/patterns/tool-transformation"
|
||||
}
|
||||
],
|
||||
"search": {
|
||||
"prompt": "Search the docs..."
|
||||
|
|
|
|||
|
|
@ -41,16 +41,15 @@ if __name__ == "__main__":
|
|||
|
||||
## Production-Ready MCP
|
||||
|
||||
FastMCP pioneered Python MCP development—FastMCP 1.0 was incorporated into the [official MCP SDK](https://github.com/modelcontextprotocol/python-sdk) in 2024. Today, roughly 70% of MCP servers run on some version of FastMCP.
|
||||
FastMCP has pioneered MCP development since FastMCP 1.0 was incorporated into the [official MCP SDK](https://github.com/modelcontextprotocol/python-sdk) in 2024. Today, 70% of MCP servers across all languages run on some version of FastMCP.
|
||||
|
||||
**FastMCP 3.0 is built for enterprise MCP applications.** When you need to compose multiple servers, proxy remote APIs, add enterprise auth, or deploy multi-tenant systems, FastMCP provides the right abstractions:
|
||||
**FastMCP 3.0 was built from the ground up for production MCP applications.** When you need to compose multiple servers, proxy remote APIs, add enterprise auth, or deploy multi-tenant systems, FastMCP provides the right abstractions:
|
||||
|
||||
- **[Providers](/servers/providers/overview)** let you source components from anywhere—decorated functions, filesystem discovery, remote servers, OpenAPI specs, or your own custom sources.
|
||||
- **[Transforms](/servers/providers/transforms)** control what clients see—namespace for composition, filter by version or user permissions, convert resources to tools for compatibility.
|
||||
- **[Servers](/servers/server)** expose everything over stdio, HTTP, or WebSocket with session management and protocol handling built in.
|
||||
- **[Middleware](/servers/middleware)** handles cross-cutting concerns—authentication, authorization, logging, rate limiting, custom business logic.
|
||||
- **[Components](/servers/tools)** define the logic—tools, resources, and prompts that wrap your Python functions and data.
|
||||
- **[Providers](/servers/providers/overview)** source the components—from decorated functions, filesystem discovery, remote servers, OpenAPI specs, or your own custom sources.
|
||||
- **[Transforms](/servers/transforms/transforms)** shape the components—namespace for composition, filter by version or user permissions, convert resources to tools for compatibility.
|
||||
|
||||
Mount a weather API and a calendar server together with automatic namespacing. Proxy your company's internal MCP servers through a single authenticated gateway. Build a SaaS product where each tenant gets their own isolated component set. These aren't edge cases—they're what production MCP looks like.
|
||||
Compose these into **[Servers](/servers/server)** to expose your logic to clients, and use **[Middleware](/servers/middleware)** for cross-cutting concerns like authentication, logging, and rate limiting.
|
||||
|
||||
Ready to build? Start with our [installation guide](/getting-started/installation) or jump straight to the [quickstart](/getting-started/quickstart).
|
||||
|
||||
|
|
@ -60,8 +59,8 @@ FastMCP is made with 💙 by [Prefect](https://www.prefect.io/).
|
|||
|
||||
The Model Context Protocol lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. It is often described as "the USB-C port for AI", providing a uniform way to connect LLMs to resources they can use. It may be easier to think of it as an API, but specifically designed for LLM interactions. MCP servers can:
|
||||
|
||||
- Expose data through `Resources` (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
|
||||
- Provide functionality through `Tools` (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
|
||||
- Expose data through `Resources` (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
|
||||
- Define interaction patterns through `Prompts` (reusable templates for LLM interactions)
|
||||
- And more!
|
||||
|
||||
|
|
@ -77,9 +76,9 @@ FastMCP handles all the complex protocol details so you can focus on building. I
|
|||
|
||||
🐍 **Pythonic**: Feels natural to Python developers
|
||||
|
||||
🔍 **Complete**: Everything for production—enterprise auth (Google, GitHub, Azure, Auth0, WorkOS), deployment tools, testing frameworks, client libraries, and more
|
||||
🔍 **Complete**: Everything you need to build production MCP applications
|
||||
|
||||
🔧 **Composable**: The v3 architecture scales from a single tool to complex multi-server deployments
|
||||
🔧 **Composable**: The v3 architecture is designed for maximum flexibility
|
||||
|
||||
FastMCP provides the shortest path from idea to production. Deploy locally, to the cloud with [FastMCP Cloud](https://fastmcp.cloud) (free for personal servers), or to your own infrastructure.
|
||||
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ class ResponseEnricher(Middleware):
|
|||
return result
|
||||
```
|
||||
|
||||
For more complex tool transformations, consider [Transforms](/servers/providers/transforms) instead.
|
||||
For more complex tool transformations, consider [Transforms](/servers/transforms/transforms) instead.
|
||||
|
||||
### Filtering Lists
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ main.mount(calendar, namespace="calendar")
|
|||
| Resource | `data://info` | `data://api/info` |
|
||||
| Template | `data://{id}` | `data://api/{id}` |
|
||||
|
||||
Namespacing uses [transforms](/servers/providers/transforms) under the hood.
|
||||
Namespacing uses [transforms](/servers/transforms/transforms) under the hood.
|
||||
|
||||
## Mounting vs Importing
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Most users only interact with `LocalProvider` (through decorators) and occasiona
|
|||
|
||||
## Transforms
|
||||
|
||||
[Transforms](/servers/providers/transforms) modify components as they flow from providers to clients. Each transform sits in a chain, intercepting queries and modifying results before passing them along.
|
||||
[Transforms](/servers/transforms/transforms) modify components as they flow from providers to clients. Each transform sits in a chain, intercepting queries and modifying results before passing them along.
|
||||
|
||||
| Transform | Purpose |
|
||||
|-----------|---------|
|
||||
|
|
@ -53,7 +53,7 @@ Most users only interact with `LocalProvider` (through decorators) and occasiona
|
|||
|
||||
The most common use is namespacing mounted servers to prevent name collisions. When you call `mount(server, namespace="api")`, FastMCP creates a `Namespace` transform automatically.
|
||||
|
||||
Transforms can be added to individual providers (affecting just that source) or to the server itself (affecting all components). See [Transforms](/servers/providers/transforms) for the full picture.
|
||||
Transforms can be added to individual providers (affecting just that source) or to the server itself (affecting all components). See [Transforms](/servers/transforms/transforms) for the full picture.
|
||||
|
||||
## Provider Order
|
||||
|
||||
|
|
@ -76,6 +76,6 @@ When a client requests a tool, FastMCP queries providers in registration order.
|
|||
- [Local](/servers/providers/local) - How decorators work
|
||||
- [Mounting](/servers/providers/mounting) - Compose servers together
|
||||
- [Proxying](/servers/providers/proxy) - Connect to remote servers
|
||||
- [Transforms](/servers/providers/transforms) - Namespace, rename, and modify components
|
||||
- [Transforms](/servers/transforms/transforms) - Namespace, rename, and modify components
|
||||
- [Visibility](/servers/visibility) - Control which components clients can access
|
||||
- [Custom](/servers/providers/custom) - Build your own providers
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ title: Namespacing
|
|||
sidebarTitle: Namespacing
|
||||
description: Namespace and transform components with transforms
|
||||
icon: wand-magic-sparkles
|
||||
redirect: /servers/providers/transforms
|
||||
redirect: /servers/transforms/transforms
|
||||
---
|
||||
|
||||
This page has moved to [Transforms](/servers/providers/transforms).
|
||||
This page has moved to [Transforms](/servers/transforms/transforms).
|
||||
|
|
@ -26,11 +26,11 @@ When listing components, transforms receive sequences and return transformed seq
|
|||
|
||||
FastMCP provides several transforms for common use cases:
|
||||
|
||||
- **[Namespace](/servers/providers/namespace)** - Prefix component names to prevent conflicts when composing servers
|
||||
- **[Tool Transformation](/servers/providers/tool-transformation)** - Rename tools, modify descriptions, reshape arguments
|
||||
- **[Namespace](/servers/transforms/namespace)** - Prefix component names to prevent conflicts when composing servers
|
||||
- **[Tool Transformation](/servers/transforms/tool-transformation)** - Rename tools, modify descriptions, reshape arguments
|
||||
- **[Enabled](/servers/visibility)** - Control which components are visible at runtime
|
||||
- **[Resources as Tools](/servers/providers/resources-as-tools)** - Expose resources to tool-only clients
|
||||
- **[Prompts as Tools](/servers/providers/prompts-as-tools)** - Expose prompts to tool-only clients
|
||||
- **[Resources as Tools](/servers/transforms/resources-as-tools)** - Expose resources to tool-only clients
|
||||
- **[Prompts as Tools](/servers/transforms/prompts-as-tools)** - Expose prompts to tool-only clients
|
||||
|
||||
## Server vs Provider Transforms
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue