You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-6Lines changed: 44 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,13 @@ Unofficial extension library for FastMCP 2.0 with patterns, practices, and utili
4
4
5
5
## Features
6
6
7
+
- MCP Server Factory: `mcp_server()` helper that creates FastMCP instances with built-in server info resources, MCP asset discovery (optional), and credential resolution.
7
8
- MCP Annotation Constants: Standard annotation hints (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) following the FastMCP 2.2.7+ specification
8
-
- Deferred Registration Decorators: `@mcp_tool`, `@mcp_prompt`, `@mcp_resource` decorators for organizing tools by domain with automatic domain detection
9
-
- Registration Utilities: Functions to register tools, prompts, and resources with a FastMCP app, filtered by domain
10
-
- Tool Testing Utilities: Helpers for testing MCP tools directly with JSON arguments (stdio and HTTP transports)
11
-
- Tool List Measurement: Utilities for measuring tool list size to track context truncation issues
12
-
- Prompt Helpers: Generic `get_prompt_text` helper for agents that cannot access prompt assets directly
9
+
- Deferred Registration Decorators: `@mcp_tool`, `@mcp_prompt`, `@mcp_resource` decorators for organizing tools by domain with automatic domain detection.
10
+
- Registration Utilities: Functions to register tools, prompts, and resources with a FastMCP app, filtered by domain.
11
+
- Tool Testing Utilities: Helpers for testing MCP tools directly with JSON arguments (stdio and HTTP transports).
12
+
- Tool List Measurement: Utilities for measuring tool list size to track context truncation issues.
13
+
- Prompt Helpers: Generic `get_prompt_text` helper for agents that cannot access prompt assets directly.
13
14
14
15
## Installation
15
16
@@ -25,6 +26,37 @@ uv add fastmcp-extensions
25
26
26
27
## Quick Start
27
28
29
+
### Using the MCP Server Factory
30
+
31
+
The `mcp_server` function creates a FastMCP instance with built-in server info resources and optional credential resolution:
32
+
33
+
```python
34
+
from fastmcp_extensions import mcp_server, MCPServerConfigArg
0 commit comments