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

# Administration and MCP

> Public administration and mcp signatures and configuration in @agentium/transport 4.0.0.

Import these **5 exports** from `@agentium/transport`. Read the [administration and mcp guide](/admin/express) for setup and behavior, or return to the [package reference](/api-reference/transport).

A `?` marks an optional field. These are declarations for lookup; run the examples in the linked guide. Follow related-type links for Agentium types and source links for imported dependency types.

## AdminRouterOptions

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/transport/src/express/admin-router.ts)

```typescript theme={null}
export interface AdminRouterOptions {
    /** Shared MCPManager instance. If omitted, a new one is created. */
    mcpManager?: MCPManager;
    /**
     * Express middleware for authentication/authorization.
     * **IMPORTANT**: These endpoints can add MCP servers and execute tools.
     * Always add auth middleware in production.
     */
    middleware?: any[];
}
```

Related: [`MCPManager`](/api-reference/transport/administration#mcpmanager).

## createAdminRouter

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/transport/src/express/admin-router.ts)

```typescript theme={null}
/**
 * Creates an Express sub-router with admin endpoints for managing
 * MCP servers and the toolkit catalog at runtime.
 *
 * Mount under a prefix: `app.use("/admin", createAdminRouter())`
 *
 * Routes:
 *   GET    /mcp              — list MCP servers
 *   POST   /mcp              — add + connect an MCP server
 *   GET    /mcp/:id          — single server details
 *   POST   /mcp/:id/connect  — connect a server
 *   POST   /mcp/:id/disconnect — disconnect
 *   DELETE /mcp/:id          — remove a server
 *   GET    /mcp/:id/tools    — tools from a specific server
 *   GET    /mcp/tools        — all tools across connected servers
 *
 *   GET    /toolkits         — list toolkit catalog
 *   GET    /toolkits/:id     — single toolkit meta
 *   POST   /toolkits/:id     — instantiate a toolkit with config
 */
export declare function createAdminRouter(opts?: AdminRouterOptions): {
    router: any;
    mcpManager: MCPManager;
};
```

Related: [`AdminRouterOptions`](/api-reference/transport/administration#adminrouteroptions), [`MCPManager`](/api-reference/transport/administration#mcpmanager).

## MCPManager

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/transport/src/express/mcp-manager.ts)

```typescript theme={null}
/**
 * Manages multiple MCP server connections at runtime.
 * Servers can be added/removed/connected/disconnected dynamically,
 * and their tools can be collected for injection into agents.
 */
export declare class MCPManager {
    /** Add a server config. Auto-generates an id from the name if not provided. */
    add(config: MCPToolProviderConfig, id?: string): MCPServerSummary;
    /** Connect a server by id. Discovers tools on success. */
    connect(id: string): Promise<MCPServerSummary>;
    /** Disconnect a server by id. */
    disconnect(id: string): Promise<MCPServerSummary>;
    /** Remove a server entirely. Disconnects first if connected. */
    remove(id: string): Promise<void>;
    /** Get all tools from all connected servers, merged into one array. */
    getAllTools(): Promise<ToolDef[]>;
    /** Get tools from a specific server. */
    getTools(id: string): Promise<ToolDef[]>;
    /** List all registered servers. */
    list(): MCPServerSummary[];
    /** Get a single server summary. */
    get(id: string): MCPServerSummary;
    has(id: string): boolean;
    /** Disconnect all servers. */
    closeAll(): Promise<void>;
}
```

Related: [`MCPServerSummary`](/api-reference/transport/administration#mcpserversummary), [`MCPToolProviderConfig`](/api-reference/core/mcp#mcptoolproviderconfig), [`ToolDef`](/api-reference/core/tools#tooldef).

## MCPServerEntry

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/transport/src/express/mcp-manager.ts)

```typescript theme={null}
export interface MCPServerEntry {
    id: string;
    config: MCPToolProviderConfig;
    provider: MCPToolProvider;
    status: "disconnected" | "connecting" | "connected" | "error";
    error?: string;
    toolCount: number;
    connectedAt?: Date;
}
```

Related: [`MCPToolProvider`](/api-reference/core/mcp#mcptoolprovider), [`MCPToolProviderConfig`](/api-reference/core/mcp#mcptoolproviderconfig).

## MCPServerSummary

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/transport/src/express/mcp-manager.ts)

```typescript theme={null}
export interface MCPServerSummary {
    id: string;
    name: string;
    transport: string;
    url?: string;
    command?: string;
    status: string;
    toolCount: number;
    error?: string;
    connectedAt?: string;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.