Jeremiah Lowin commited on
Commit
31ea308
·
unverified ·
2 Parent(s): 1ef10644b951b9

Merge branch 'main' into McpRegisterable-example

Browse files
Files changed (2) hide show
  1. README.md +7 -0
  2. docs/getting-started/quickstart.mdx +3 -3
README.md CHANGED
@@ -66,6 +66,7 @@ FastMCP handles the complex protocol details and server management, letting you
66
  - [Proxy Servers](#proxy-servers)
67
  - [Composing MCP Servers](#composing-mcp-servers)
68
  - [OpenAPI \& FastAPI Generation](#openapi--fastapi-generation)
 
69
  - [Running Your Server](#running-your-server)
70
  - [Development Mode (Recommended for Building \& Testing)](#development-mode-recommended-for-building--testing)
71
  - [Claude Desktop Integration (For Regular Use)](#claude-desktop-integration-for-regular-use)
@@ -666,6 +667,12 @@ mcp_server = FastMCP.from_openapi(openapi_spec, client=http_client)
666
  if __name__ == "__main__":
667
  mcp_server.run()
668
  ```
 
 
 
 
 
 
669
  ## Running Your Server
670
 
671
  Choose the method that best suits your needs:
 
66
  - [Proxy Servers](#proxy-servers)
67
  - [Composing MCP Servers](#composing-mcp-servers)
68
  - [OpenAPI \& FastAPI Generation](#openapi--fastapi-generation)
69
+ - [Handling `stderr`](#handling-stderr)
70
  - [Running Your Server](#running-your-server)
71
  - [Development Mode (Recommended for Building \& Testing)](#development-mode-recommended-for-building--testing)
72
  - [Claude Desktop Integration (For Regular Use)](#claude-desktop-integration-for-regular-use)
 
667
  if __name__ == "__main__":
668
  mcp_server.run()
669
  ```
670
+
671
+ ### Handling `stderr`
672
+ The MCP spec allows for the server to write anything it wants to `stderr`, and it
673
+ doesn't specify the format in any way. FastMCP will forward the server's `stderr`
674
+ to the client's `stderr`.
675
+
676
  ## Running Your Server
677
 
678
  Choose the method that best suits your needs:
docs/getting-started/quickstart.mdx CHANGED
@@ -32,7 +32,7 @@ from fastmcp import FastMCP
32
 
33
  mcp = FastMCP("My MCP Server")
34
 
35
- @mcp.tool
36
  def greet(name: str) -> str:
37
  return f"Hello, {name}!"
38
  ```
@@ -48,7 +48,7 @@ from fastmcp import FastMCP, Client
48
 
49
  mcp = FastMCP("My MCP Server")
50
 
51
- @mcp.tool
52
  def greet(name: str) -> str:
53
  return f"Hello, {name}!"
54
 
@@ -75,7 +75,7 @@ from fastmcp import FastMCP, Client
75
 
76
  mcp = FastMCP("My MCP Server")
77
 
78
- @mcp.tool
79
  def greet(name: str) -> str:
80
  return f"Hello, {name}!"
81
 
 
32
 
33
  mcp = FastMCP("My MCP Server")
34
 
35
+ @mcp.tool()
36
  def greet(name: str) -> str:
37
  return f"Hello, {name}!"
38
  ```
 
48
 
49
  mcp = FastMCP("My MCP Server")
50
 
51
+ @mcp.tool()
52
  def greet(name: str) -> str:
53
  return f"Hello, {name}!"
54
 
 
75
 
76
  mcp = FastMCP("My MCP Server")
77
 
78
+ @mcp.tool()
79
  def greet(name: str) -> str:
80
  return f"Hello, {name}!"
81