AgentKit supports using Claude’s Model Context Protocol as tools.

Using MCP as tools allows you to use any MCP server as a tool in your AgentKit network, enabling your Agent to access thousands of pre-built tools to interact with. Our integration with Smithery provides a registry of MCP servers for common use cases, with more than 2,000 servers across multiple use cases.

Using MCP as tools

AgentKit supports configuring MCP servers via SSE or WS transports:

import { createAgent } from "@inngest/agent-kit";

const neonAgent = createAgent({
  name: "neon-agent",
  system: `You are a helpful assistant that help manage a Neon account.
  `,
  mcpServers: [
    {
      name: "neon",
      transport: {
        type: "ws",
        url: "ws://localhost:8080",
      },
    },
  ],
});

mcpServers reference

The mcpServers parameter allows you to configure Model Context Protocol servers that provide tools for your agent. AgentKit automatically fetches the list of available tools from these servers and makes them available to your agent.

mcpServers
MCP.Server[]

An array of MCP server configurations.

MCP.Server

name
string
required

A short name for the MCP server (e.g., “github”, “neon”). This name is used to namespace tools for each MCP server. Tools from this server will be prefixed with this name (e.g., “neon-createBranch”).

transport
TransportSSE | TransportWebsocket
required

The transport configuration for connecting to the MCP server.

TransportSSE

type
'sse'
required

Specifies that the transport is Server-Sent Events.

url
string
required

The URL of the SSE endpoint.

eventSourceInit
EventSourceInit

Optional configuration for the EventSource.

requestInit
RequestInit

Optional request configuration.

TransportWebsocket

type
'ws'
required

Specifies that the transport is WebSocket.

url
string
required

The WebSocket URL of the MCP server.

Examples

Neon Assistant Agent (using MCP)

This examples shows how to use the Neon MCP Smithery Server to build a Neon Assistant Agent that can help you manage your Neon databases.


AgentsToolsNetworkIntegrations
Code-based Router