mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge c9a045aa82 into 72a9e1cf37
This commit is contained in:
commit
41362ed0fe
5 changed files with 64 additions and 4 deletions
|
|
@ -258,6 +258,20 @@
|
|||
{"name": "EXA_API_KEY", "description": "Exa API Key", "secret": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "nimble",
|
||||
"title": "Nimble",
|
||||
"description": "Web search, SERP, and site extraction data for AI agents",
|
||||
"icon_url": "https://avatars.githubusercontent.com/u/94446617?v=4",
|
||||
"category": "Search",
|
||||
"registry_url": null,
|
||||
"transport": "http",
|
||||
"url": "https://mcp.nimbleway.com/mcp",
|
||||
"auth_type": "bearer_token",
|
||||
"env_vars": [
|
||||
{"name": "NIMBLE_API_KEY", "description": "Nimble API Key", "secret": true}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "tavily",
|
||||
"title": "Tavily",
|
||||
|
|
|
|||
|
|
@ -90,6 +90,31 @@ class TestMCPRegistryFile:
|
|||
assert linear["url"] == "https://mcp.linear.app/mcp"
|
||||
assert "/sse" not in linear["url"]
|
||||
|
||||
def test_nimble_uses_streamable_http_with_api_key(self, registry_path):
|
||||
"""Nimble should expose its authenticated streamable HTTP endpoint."""
|
||||
with open(registry_path, "r") as f:
|
||||
data = json.load(f)
|
||||
|
||||
nimble = next(s for s in data["servers"] if s["name"] == "nimble")
|
||||
assert nimble == {
|
||||
"name": "nimble",
|
||||
"title": "Nimble",
|
||||
"description": "Web search, SERP, and site extraction data for AI agents",
|
||||
"icon_url": "https://avatars.githubusercontent.com/u/94446617?v=4",
|
||||
"category": "Search",
|
||||
"registry_url": None,
|
||||
"transport": "http",
|
||||
"url": "https://mcp.nimbleway.com/mcp",
|
||||
"auth_type": "bearer_token",
|
||||
"env_vars": [
|
||||
{
|
||||
"name": "NIMBLE_API_KEY",
|
||||
"description": "Nimble API Key",
|
||||
"secret": True,
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
def test_well_known_servers_present(self, registry_path):
|
||||
"""Ensure key well-known MCPs are in the registry."""
|
||||
with open(registry_path, "r") as f:
|
||||
|
|
|
|||
|
|
@ -1926,7 +1926,7 @@ describe("CreateMCPServer", () => {
|
|||
});
|
||||
|
||||
describe("when prefillData is provided", () => {
|
||||
it("should populate form fields from discovery data", async () => {
|
||||
it("should sanitize the server name from discovery data", async () => {
|
||||
const prefillData = {
|
||||
name: "github-mcp",
|
||||
title: "GitHub MCP",
|
||||
|
|
@ -1939,11 +1939,30 @@ describe("CreateMCPServer", () => {
|
|||
render(<CreateMCPServer {...defaultProps} prefillData={prefillData} />);
|
||||
|
||||
await waitFor(() => {
|
||||
// Server name should be sanitized (hyphens replaced with underscores)
|
||||
const nameInput = getServerNameInput();
|
||||
expect(nameInput).toHaveValue("github_mcp");
|
||||
expect(getServerNameInput()).toHaveValue("github_mcp");
|
||||
});
|
||||
});
|
||||
|
||||
it("should populate URL and auth type from discovery data", async () => {
|
||||
const prefillData = {
|
||||
name: "nimble",
|
||||
title: "Nimble",
|
||||
description: "Nimble search server",
|
||||
category: "Search",
|
||||
transport: "http",
|
||||
url: "https://mcp.nimbleway.com/mcp",
|
||||
auth_type: "bearer_token",
|
||||
};
|
||||
|
||||
render(<CreateMCPServer {...defaultProps} prefillData={prefillData} />);
|
||||
|
||||
const urlInput = await screen.findByPlaceholderText("https://your-mcp-server.com");
|
||||
|
||||
expect(getServerNameInput()).toHaveValue("nimble");
|
||||
expect(urlInput).toHaveValue("https://mcp.nimbleway.com/mcp");
|
||||
expect(screen.getByText("Bearer Token")).toBeInTheDocument();
|
||||
expect(screen.getByText("Authentication Value")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe("with back to discovery button", () => {
|
||||
|
|
|
|||
|
|
@ -383,6 +383,7 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({
|
|||
alias: sanitizedName,
|
||||
description: prefillData.description || "",
|
||||
transport: transport,
|
||||
auth_type: prefillData.auth_type || undefined,
|
||||
};
|
||||
|
||||
if (transport === "stdio") {
|
||||
|
|
|
|||
|
|
@ -542,6 +542,7 @@ export interface DiscoverableMCPServer {
|
|||
category: string;
|
||||
registry_url?: string | null;
|
||||
transport: string;
|
||||
auth_type?: string | null;
|
||||
url?: string | null;
|
||||
command?: string | null;
|
||||
args?: string[] | null;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue