Create MCP Servers
Copy page
Learn how to create and deploy MCP servers
MCP servers enable your agents to fetch real-time information and take action on your systems, services, and applications. This guide covers multiple approaches to creating and deploying MCP servers for your agents.
Out-of-the-box servers
The fastest way to get started is by connecting to existing MCP servers provided directly by SaaS providers that offer them.
MCPs with OAuth 2.1/PKCE support
These servers often implement OAuth 2.1 with PKCE for secure authentication that allow for 1-click authentication without the need for API keys.
Here's an example list of popular service-maintained MCP Servers that support 1-click install via the OAuth 2.1/PKCE authentication flow.
To add them to your project:
- navigate to MCP Servers in the Inkeep Visual Builder.
- Click on New MCP Server
- Choose from the preset list under Popular Services or register any under Custom Server
When you register the server, an authentication pop-up will appear and allow you to sign in. Your credentials will automatically be saved to your Nango Store or Keychain credential store.
Build Your Own
Creating custom MCP servers gives you complete control over functionality and integration with your internal systems.
From the Quick Start
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.
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).
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
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.
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.
Using Gram
Speakeasy Gram provides a lightweight open source framework for repurposing and remixing existing APIs into MCP Servers.
Using Anthropic's MCP SDKs
See Anthropic's official MCP SDKs for low-level building blocks for creating MCP servers in multiple languages like TypeScript, Python and Go.
TypeScript example
Use MCP Server Libraries
For rapid development, leverage existing MCP server libraries that provide pre-built integrations.
Composio
Composio offers a platform for building and managing MCP servers with access to 10,000+ pre-built tools and integrations.
Quick integration
Follow Composio's MCP Gateway setup to obtain your MCP server URL and credentials. Then register it as a tool in your project:
Next Steps
Once you create your MCP server, register it and manage its credentials:
Visual Builder - MCP Servers
Configure and manage MCP servers in the Visual Builder.
Visual Builder - Credentials
Add and manage credentials, including OAuth 2.1/PKCE.
TypeScript SDK - MCP Servers
Register and use MCP servers programmatically.
TypeScript SDK - Credentials
Reference credentials in code for secure access.