Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_size = 2
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"trailingComma": "none",
"arrowParens": "avoid",
"singleQuote": true,
"printWidth": 80,
"useTabs": true,
"tabWidth": 4,
"semi": true
}
43 changes: 25 additions & 18 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,63 @@
The Langbase CLI is a command-line interface for Langbase. It provides a set of commands to interact with the Langbase SDK and perform various tasks related to AI development.

## Usage

### Langbase Docs MCP Server

Integrate the Langbase Docs MCP server into your IDEs and Claude Desktop.

#### Cursor

- Open Cursor settings
- Navigate to the MCP settings
- Click on the `+` button to add a new global MCP server
- Paste the following configuration in the `mcp.json` file:

```json
{
"mcpServers": {
"Langbase": {
"command": "npx",
"args": ["@langbase/cli","docs-mcp-server"]
}
}
"mcpServers": {
"Langbase": {
"command": "npx",
"args": ["@langbase/cli", "docs-mcp-server"]
}
}
}
```

#### Windsurf

- Navigate to Windsurf - Settings > Advanced Settings
- You will find the option to Add Server
- Click “Add custom server +”
- Paste the following configuration in the `mcp_config.json` file:

```json
{
"mcpServers": {
"Langbase": {
"command": "npx",
"args": ["@langbase/cli", "docs-mcp-server"]
}
}
"mcpServers": {
"Langbase": {
"command": "npx",
"args": ["@langbase/cli", "docs-mcp-server"]
}
}
}
```

#### Claude Desktop

- Open Claude Desktop File Menu
- Navigate to the settings
- Go to Developer Tab
- Click on the Edit Config button
- Paste the following configuration in the `claude_desktop_config.json` file:

```json
{
"mcpServers": {
"Langbase": {
"command": "npx",
"args": ["@langbase/cli", "docs-mcp-server"]
}
}
"mcpServers": {
"Langbase": {
"command": "npx",
"args": ["@langbase/cli", "docs-mcp-server"]
}
}
}
```

Expand Down
13 changes: 13 additions & 0 deletions packages/langbase/src/langbase/langbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface AgentRunOptionsBase {
max_completion_tokens?: number;
response_format?: ResponseFormat;
customModelParams?: Record<string, any>;
mcp_servers?: McpServerSchema[];
}

export interface AgentRunOptions extends AgentRunOptionsBase {
Expand Down Expand Up @@ -96,6 +97,18 @@ export interface AgentRunResponse {
};
}

export interface McpServerSchema {
name: string;
type: 'url';
url: string;
authorization_token?: string | null;
tool_configuration?: {
allowed_tools?: string[] | null;
enabled?: boolean;
} | null;
custom_headers?: any | null;
}

export interface RunResponseStream {
stream: ReadableStream<any>;
threadId: string | null;
Expand Down
Loading