> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mibyanai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mibyan packages

> Choose the right package and use Mibyan in your project

Mibyan provides official packages for JavaScript, React, Python, and MCP integrations.

## What are packages?

A package is ready-to-use code that connects your project to the Mibyan API. It handles common integration work so you can start with a few lines of code instead of building API requests, streaming, and error handling from scratch.

If you only use the Mibyan product, you do not need to install a package. These packages are for developers adding Mibyan to an application, website, or tool.

## Which package should I use?

| Package         | Use it for                                       | Registry  |
| --------------- | ------------------------------------------------ | --------- |
| `@mibyan/sdk`   | Most JavaScript and TypeScript applications      | npm       |
| `@mibyan/react` | React chat interfaces and streaming UI           | npm       |
| `@mibyan/mcp`   | MCP-compatible clients such as Cursor and Claude | npm       |
| `@mibyan/core`  | Advanced TypeScript integrations and libraries   | npm       |
| `mibyan-sdk`    | Python applications                              | PyPI soon |

Not sure? Start with `@mibyan/sdk`.

## JavaScript and TypeScript

This is the recommended starting point for most developers.

```bash theme={null}
npm install @mibyan/sdk
```

```ts theme={null}
import Mibyan from "@mibyan/sdk";

const client = new Mibyan({ apiKey: process.env.MIBYAN_API_KEY! });
const result = await client.chat.completions.create({
  model: "mibyan-4.1",
  messages: [{ role: "user", content: "Hello" }],
});

console.log(result.choices[0]?.message.content);
```

For streaming, set `stream: true` and iterate over the returned async iterable.

## React

Use `@mibyan/react` for React chat experiences with message, input, loading, error, and streaming state ready to use.

```bash theme={null}
npm install @mibyan/react
```

See the package README for a `useMibyanChat` example. Keep API keys on your server, not in browser code.

## Python

The Python SDK is ready in this repository and will be published to PyPI soon. For now, install it locally:

```bash theme={null}
python3 -m pip install ./packages/python
```

## MCP

```bash theme={null}
MIBYAN_API_KEY=your-key npx @mibyan/mcp
```

The server exposes the `mibyan_chat` tool over MCP stdio. See [authentication](/api-reference/authentication) for key management.

## How it fits together

1. Create an API key in Mibyan Platform.
2. Install the package that fits your project.
3. Pass the key to the package and call `mibyan-4.1`.
4. Use the returned text or stream in your application.
