What is an Upstream?
Think of an upstream as a “protected server registration.” It tells Latch:- What MCP server to connect to
- How to connect (stdio command or HTTP URL)
- Which tools that server exposes
Creating an Upstream
- Go to Upstreams in the dashboard
- Click Create Upstream
- Choose your transport type:
Stdio Upstreams (Local)
For MCP servers that run as local processes (most common):- Name: A label for this upstream (e.g.,
filesystem,github) - Command: The command to run (e.g.,
npx) - Args: Command arguments (e.g.,
-y,@modelcontextprotocol/server-filesystem,/tmp)
For stdio upstreams, the command/args are only used for tool discovery. The actual server is spawned by the CLI when your agent connects.
HTTP Upstreams (Remote)
For MCP servers running as web services:- Name: A label for this upstream
- URL: The server’s HTTP endpoint
- Headers: Authentication headers (API keys, Bearer tokens)
Importing from Claude Desktop / Cursor
Already have MCP servers configured? Import them directly:- Go to Upstreams → Import MCP config
- Paste your
mcpServersJSON from Claude Desktop or Cursor config - Select which server to import
Tool Discovery
Latch needs to know what tools an upstream exposes so you can create per-tool rules.| Transport | Discovery Method |
|---|---|
| HTTP | Automatic on save. Re-run via Sync Tools button. |
| Stdio | Happens when the CLI connects. Or run manual sync (see below). |
Manual Tool Sync (Stdio)
To discover tools before connecting an agent:Exporting Client Configs
Once an upstream is configured, export a ready-to-use config for your MCP client:- Go to Upstreams
- Click Export on the upstream row
- Choose your client format (Claude Desktop, Cursor, etc.)
- Paste into your client’s config file
Common Upstream Examples
Filesystem Server
GitHub Server
Remote HTTP Server
Next Steps
Once you’ve created an upstream:- Sync its tools so Latch knows what it exposes
- Create rules to control what actions are allowed
- Export the config to your MCP client