Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
8bd3f6a
1
Parent(s): f7bfbad
Update remote code
Browse files- docs/integrations/gemini.mdx +16 -2
- docs/integrations/openai.mdx +1 -1
docs/integrations/gemini.mdx
CHANGED
|
@@ -9,9 +9,9 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
|
|
| 9 |
|
| 10 |
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.
|
| 11 |
|
| 12 |
-
## Gemini
|
| 13 |
|
| 14 |
-
Google's [Gemini
|
| 15 |
|
| 16 |
<Note>
|
| 17 |
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.
|
|
| 91 |
|
| 92 |
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.
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
|
|
|
| 9 |
|
| 10 |
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.
|
| 11 |
|
| 12 |
+
## Gemini Python SDK
|
| 13 |
|
| 14 |
+
Google's [Gemini Python SDK](https://ai.google.dev/gemini-api/docs) can use FastMCP clients directly.
|
| 15 |
|
| 16 |
<Note>
|
| 17 |
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 |
|
| 92 |
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.
|
| 93 |
|
| 94 |
+
For example, to connect to a remote, authenticated server, you can use the following client:
|
| 95 |
+
|
| 96 |
+
```python
|
| 97 |
+
from fastmcp import Client
|
| 98 |
+
from fastmcp.client.auth import BearerAuth
|
| 99 |
+
|
| 100 |
+
client = Client(
|
| 101 |
+
"https://my-server.com/sse",
|
| 102 |
+
auth=BearerAuth("<your-token>"),
|
| 103 |
+
)
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
The rest of the code remains the same.
|
| 107 |
+
|
| 108 |
|
docs/integrations/openai.mdx
CHANGED
|
@@ -9,7 +9,7 @@ import { VersionBadge } from "/snippets/version-badge.mdx"
|
|
| 9 |
|
| 10 |
OpenAI recently announced support for MCP servers in the Responses API. Note that at this time, MCP is not supported in ChatGPT.
|
| 11 |
|
| 12 |
-
##
|
| 13 |
|
| 14 |
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.
|
| 15 |
|
|
|
|
| 9 |
|
| 10 |
OpenAI recently announced support for MCP servers in the Responses API. Note that at this time, MCP is not supported in ChatGPT.
|
| 11 |
|
| 12 |
+
## Responses API
|
| 13 |
|
| 14 |
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.
|
| 15 |
|