Why Connect is a great place to host your MCP servers
The Model Context Protocol (MCP) is a popular topic for many teams because it offers a standardized way to connect large language models to data sources, APIs, and tools. Instead of one-off integrations for every application and model, MCP gives AI clients a consistent, secure way to request the additional context they need.
At Posit, we host multiple MCP servers internally on Connect. They give our AI tools like Posit Assistant and Claude Code a way to interact with our internal systems. This means our employees can focus on critical tasks and not the process of gathering information and resources.
MCP servers are now a native content type in Connect
Developing these MCP servers shaped what we’re building into Connect. We’ve added additional authentication features we wanted. We thought it wasn’t easy to distinguish MCPs from other APIs, so we made MCP a supported content type which provides better discovery and management. When you publish an MCP server, Connect tags it as an MCP content automatically on its first deployment. We’re continuing to add new features based on our internal usage and talking with customers.
In this first part of our blog series, we’ll cover the basics of MCP, how they work on Connect, and deploy an example MCP server to Connect.
What is MCP?
MCP is an open standard for how AI applications can discover and use tools, data sources, and other capabilities like shared prompts. First released in November 2024 by Anthropic, it has grown in popularity and seen broad adoption. In December 2025, MCP was donated to the Agentic AI Foundation (AAIF), under the Linux Foundation, so it will remain an open standard.
Ultimately, MCP servers are just Application Programming Interfaces (APIs) designed to work well with AI applications. MCP details how the endpoints should be defined and how authentication should work. Here are the key concepts.
MCP Clients, sometimes called applications, are the AI-powered tools your team already uses. Any front-end that uses AI to help your team get work done can be an MCP client. More specifically, these could be AI coding agents like Posit Assistant, Claude Code, or Github Copilot. They could also be AI desktop apps like Claude or ChatGPT, or even a custom chatbot your organization built.
MCP Servers are applications that make resources available to AI clients. They act as a bridge between your AI clients and organizational resources, providing a structured way to access systems and data. You can use your own MCP servers or use existing ones maintained by major providers like GitHub.
Tools are what MCP servers provide, with each server providing one or more tools. Think of tools as functions an AI client can leverage, such as querying a database or calling an API. The server describes what each tool does and what inputs it expects, so the AI client can decide when and how to use it.
Here’s how the pieces fit together for an MCP client accessing an API through an MCP server.
How an MCP client, MCP server on Connect, and an external API work together to answer a user’s request.
For a deeper dive into MCP, see the official MCP documentation and our MCP server guide for Connect.
Why your team cares about MCP
MCP servers are interesting technically, but also provide real value to your team. They turn AI assistants from generic tools to ones that understand your business and data without training a new model. It’s a single standard that can work across most AI clients your team already uses. These benefits can lead to a better return on your AI investment, but only if the tools are governed, secure, and accessible to the whole team. That’s where Connect comes in.
Hosting MCPs on Connect
You can build and run a local MCP server on your laptop to experiment, but when a teammate wants access or your security team asks about credential management, you will need something more robust. MCP servers fit naturally alongside the APIs and applications your team already deploys to Connect.
Connect includes an OAuth 2.1 authorization server, so MCP clients can authenticate users through a standard browser flow. Your security team will appreciate not having API keys in a config file. If your server needs to access third-party services like Snowflake, Databricks, or Google on a user’s behalf, Connect’s viewer integrations handle that credential exchange too. We’ll cover that more on the technical details in Part 2.
Connect automatically detects MCP content types, which appear in a dedicated tab in the content list.
A simple MCP server
Here we’ll build an MCP server that fetches the current weather from a public API. No credentials or databases to manage, just a simple example. Before we do that, let’s see what happens when you ask an AI coding assistant about the weather in Boston.
As we can see, without additional tooling, the assistants can’t look up the current weather. To fix that, we can use our simple weather MCP server that gets weather data based on latitude and longitude.
import os
from urllib.parse import urlparse
import httpx
from fastmcp import FastMCP
from starlette.middleware.trustedhost import TrustedHostMiddleware
mcp = FastMCP(
name="Weather MCP Server",
instructions=(
"MCP server that returns current weather conditions from Open-Meteo. "
"Use the get_weather tool with latitude and longitude to fetch a snapshot."
),
)
@mcp.tool()
def get_weather(latitude: float, longitude: float) -> str:
"""Get the current weather for a given latitude/longitude.
Convert place names (e.g. "Paris" or "New York" to decimal-degree
coordinates before calling. """
response = httpx.get(
"https://api.open-meteo.com/v1/forecast",
params={
"latitude": latitude,
"longitude": longitude,
"current": "temperature_2m,wind_speed_10m",
"temperature_unit": "fahrenheit",
"wind_speed_unit": "mph",
},
timeout=10.0,
)
response.raise_for_status()
current = response.json()["current"]
return (
f"The weather is {current['temperature_2m']} degrees fahrenheit "
f"with wind speeds of {current['wind_speed_10m']} mph."
)
app = mcp.http_app(path="/mcp", stateless_http=True, json_response=True)
if connect_server := os.environ.get("CONNECT_SERVER", ""):
host = (urlparse(connect_server).netloc or connect_server).rstrip("/")
if host:
app.add_middleware(TrustedHostMiddleware, allowed_hosts=[host])There are two things to call out with this example.
First, the tool is just a Python function. The @mcp.tool() decorator turns the function get_weather into something an MCP client can discover and call. The docstring is the tool’s description, telling the AI assistant when and how to use it. The AI client knows it has the ability to get weather data with the tool, but doesn’t need to worry about the implementation details.
Second, deploying to Connect is the same as other Python content. Connect recognizes it as an MCP server, applies the access controls you setup, and provides a URL your team can use with their AI clients.
With access to the weather MCP server, Positron Assistant can now use the `get_weather` tool and answer our question.
What’s next
In practice, MCP servers connect to real tools and data. Those examples require credential management and robust security. In the second part of this series, we’ll walk through an example that fetches data from Databricks using Connect’s built in OAuth integrations. We’ll go deeper into the built in access controls and observability in Connect that support hosting MCPs in production.