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

# Build a Minimal HTTP Server

> Learn Redop by building a small HTTP MCP server with two tools and verifying it over /mcp.

This tutorial walks you through the smallest useful hosted Redop server.

## What you will build

By the end, you will have:

* an HTTP Redop server
* one simple health tool
* one tool with input
* a working MCP endpoint at `/mcp`

## Step 1: Create the server

```ts theme={null}
import { Redop } from "@redopjs/redop";

const app = new Redop({
  serverInfo: {
    name: "hello-redop",
    title: "Hello Redop",
    version: "0.1.0",
  },
});
```

## Step 2: Add a no-input tool

```ts theme={null}
app.tool("ping", {
  description: "Health check",
  handler: () => ({ pong: true, ts: Date.now() }),
});
```

## Step 3: Add a tool with input

```ts theme={null}
app.tool("echo", {
  description: "Echo a message",
  inputSchema: {
    type: "object",
    properties: {
      message: { type: "string" },
    },
    required: ["message"],
  },
  handler: ({ input }) => ({
    message: input.message,
  }),
});
```

## Step 4: Start HTTP

```ts theme={null}
app.listen(3000);
```

## Step 5: Run and verify

```sh theme={null}
bun run src/index.ts
```

Then connect a client to `http://localhost:3000/mcp`.

## What to do next

Now that the transport works, add a schema so the handler input becomes typed.

* [Add typed input with Zod](/docs/tutorials/add-zod-tool)
