Skip to Content
IntegrationsCustom Integrations (MCP)

Custom Integrations (MCP)

MCP servers let you extend your assistant with custom tools beyond the built-in integrations. If you need to connect to a service that Town doesn’t support natively, MCP is the way to do it.

What is MCP?

MCP (Model Context Protocol) is a standard for connecting AI assistants to external tools and services. Think of it as a way to give your assistant access to any tool or service, even ones not built into Town.

How it works

  1. You set up an MCP server (or use one that’s already running)
  2. You add the server from Integrations
  3. When creating a routine, you enable the MCP server
  4. Your assistant can now use the custom tools from that server

Setting up an MCP server

Add a server

  1. Go to Integrations and choose to add a custom integration (Add an integration)
  2. Enter the server’s URL and click Continue
  3. Follow the prompts to finish connecting the server

Use the server’s Streamable HTTP endpoint (often ending in /mcp). Town talks to MCP servers over Streamable HTTP only — the older HTTP+SSE transport (endpoints that usually end in /sse) isn’t supported.

If your server uses an old /sse address, find its Streamable HTTP address (often ending in /mcp). If it doesn’t need a sign-in, choose Edit and replace the address. If you entered a token or other headers, enter them again when you edit the address. If you signed in through the server, remove it and add it again with the new address, then turn it back on in any routines that used it.

Servers that require OAuth

If the server asks you to sign in, Town runs the OAuth flow for you. Some servers only accept redirect URLs that have been allowlisted in advance, and will fail authorization with an error like “the provided redirect_uri is not in the list of allowed callback URLs”. When the server’s owner asks which URL to allow, give them:

What they’re asking forValue
Redirect / callback URLhttps://www.town.com/api/mcp/oauth/callback
Client ID (for servers that support client-ID metadata)https://www.town.com/.well-known/oauth-client-id

Some servers match redirect URLs exactly, so if they support more than one entry, ask them to allow https://town.com/api/mcp/oauth/callback as well. Servers that support dynamic client registration usually need no allowlisting — Town registers itself and sends its callback URL during registration. If the server rejects that URL, you’ll see a “Client registration failed” error and the server’s owner still needs to allow the callback URL above.

When you add a server, Town checks whether it advertises OAuth (a few featured servers that use API keys skip this check and go straight to a token form). If it does, you’ll see a Sign in step; if Town can’t find the server’s OAuth details, it shows the header-authentication form instead. Choosing No authentication there connects without signing in — it won’t trigger OAuth later. If you know the server uses OAuth but see the header form instead of a sign-in button, click Sign in with OAuth instead to try the server’s sign-in flow. If you already added it with No authentication or headers, remove it and add it again first — Edit only changes the name, URL, and headers, so it can’t start sign-in. Removing a server also turns it off for every routine that used it, so turn it back on for those routines after adding it again.

Enable for a routine

When creating or editing a routine:

  1. Find the MCP servers card (use Add or manage MCP servers to change what’s connected)
  2. Check the servers you want to enable
  3. The routine now has access to the custom tools

Using custom tools

Once enabled, custom tools from your MCP server work just like any other tool:

  • They appear in the routine’s tool list
  • Your assistant uses them when appropriate
  • Results show up in the run history

Example use cases

Internal company services

Connect to your organization’s internal tools:

  • Query your internal CRM or helpdesk
  • Update ticket systems
  • Access internal databases

Specialized platforms

Integrate with industry-specific services:

  • Specialized SaaS tools
  • Industry platforms
  • Proprietary systems

Custom capabilities

Add specialized functionality:

  • Custom data processing
  • Specialized search across your data
  • Domain-specific analysis

What you’ll see

When you enable an MCP server for a routine, the settings show:

  • Server name — Which server is connected
  • Summary — What the server provides
  • Tool count — How many tools are available
  • Impact — How much context the server adds

Only enable MCP servers that a routine actually needs. Each server adds to the routine’s context, which can affect performance.

Best practices

  • Test your MCP connection first. Before enabling for important routines, verify that the server is accessible and responding correctly.
  • Monitor for issues. Check the run history to make sure custom tool calls are succeeding.
  • Keep it focused. Only enable the MCP servers a routine needs. More servers means more complexity.

Learn more

Last updated on