Town MCP
Town MCP connects the AI agents you already use, like Claude, ChatGPT, Cursor or Devin, to your Townie. A connected agent can ask your Townie to do or find things, follow up, run your routines, and pass files back and forth. It acts as you and follows your approval settings.
Town MCP is in beta and may not be on your account yet. If you don’t see Town MCP under Powers, it isn’t available to you.
Before you start
- Open Powers → Town MCP in Town and copy your server address. It is
https://harness.town.com/mcp; if the page shows a different address, use that one wherever this guide shows it. - There is no API key. Every agent signs in with your Town account in the browser, and you choose Allow.
- An agent stays connected until you disconnect it, as long as you keep using it. One that goes unused for 30 days has to sign in again. See Manage connected agents.
Connect an agent
Each agent has its own place for adding a server. In every case, when the browser opens, sign in to Town and choose Allow.
Claude Code
-
Run this in your terminal:
claude mcp add --transport http town https://harness.town.com/mcp -
In Claude Code, run
/mcp, pick town, and choose Authenticate. -
Sign in to Town when the browser opens, then choose Allow.
Claude
The Claude app on the web, desktop and mobile.
- Choose Plugins in the left sidebar.
- Choose Add, then Add custom connector.
- Name it Town and paste the server address.
- Under Authentication, choose Sign in now. Under OAuth client, choose Use Claude’s published identity, then choose Add.
- Sign in to Town when the browser opens, then choose Allow.
On a Team or Enterprise plan, an owner adds it first under Organization settings → Connectors: Add, then Custom, then Web. Each member then connects it under Customize → Connectors.
ChatGPT and Codex
OpenAI’s assistant and coding agent share these settings.
- Open Settings, then Plugins.
- Choose Add, then Add MCP server.
- Name it Town, select Streamable HTTP, paste the server address into URL, and choose Save.
- Back in MCPs, choose Authenticate next to Town.
- Sign in to Town when the browser opens, then choose Allow.
The sign-in screen may say Codex. In the Codex CLI, run the command below, then codex mcp login town:
codex mcp add town --url https://harness.town.com/mcpOn a Business or Enterprise workspace, an admin creates the app under Workspace settings → Apps.
Cursor
-
Open Cursor Settings, then MCP, and choose Add new MCP server.
-
Paste this into
mcp.jsonand save:{ "mcpServers": { "town": { "url": "https://harness.town.com/mcp" } } } -
Back in the MCP settings, choose Connect next to town.
-
Sign in to Town when the browser opens, then choose Allow.
VS Code
GitHub Copilot’s agent mode in Visual Studio Code.
- Run MCP: Add Server from the Command Palette and choose HTTP.
- Paste the server address, name it town, and choose where to save it.
- Sign in to Town when the browser opens, then choose Allow.
Or add this to .mcp.json at the root of your workspace:
{
"mcpServers": {
"town": {
"type": "http",
"url": "https://harness.town.com/mcp"
}
}
}Devin
-
Open Customize, then the MCPs tab.
-
Choose +, then New MCP.
-
Paste this JSON:
{ "mcpServers": { "town": { "url": "https://harness.town.com/mcp", "transport": "http" } } } -
Sign in to Town when Devin asks, then choose Allow.
In the Devin CLI, add the same JSON to ~/.config/devin/mcp_config.json (%APPDATA%\devin\mcp_config.json on Windows), then sign in with devin mcp login town.
Any other agent
Most agents that support remote MCP servers with browser sign-in (OAuth) work. Town signs agents in without a client secret, so an agent that insists on one can’t connect.
- Add a remote (streamable HTTP) MCP server.
- Use the server address. There is no API key to paste.
- Sign in to Town when the browser opens, then choose Allow.
What a connected agent can do
- Ask your Townie to do or find something, using your email, calendar and connected tools.
- Check on a request that is still running, and reply with a follow-up or an answer to a question.
- Stop a request.
- List and run your own routines. Team routines run from Town, not from an agent. A routine run opens in Town; the agent can check on it but can’t reply to it or stop it.
- Get and send files. See Files.
- Read your Townie’s name and what it can reach, so it knows what to ask for. This never includes contacts or content.
Approvals
A connected agent follows the same approval settings you do. When your Townie needs your approval, it waits and the agent tells you. You approve in Town; an agent can’t approve for you.
See Modes & Approvals.
Threads in Town
Everything a connected agent asks happens in a thread you can see in Town, under Recents. To show or hide these threads, use the Connected agents filter.
- You can continue a thread yourself. Write in it like any other thread. Messages the agent sent for you are labelled with its name, for example via Claude Code; yours are not.
- The agent can read what you write there. When it catches up on the thread, it sees your messages and your Townie’s replies. If it seems to have missed something, ask it to read the thread from the start.
- These threads stay quiet. They don’t show as unread. A thread that is waiting on your approval or an answer still shows that it needs you.
Files
An agent can read files you own in its threads and send your Townie files of up to 25 MB.
- Text files and Town documents can be read directly.
- Other files move over a short-lived link. The agent gets a download link that works for 15 minutes, or an upload link that works once, for 5 minutes.
- Google files and audio are named, not downloaded. The agent is told they are there. Ask your Townie about their contents instead.
- You can add a file yourself. Attach it in the thread in Town, and the agent sees it when it catches up on the thread.
Agents that run on your computer, like Claude Code, Cursor and Codex, can use these links as they are. In the Claude app, links work only if Claude’s code execution is allowed to reach www.town.com and harness.town.com. Allow them under Settings → Capabilities, in the network access for code execution. On a Team or Enterprise plan, an owner does this.
Manage connected agents
Open Powers → Town MCP to see every connected agent, when it connected, and when it last signed in or renewed its sign-in.
To remove one, choose Disconnect. It loses access within about half a minute, and its threads stay in Town. A download link it already holds keeps working until the link expires.
An agent Town can’t verify is marked unverified. Before you choose Allow, check that the sign-in screen names the app you expect and where it will return you.
Troubleshooting
- The agent doesn’t show a new tool. Agents read the list of tools when a session starts. Start a new session, or reconnect Town in the agent’s settings.
- The agent says there are too many requests. Wait for the time it gives, then try again.
- A file link stopped working. Links are short-lived. Ask the agent to get a new one.
- The agent says it needs to sign in again. Sign-ins lapse after 30 days without use. Authenticate again in the agent’s settings.
- The agent can’t find a thread. An agent can only reach threads it started on its current connection. After you disconnect and reconnect an agent, its earlier threads stay in Town but it can’t reach them. Ask it to start a new one.
Related
- Modes & Approvals: how approvals work
- Routines: what a connected agent can run for you
Town