TutorialsHow to create mcp servers

Inkeep

Copy page

Learn how to use Inkeep to create MCP servers

The Quick Start workspace includes a Next.js app in the apps/mcp/app/ directory that you can use to expose your MCP servers. Each MCP server you create will be exposed on a separate route on this app.

Adding from a template

You can add a new MCP server from our templates repository using the CLI.

inkeep add --mcp [server-name]

This will automatically add a new MCP server to your Quick Start workspace.

Using Vercel's Template

If you want to create a custom MCP server, you can use Vercel's Next.js MCP template as a starting point.

Create a new directory in your project's apps/mcp/app/ directory with your desired server name (e.g. apps/mcp/app/my-email-mcp/mcp).

mkdir -p apps/mcp/app/[server-name]/mcp

Copy the template route.ts file from the Vercel MCP template into apps/mcp/app/[server-name]/mcp/route.ts.

Modify the template route.ts file with your desired tools and resources.

Set the basePath of the createMcpHandler to /[server-name].

Running locally

pnpm dev

This will start the server on port 3006.

Deploying to Vercel

Follow the instructions in Deploy to Vercel. If you have already deployed to Vercel, you can simply update the deployment by pushing to the same repository.

Note
Note

Enable Fluid compute and set maxDuration to 800 in apps/mcp/app/[server-name]/[transport]/route.ts if you're on a Pro or Enterprise plan and have long-running operations.