← Back to all tweets

Tweet by @anthonysheww

View original on X

xmcp uses file-based routing and strong conventions to author the tools for your MCP server. If you're used to file-based routing for frontends, it should feel quite familiar! https://t.co/n5Z1gnt40K

A screenshot of a tool in an MCP server. code:

// src/tools/greet.ts
import { z } from "zod";
import { type InferSchema } from "xmcp";

export const schema = {
  name: z.string().describe("The name of the user to greet"),
};

// Tool metadata
export const metadata = {
  name: "greet",
  description: "Greet the user",
};
export default async function greet({ name }: InferSchema<typeof schema>) {
  const result = `Hello, ${name}!`;

  return {
    content: [{ type: "text", text: result }],
  };
}
Vercel Changelog
Vercel Changelog
@vercel_changes

You can now deploy xmcp, a framework for building and shipping MCP applications with TypeScript, to Vercel with zero-configuration. vercel.com/changelog/depl…

24
Reply