mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-28 10:18:08 +02:00
Update remote code
This commit is contained in:
parent
fc4c7ef6a2
commit
750137792b
2 changed files with 17 additions and 3 deletions
|
|
@ -9,9 +9,9 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
|
|||
|
||||
Google's Gemini API includes built-in support for MCP servers in their Python and JavaScript SDKs, allowing you to connect directly to MCP servers and use their tools seamlessly with Gemini models.
|
||||
|
||||
## Gemini API with MCP
|
||||
## Gemini Python SDK
|
||||
|
||||
Google's [Gemini API](https://ai.google.dev/gemini-api/docs) supports MCP servers through built-in integration in their SDKs. Unlike other providers that require deploying servers to public URLs, Gemini can connect directly to local MCP servers, making development much simpler.
|
||||
Google's [Gemini Python SDK](https://ai.google.dev/gemini-api/docs) can use FastMCP clients directly.
|
||||
|
||||
<Note>
|
||||
Google's MCP integration is currently experimental and available in the Python and JavaScript SDKs. The API automatically calls MCP tools when needed and can connect to both local and remote MCP servers.
|
||||
|
|
@ -91,4 +91,18 @@ Okay, I rolled 3 dice and got a 5, 4, and 1.
|
|||
|
||||
In the above example, we connected to our local server using `stdio` transport. Because we're using a FastMCP client, you can also connect to any local or remote MCP server, using any [transport](/clients/transports) or [auth](/clients/auth) method supported by FastMCP, simply by changing the client configuration.
|
||||
|
||||
For example, to connect to a remote, authenticated server, you can use the following client:
|
||||
|
||||
```python
|
||||
from fastmcp import Client
|
||||
from fastmcp.client.auth import BearerAuth
|
||||
|
||||
client = Client(
|
||||
"https://my-server.com/sse",
|
||||
auth=BearerAuth("<your-token>"),
|
||||
)
|
||||
```
|
||||
|
||||
The rest of the code remains the same.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
|
|||
|
||||
OpenAI recently announced support for MCP servers in the Responses API. Note that at this time, MCP is not supported in ChatGPT.
|
||||
|
||||
## MCP in the Responses API
|
||||
## Responses API
|
||||
|
||||
OpenAI's [Responses API](https://platform.openai.com/docs/api-reference/responses) supports [MCP servers](https://platform.openai.com/docs/guides/tools-remote-mcp) as remote tool sources, allowing you to extend AI capabilities with custom functions.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue