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

# Installation

> Install @sedata-ai/mcp and verify your environment.

## Requirements

| Requirement                 | Version                                  |
| --------------------------- | ---------------------------------------- |
| Node.js                     | `>= 22.16`                               |
| `@modelcontextprotocol/sdk` | `>= 1.21.1` (peer dependency)            |
| TypeScript                  | `>= 5.0` (recommended for typed configs) |

The package targets ESM and CommonJS via `dist/index.js` with type declarations
in `dist/index.d.ts`.

## Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @sedata-ai/mcp
  ```

  ```bash pnpm theme={null}
  pnpm add @sedata-ai/mcp
  ```

  ```bash yarn theme={null}
  yarn add @sedata-ai/mcp
  ```

  ```bash bun theme={null}
  bun add @sedata-ai/mcp
  ```
</CodeGroup>

If you don't already have the MCP SDK and Zod (used for input schemas), install
them too:

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

## Bundled OpenTelemetry dependencies

`@sedata-ai/mcp` brings the OTel pieces it needs as direct dependencies — you
don't have to install or pin them yourself:

| Package                                     | Purpose                                 |
| ------------------------------------------- | --------------------------------------- |
| `@opentelemetry/api`                        | Tracer / meter handles                  |
| `@opentelemetry/sdk-node`                   | Node SDK that wires everything together |
| `@opentelemetry/sdk-trace-base`             | Trace primitives + samplers             |
| `@opentelemetry/sdk-metrics`                | Periodic metric reader                  |
| `@opentelemetry/exporter-trace-otlp-http`   | OTLP/HTTP trace exporter                |
| `@opentelemetry/exporter-metrics-otlp-http` | OTLP/HTTP metric exporter               |
| `@opentelemetry/exporter-trace-otlp-grpc`   | OTLP/gRPC trace exporter (opt-in)       |
| `@opentelemetry/auto-instrumentations-node` | Node auto-instrumentations              |
| `@opentelemetry/resources`                  | Resource detection (env, host, OS)      |
| `@opentelemetry/semantic-conventions`       | Standard attribute keys                 |

<Warning>
  If your project already depends on a different version of `@opentelemetry/api`,
  use a single version across the dependency tree. Multiple versions of the API
  lead to "no-op" tracers that silently drop spans.
</Warning>

## Verify the install

Run a one-off script to confirm everything resolves:

```ts verify.ts theme={null}
import { instrumentServer } from '@sedata-ai/mcp'

console.log(typeof instrumentServer === 'function' ? 'ok' : 'missing')
```

```bash theme={null}
npx ts-node verify.ts
# → ok
```

## Next

<Card title="Quickstart" icon="bolt" href="/quickstart">
  Wire up your first instrumented MCP server.
</Card>
