Smithery - MCP Registry
Smithery is an MCP (Model Context Protocol) servers registry, listing more than 2,000 MCP servers across multiple use cases:
- Code related tasks (ex: GitHub, E2B)
- Web Search Integration (ex: Brave, Browserbase)
- Database Integration (ex: Neon, Supabase)
- Financial Market Data
- Data & App Analysis
- And more…
Adding a Smithery MCP Server to your Agent
Section titled “Adding a Smithery MCP Server to your Agent”-
Install AgentKit
Within an existing project, install AgentKit along with the Smithery SDK:
Terminal window npm install @inngest/agent-kit inngest @smithery/sdkTerminal window pnpm install @inngest/agent-kit inngest @smithery/sdkTerminal window yarn add @inngest/agent-kit inngest @smithery/sdkDon’t have an existing project?
To create a new project, create a new directory then initialize using your package manager:
Terminal window mkdir my-agent-kit-project && npm initTerminal window mkdir my-agent-kit-project && pnpm initTerminal window mkdir my-agent-kit-project && yarn init -
Setup an AgentKit Network with an Agent
Create an Agent and its associated Network, for example a Neon Assistant Agent:
import { z } from "zod";import {anthropic,createAgent,createNetwork,createTool,} from "@inngest/agent-kit";const neonAgent = createAgent({name: "neon-agent",system: `You are a helpful assistant that help manage a Neon account.IMPORTANT: Call the 'done' tool when the question is answered.`,tools: [createTool({name: "done",description: "Call this tool when you are finished with the task.",parameters: z.object({answer: z.string().describe("Answer to the user's question."),}),handler: async ({ answer }, { network }) => {network?.state.kv.set("answer", answer);},}),],});const neonAgentNetwork = createNetwork({name: "neon-agent",agents: [neonAgent],defaultModel: anthropic({model: "claude-3-5-sonnet-20240620",defaultParameters: {max_tokens: 1000,},}),router: ({ network }) => {if (!network?.state.kv.get("answer")) {return neonAgent;}return;},}); -
Add the Neon MCP Smithery Server to your Agent
Add the Neon MCP Smithery Server to your Agent by using
createSmitheryUrl()from the@smithery/sdk/config.jsmodule and providing it to the Agent via themcpServersoption:import {anthropic,createAgent,createNetwork,createTool,} from "@inngest/agent-kit";import { createSmitheryUrl } from "@smithery/sdk/config.js";import { z } from "zod";const smitheryUrl = createSmitheryUrl("https://server.smithery.ai/neon/ws", {neonApiKey: process.env.NEON_API_KEY,});const neonAgent = createAgent({name: "neon-agent",system: `You are a helpful assistant that help manage a Neon account.IMPORTANT: Call the 'done' tool when the question is answered.`,tools: [createTool({name: "done",description: "Call this tool when you are finished with the task.",parameters: z.object({answer: z.string().describe("Answer to the user's question."),}),handler: async ({ answer }, { network }) => {network?.state.kv.set("answer", answer);},}),],mcpServers: [{name: "neon",transport: {type: "ws",url: smitheryUrl.toString(),},},],});const neonAgentNetwork = createNetwork({name: "neon-agent",agents: [neonAgent],defaultModel: anthropic({model: "claude-3-5-sonnet-20240620",defaultParameters: {max_tokens: 1000,},}),router: ({ network }) => {if (!network?.state.kv.get("answer")) {return neonAgent;}return;},});
You will find the complete example on GitHub:
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.