# Server Info (/docs/configuration/server-info)

The `template` config controls how your MCP server identifies itself to clients and what it displays on its home page.

The `name`, `description`, and `icons` fields are sent in the MCP `initialize` response as `serverInfo`, so MCP clients can display your server with a branded name and icon instead of a generic tile.

## Server Info

```typescript title="xmcp.config.ts"
const config: XmcpConfig = {
  template: {
    name: "My MCP Server",
    description: "A server that does amazing things.",
  },
};
```

| Field          | Default                                         | Description                                                    |
| -------------- | ----------------------------------------------- | -------------------------------------------------------------- |
| `name`         | `"xmcp server"`                                 | Display name shown in MCP clients and the home page            |
| `description`  | `"This MCP server was bootstrapped with xmcp."` | Server description                                             |
| `instructions` | —                                               | Instructions describing how to use the server and its features |

The server `version` is automatically read from your project's `package.json` at build time.

## Instructions

The optional `instructions` field lets you provide guidance to LLM clients about how to use your server effectively. When set, it is sent in the MCP [`initialize` response](https://modelcontextprotocol.io/specification/2025-11-25/schema#initializeresult-instructions) (2025-era connections) and in the server identity advertised on protocol revision `2026-07-28`, and can be added to the system prompt by MCP clients.

```typescript title="xmcp.config.ts"
const config: XmcpConfig = {
  template: {
    name: "My MCP Server",
    instructions:
      "Always call get-user before calling update-user. " +
      "Use list-items with pagination for large datasets. " +
      "The search tool supports fuzzy matching by default.",
  },
};
```

Instructions should focus on information that helps the model use the server effectively, such as:

* **Cross-tool relationships**: which tools should be called together or in sequence
* **Workflow patterns**: recommended ways to accomplish common tasks
* **Constraints**: limitations or requirements the model should be aware of

Instructions should **not** duplicate information already present in individual tool descriptions.

## Icons

You can provide custom icons that MCP clients will use to display your server. The format follows the [MCP spec's `serverInfo.icons`](https://modelcontextprotocol.io/specification/2026-07-28/basic/lifecycle#implementation) format.

```typescript title="xmcp.config.ts"
const config: XmcpConfig = {
  template: {
    name: "My MCP Server",
    icons: [
      { src: "https://example.com/icon.png", mimeType: "image/png" },
      { src: "./logo.svg", mimeType: "image/svg+xml" },
      { src: "https://example.com/icon.webp", mimeType: "image/webp" },
    ],
  },
};
```

Each icon object supports:

| Field      | Required | Description                                                                   |
| ---------- | -------- | ----------------------------------------------------------------------------- |
| `src`      | Yes      | URL, data URI, or local file path (relative to project root)                  |
| `mimeType` | No       | MIME type supported: `image/png`, `image/jpeg`, `image/svg+xml`, `image/webp` |
| `sizes`    | No       | Array of size strings (e.g. `["64x64", "128x128"]`)                           |
| `theme`    | No       | `"light"` or `"dark"` for theme-specific icons                                |

You can use a local file path for `src` and xmcp will read the file at build time and inline it as a data URI:

```typescript title="xmcp.config.ts"
const config: XmcpConfig = {
  template: {
    icons: [
      { src: "src/assets/icon.png" },
    ],
  },
};
```

## Home Page

Customize the HTML page served at the `/` endpoint of your HTTP server.

```typescript title="xmcp.config.ts"
const config: XmcpConfig = {
  template: {
    // Option 1: Inline HTML
    homePage: "<html><body><h1>Welcome!</h1></body></html>",

    // Option 2: Path to an HTML file (relative to project root)
    // homePage: "src/home.html",
  },
};
```

When `homePage` is not provided, xmcp serves a default landing page with your server name and description.
