content
large_stringlengths
3
20.5k
url
large_stringlengths
54
193
branch
large_stringclasses
4 values
source
large_stringclasses
42 values
embeddings
listlengths
384
384
score
float64
-0.21
0.65
import { VersionBadge } from "/snippets/version-badge.mdx" Google's Gemini API includes built-in support for MCP servers in their Python and JavaScript SDKs, allowing you to connect directly to MCP servers and use their tools seamlessly with Gemini models. ## Gemini Python SDK Google's [Gemini Python SDK](https://ai.go...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/gemini.mdx
main
model-context-protocol-fastmcp
[ -0.138987734913826, -0.05415216460824013, 0.04691895842552185, -0.045630890876054764, 0.012022418901324272, -0.040434032678604126, -0.022475697100162506, -0.0118084866553545, -0.05989345535635948, -0.023000439628958702, -0.03898222744464874, 0.04517567157745361, 0.060417987406253815, -0.07...
0.01317
import { VersionBadge } from "/snippets/version-badge.mdx" Install auth stack to your FastMCP server with [Scalekit](https://scalekit.com) using the [Remote OAuth](/servers/auth/remote-oauth) pattern: Scalekit handles user authentication, and the MCP server validates issued tokens. ### Prerequisites Before you begin 1....
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/scalekit.mdx
main
model-context-protocol-fastmcp
[ -0.026349801570177078, 0.009261632338166237, 0.028078531846404076, -0.03414227440953255, 0.04076626896858215, -0.021702080965042114, -0.06330598890781403, 0.00414083618670702, -0.032477039843797684, -0.0011507674353197217, 0.05353297293186188, -0.0728173479437828, 0.07515708357095718, -0.0...
-0.063596
verification (already verified by provider) claims = jwt.decode(token, options={"verify\_signature": False}) return claims return {"error": "No token found"} ```
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/scalekit.mdx
main
model-context-protocol-fastmcp
[ -0.13484196364879608, 0.04847356304526329, 0.040463849902153015, 0.016705691814422607, 0.02972421981394291, -0.07199054211378098, 0.045602358877658844, 0.009409180842339993, 0.0009819489205256104, -0.050170741975307465, 0.00861804187297821, -0.060441240668296814, 0.04896050691604614, 0.016...
0.006533
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using WorkOS's \*\*AuthKit\*\*, a complete authentication and user management solution. This integration uses the [\*\*Remote OAuth\*\*](/servers/auth/remote-oauth) pattern, where AuthKit handles user login...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/authkit.mdx
main
model-context-protocol-fastmcp
[ -0.07456497848033905, 0.06672805547714233, -0.015820005908608437, -0.07846801728010178, 0.0300047118216753, -0.042077384889125824, 0.0051770685240626335, -0.027792535722255707, -0.02477053366601467, -0.03053506836295128, 0.046132754534482956, -0.04824914410710335, 0.07311499863862991, 0.02...
0.047549
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*Supabase Auth\*\*. This integration uses the [\*\*Remote OAuth\*\*](/servers/auth/remote-oauth) pattern, where Supabase handles user authentication and your FastMCP server validates the tokens. ##...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/supabase.mdx
main
model-context-protocol-fastmcp
[ -0.04696798324584961, 0.02635071985423565, -0.007982127368450165, -0.04729297012090683, 0.03804650157690048, 0.03318595513701439, -0.060580234974622726, -0.01869683712720871, -0.03020234778523445, -0.03593217208981514, 0.0580209419131279, -0.034252822399139404, 0.1228460967540741, -0.05056...
-0.025099
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*GitHub OAuth\*\*. Since GitHub doesn't support Dynamic Client Registration, this integration uses the [\*\*OAuth Proxy\*\*](/servers/auth/oauth-proxy) pattern to bridge GitHub's traditional OAuth ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/github.mdx
main
model-context-protocol-fastmcp
[ -0.05550466105341911, -0.002512982813641429, 0.00901913270354271, -0.04197109863162041, 0.00767518812790513, -0.0034207699354737997, -0.028286390006542206, -0.002182002877816558, -0.00245660706423223, -0.03973076492547989, 0.03603949025273323, -0.011447342112660408, 0.13119088113307953, -0...
-0.064898
tokens locally, so you won't need to re-authenticate for subsequent runs unless the token expires or you explicitly clear the cache. ## Production Configuration For production deployments with persistent token management across server restarts, configure `jwt\_signing\_key` and `client\_storage`: ```python server.py im...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/github.mdx
main
model-context-protocol-fastmcp
[ -0.08281686156988144, -0.016286306083202362, -0.06303996592760086, 0.02950943075120449, 0.0037791836075484753, -0.0673174187541008, -0.004081031307578087, 0.052467215806245804, 0.026447277516126633, -0.022262010723352432, 0.03476148471236229, 0.019011080265045166, 0.02302900329232216, -0.0...
0.068558
import { VersionBadge } from "/snippets/version-badge.mdx" import { LocalFocusTip } from "/snippets/local-focus.mdx" [Claude Desktop](https://www.claude.com/download) supports MCP servers through local STDIO connections and remote servers (beta), allowing you to extend Claude's capabilities with custom tools, resources...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/claude-desktop.mdx
main
model-context-protocol-fastmcp
[ -0.01923266239464283, -0.055515263229608536, -0.02652941271662712, -0.07133156061172485, -0.0033829230815172195, 0.05087732896208763, -0.043554991483688354, 0.03031095489859581, -0.05264437571167946, -0.005942150484770536, 0.004628670401871204, 0.011157024651765823, 0.0549137145280838, -0....
-0.008077
with. This is particularly useful when your server requires a specific Python version: ```bash fastmcp install claude-desktop server.py --python 3.11 ``` \*\*Project directory\*\*: Use `--project` to run your server within a specific project directory. This ensures that `uv` will discover all `pyproject.toml`, `uv.toml...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/claude-desktop.mdx
main
model-context-protocol-fastmcp
[ -0.024227488785982132, 0.01232299953699112, -0.016855880618095398, -0.07406832277774811, 0.014511912129819393, -0.0818188413977623, -0.043290045112371445, 0.036129940301179886, 0.01914934441447258, -0.020701054483652115, 0.046701911836862564, -0.006605255417525768, 0.036568593233823776, 0....
-0.10349
"your-api-key", "DEBUG": "true" } } } } ``` Claude Desktop runs servers in a completely isolated environment with no access to your shell environment or locally installed applications. You must explicitly pass any environment variables your server needs. ## Remote Servers Users on Claude Pro, Max, Team, and Enterprise ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/claude-desktop.mdx
main
model-context-protocol-fastmcp
[ -0.02184869535267353, 0.010440529324114323, -0.02409624122083187, -0.04568329080939293, -0.08050885051488876, -0.054911717772483826, -0.047545235604047775, 0.07206758856773376, -0.021834975108504295, 0.00849889311939478, 0.00819072313606739, -0.015999428927898407, 0.061831727623939514, -0....
-0.068111
import { VersionBadge } from "/snippets/version-badge.mdx" ## Responses API OpenAI's [Responses API](https://platform.openai.com/docs/api-reference/responses) supports [MCP servers](https://platform.openai.com/docs/guides/tools-remote-mcp) as remote tool sources, allowing you to extend AI capabilities with custom funct...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/openai.mdx
main
model-context-protocol-fastmcp
[ -0.07636682689189911, -0.029720652848482132, 0.006205146200954914, 0.02466217800974846, 0.05629871413111687, -0.05093957856297493, -0.01861513778567314, -0.021153118461370468, 0.0343167670071125, 0.015359939076006413, -0.007924310863018036, -0.009896091185510159, 0.06151333078742027, -0.02...
0.111612
to sign and verify tokens. ```python from fastmcp.server.auth.providers.jwt import RSAKeyPair key\_pair = RSAKeyPair.generate() access\_token = key\_pair.create\_token(audience="dice-server") ``` FastMCP's `RSAKeyPair` utility is for development and testing only. Next, we'll create a `JWTVerifier` to authenticate the s...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/openai.mdx
main
model-context-protocol-fastmcp
[ -0.09140327572822571, 0.00476790638640523, -0.03815216198563576, -0.02258990705013275, -0.02966357208788395, -0.034683603793382645, 0.020210877060890198, 0.03220805525779724, 0.03007056750357151, -0.08622447401285172, 0.013768887147307396, -0.02326904609799385, 0.08204620331525803, -0.0599...
-0.033835
import { VersionBadge } from "/snippets/version-badge.mdx"; This guide shows you how to secure your FastMCP server using [\*\*Descope\*\*](https://www.descope.com), a complete authentication and user management solution. This integration uses the [\*\*Remote OAuth\*\*](/servers/auth/remote-oauth) pattern, where Descope...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/descope.mdx
main
model-context-protocol-fastmcp
[ -0.08873801678419113, 0.03244127705693245, 0.003376659471541643, -0.0731145367026329, 0.012568086385726929, -0.009474363178014755, -0.020583176985383034, -0.019192513078451157, -0.006741922348737717, -0.03499244898557663, 0.05012563243508339, -0.03781098499894142, 0.10998553037643433, -0.0...
-0.037206
Add \*\*policy-based authorization\*\* to your FastMCP servers with one-line code addition with the \*\*[Eunomia][eunomia-github] authorization middleware\*\*. Control which tools, resources and prompts MCP clients can view and execute on your server. Define dynamic JSON-based policies and obtain a comprehensive audit ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/eunomia-authorization.mdx
main
model-context-protocol-fastmcp
[ -0.060922592878341675, 0.023448802530765533, -0.008539176546037197, -0.03349727764725685, 0.0023076559882611036, -0.05245572328567505, 0.05124901607632637, -0.010207177139818668, -0.004391294438391924, 0.03566068410873413, 0.01732858084142208, -0.041227780282497406, 0.07078025490045547, -0...
0.150619
import { VersionBadge } from "/snippets/version-badge.mdx" import { LocalFocusTip } from "/snippets/local-focus.mdx" [Cursor](https://www.cursor.com/) supports MCP servers through multiple transport methods including STDIO, SSE, and Streamable HTTP, allowing you to extend Cursor's AI assistant with custom tools, resour...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/cursor.mdx
main
model-context-protocol-fastmcp
[ -0.09088379889726639, -0.06232322379946709, 0.023218220099806786, -0.0712810605764389, -0.030856870114803314, -0.04222556948661804, 0.017056353390216827, -0.02785651572048664, -0.02235586568713188, -0.013501262292265892, 0.03966723009943962, -0.012166204862296581, 0.09229016304016113, -0.0...
-0.001859
fastmcp install cursor server.py --project /path/to/my-project ``` #### Environment Variables Cursor runs servers in a completely isolated environment with no access to your shell environment or locally installed applications. You must explicitly pass any environment variables your server needs. If your server needs en...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/cursor.mdx
main
model-context-protocol-fastmcp
[ -0.05315084010362625, -0.0020134001970291138, 0.02616514079272747, -0.07663273811340332, -0.012743981555104256, -0.07043096423149109, -0.029425833374261856, 0.032207589596509933, -0.0393495075404644, 0.006485545076429844, 0.04080424830317497, -0.0629747286438942, 0.07860344648361206, 0.009...
-0.090379
The 6 was a nice high roll there! The AI assistant can now access all the tools, resources, and prompts you've defined in your FastMCP server.
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/cursor.mdx
main
model-context-protocol-fastmcp
[ -0.09066808223724365, -0.04017195105552673, -0.015796508640050888, -0.015218187123537064, 0.01972457952797413, 0.05013938620686531, -0.03403729945421219, -0.026305852457880974, -0.017523784190416336, 0.01090754009783268, 0.03311767429113388, 0.01971268467605114, -0.02095155231654644, -0.09...
0.122434
import { VersionBadge } from '/snippets/version-badge.mdx' FastMCP provides two powerful ways to integrate with FastAPI applications: 1. \*\*[Generate an MCP server FROM your FastAPI app](#generating-an-mcp-server)\*\* - Convert existing API endpoints into MCP tools 2. \*\*[Mount an MCP server INTO your FastAPI app](#m...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.05242941156029701, 0.006570523604750633, 0.03344094380736351, -0.027974093332886696, 0.06628185510635376, -0.07950600236654282, -0.0827375277876854, -0.038775503635406494, -0.02242644503712654, -0.06219547986984253, 0.01814279332756996, -0.05553208291530609, 0.0682782456278801, -0.07410...
0.042261
defined from fastmcp import FastMCP # Convert to MCP server mcp = FastMCP.from\_fastapi(app=app) if \_\_name\_\_ == "\_\_main\_\_": mcp.run() ``` ### Adding Components Your converted MCP server is a full FastMCP instance, meaning you can add new tools, resources, and other components to it just like you would with any ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.03367381542921066, -0.02833622321486473, -0.030728457495570183, -0.014187870547175407, -0.04047688469290733, -0.011136455461382866, 0.04454577714204788, 0.062146324664354324, -0.03611813858151436, -0.06989120692014694, 0.05573437735438347, -0.051942553371191025, 0.09830285608768463, -0....
-0.021397
MCP server, you can use the `http\_app` method on your FastMCP instance. This will return an ASGI application that can be mounted to your FastAPI application. ```python {23-30} from fastmcp import FastMCP from fastapi import FastAPI # Create MCP server mcp = FastMCP("Analytics Tools") @mcp.tool def analyze\_pricing(cat...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.06549408286809921, 0.04682306945323944, -0.09246402233839035, 0.06599204242229462, -0.04867894947528839, -0.07235349714756012, 0.019883448258042336, 0.022827142849564552, 0.03607410192489624, -0.04138946905732155, 0.05041772872209549, -0.11276988685131073, 0.049643490463495255, -0.05175...
0.020116
yield print("Shutting down the app...") # Create MCP server mcp = FastMCP("Tools") mcp\_app = mcp.http\_app(path="/") # Combine both lifespans app = FastAPI(lifespan=combine\_lifespans(app\_lifespan, mcp\_app.lifespan)) app.mount("/mcp", mcp\_app) # MCP endpoint at /mcp ``` `combine\_lifespans` enters lifespans in orde...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.05928734689950943, 0.04402221739292145, -0.020689327269792557, 0.01892530545592308, -0.030949613079428673, -0.1527830958366394, -0.11511196941137314, 0.0698619857430458, -0.05791165307164192, -0.02059226855635643, 0.06805048882961273, -0.04266517609357834, 0.07728146761655807, -0.062469...
0.072003
import { VersionBadge } from "/snippets/version-badge.mdx" Secure your FastMCP server with WorkOS Connect authentication. This integration uses the OAuth Proxy pattern to handle authentication through WorkOS Connect while maintaining compatibility with MCP clients. This guide covers WorkOS Connect applications. For Dyn...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/workos.mdx
main
model-context-protocol-fastmcp
[ -0.090369313955307, 0.04739789664745331, 0.007424010895192623, -0.056651145219802856, 0.015076203271746635, -0.0444902703166008, -0.0265334639698267, 0.013621486723423004, -0.035430364310741425, -0.03478461503982544, 0.02915283851325512, -0.03733133524656296, 0.049122508615255356, 0.012340...
0.031612
variables and use a persistent storage backend like Redis for distributed deployments. For complete details on these parameters, see the [OAuth Proxy documentation](/servers/auth/oauth-proxy#configuration-parameters). ## Configuration Options WorkOS OAuth application client ID WorkOS OAuth application client secret You...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/workos.mdx
main
model-context-protocol-fastmcp
[ -0.01890292763710022, 0.07408112287521362, -0.03613676130771637, -0.01639666222035885, -0.03584904968738556, -0.08147110044956207, -0.021956786513328552, 0.02090415358543396, 0.03844435513019562, -0.04384119436144829, 0.026057342067360878, 0.020378023386001587, 0.06846030056476593, -0.0490...
0.003067
[ChatGPT](https://chatgpt.com/) supports MCP servers through remote HTTP connections in two modes: \*\*Chat mode\*\* for interactive conversations and \*\*Deep Research mode\*\* for comprehensive information retrieval. \*\*Developer Mode Required for Chat Mode\*\*: To use MCP servers in regular ChatGPT conversations, y...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/chatgpt.mdx
main
model-context-protocol-fastmcp
[ -0.07844896614551544, -0.07255329936742783, 0.03519365191459656, 0.03373906388878822, -0.023782048374414444, -0.13556289672851562, 0.027272721752524376, -0.013280906714498997, 0.0189556572586298, -0.01694733276963234, 0.015591083094477654, 0.023794572800397873, -0.0015690164873376489, 0.00...
0.130694
"date": "2024"} } ``` ### Using Deep Research 1. Ensure your server is added to ChatGPT's connectors (same as Chat mode) 2. Start a new chat 3. Click \*\*+\*\* → \*\*Deep Research\*\* 4. Select your MCP server as a source 5. Ask research questions ChatGPT will use your `search` and `fetch` tools to find and cite releva...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/chatgpt.mdx
main
model-context-protocol-fastmcp
[ -0.0636451244354248, -0.029987294226884842, 0.10169930011034012, 0.019520852714776993, -0.00022898465977050364, 0.04081546142697334, -0.01613527350127697, -0.00040249695302918553, 0.00237811217084527, 0.04297532141208649, -0.011124219745397568, -0.040126316249370575, -0.06910546869039536, ...
0.050082
import { VersionBadge } from "/snippets/version-badge.mdx" import { LocalFocusTip } from "/snippets/local-focus.mdx" [Claude Code](https://docs.anthropic.com/en/docs/claude-code) supports MCP servers through multiple transport methods including STDIO, SSE, and HTTP, allowing you to extend Claude's capabilities with cus...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/claude-code.mdx
main
model-context-protocol-fastmcp
[ -0.03935456648468971, -0.040051043033599854, -0.0029668514616787434, -0.042632296681404114, -0.03666813671588898, -0.05232354998588562, 0.014144162647426128, -0.019411234185099602, -0.022287601605057716, 0.007603534497320652, 0.056184716522693634, 0.015520821325480938, 0.08260297030210495, ...
-0.005655
control over the configuration, you can manually use Claude Code's built-in MCP management commands. This gives you direct control over how your server is launched: ```bash # Add a server with custom configuration claude mcp add dice-roller -- uv run --with fastmcp fastmcp run server.py # Add with environment variables...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/claude-code.mdx
main
model-context-protocol-fastmcp
[ -0.04442291706800461, -0.018288884311914444, -0.01944267936050892, -0.013729396276175976, -0.04518651217222214, -0.056654445827007294, -0.056422311812639236, 0.05230644717812538, -0.063860684633255, 0.01693475805222988, 0.02433583326637745, -0.031196510419249535, 0.06629674136638641, -0.02...
-0.04439
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*Google OAuth\*\*. Since Google doesn't support Dynamic Client Registration, this integration uses the [\*\*OAuth Proxy\*\*](/servers/auth/oauth-proxy) pattern to bridge Google's traditional OAuth ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/google.mdx
main
model-context-protocol-fastmcp
[ -0.11271131038665771, 0.019836511462926865, 0.08382914960384369, -0.07564549893140793, -0.007928302511572838, 0.0035793341230601072, 0.01476838905364275, -0.042286843061447144, -0.031794473528862, -0.025139009580016136, 0.007724348455667496, -0.0423923060297966, 0.11332210153341293, -0.068...
-0.123463
the protected tool result = await client.call\_tool("get\_user\_info") print(f"Google user: {result['email']}") print(f"Name: {result['name']}") if \_\_name\_\_ == "\_\_main\_\_": asyncio.run(main()) ``` When you run the client for the first time: 1. Your browser will open to Google's authorization page 2. Sign in with...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/google.mdx
main
model-context-protocol-fastmcp
[ -0.11107103526592255, 0.044189080595970154, -0.020926157012581825, 0.032166488468647, -0.0609949566423893, -0.11627961695194244, 0.016357971355319023, 0.0292530320584774, -0.049075011163949966, -0.046408891677856445, 0.008927005343139172, 0.022665591910481453, 0.020899759605526924, -0.0788...
0.020738
import { VersionBadge } from '/snippets/version-badge.mdx' FastMCP can automatically generate an MCP server from any OpenAPI specification, allowing AI models to interact with existing APIs through the MCP protocol. Instead of manually creating tools and resources, you provide an OpenAPI spec and FastMCP intelligently ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.07989415526390076, -0.00875937007367611, 0.04791887477040291, -0.01722894236445427, 0.04936408996582031, -0.055227864533662796, -0.09956934303045273, -0.015146570280194283, -0.020481973886489868, -0.02700735628604889, -0.04010893031954765, -0.050277866423130035, 0.08175202459096909, -0....
0.081504
routes will be assigned to the first matching custom map. For example, prior to FastMCP 2.8.0, GET requests were automatically mapped to `Resource` and `ResourceTemplate` components based on whether they had path parameters. (This was changed solely for client compatibility reasons.) You can restore this behavior by pr...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.0277668796479702, 0.025027617812156677, 0.06662960350513458, 0.0659383088350296, -0.055204130709171295, -0.02924480475485325, -0.0239370446652174, 0.0012010583886876702, -0.04406636208295822, -0.03671107068657875, 0.0021684393286705017, -0.04536476731300354, 0.008280683308839798, 0.0202...
0.002674
POST elif route.path.startswith("/users/") and route.method == "POST": return MCPType.RESOURCE\_TEMPLATE # Use defaults for all other routes return None mcp = FastMCP.from\_openapi( openapi\_spec=spec, client=client, route\_map\_fn=custom\_route\_mapper, ) ``` ## Customization ### Component Names FastMCP automatically ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.0019716094247996807, 0.004825567826628685, -0.003940210212022066, 0.05797803774476051, -0.03542688488960266, -0.042866650968790054, -0.008776364848017693, 0.048916008323431015, -0.04923278093338013, -0.08211654424667358, 0.024225641041994095, -0.06036350131034851, 0.019338877871632576, ...
0.053771
provide a `mcp\_component\_fn` when creating the MCP server. After each MCP component has been created, this function is called on it and has the opportunity to modify it in-place. Your `mcp\_component\_fn` is expected to modify the component in-place, not to return a new component. The result of the function is ignore...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.0050487639382481575, -0.002145691541954875, 0.04298699274659157, 0.06318522989749908, 0.03464420884847641, -0.04333727806806564, -0.016948146745562553, 0.02641788125038147, 0.011575629003345966, -0.008978068828582764, 0.03997690975666046, -0.017062434926629066, -0.013771302066743374, -0...
-0.015572
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*Azure OAuth\*\* (Microsoft Entra ID). Since Azure doesn't support Dynamic Client Registration, this integration uses the [\*\*OAuth Proxy\*\*](/servers/auth/oauth-proxy) pattern to bridge Azure's ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/azure.mdx
main
model-context-protocol-fastmcp
[ -0.0866280123591423, 0.04017341509461403, 0.02697484940290451, -0.02919568493962288, -0.02053009904921055, 0.042056821286678314, 0.012964551337063313, -0.06114858761429787, 0.012179999612271786, 0.02224491536617279, 0.02939552813768387, -0.03923341631889343, 0.11965718120336533, -0.0150484...
-0.055309
- \*\*Client Secret\*\*: The value you copied in the previous step Store these credentials securely. Never commit them to version control. Use environment variables or a secrets manager in production. ### Step 2: FastMCP Configuration Create your FastMCP server using the `AzureProvider`, which handles Azure's OAuth flo...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/azure.mdx
main
model-context-protocol-fastmcp
[ -0.08401471376419067, 0.06605208665132523, -0.027452383190393448, 0.002714637666940689, -0.01500382088124752, 0.006417862139642239, -0.006349239964038134, -0.01952170766890049, 0.06554162502288818, 0.0685032457113266, 0.05379704013466835, -0.026683203876018524, 0.10261356085538864, 0.01146...
-0.138963
run server.py --transport http --port 8000 ``` Your server is now running and protected by Azure OAuth authentication. ### Testing with a Client Create a test client that authenticates with your Azure-protected server: ```python test\_client.py from fastmcp import Client import asyncio async def main(): # The client wi...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/azure.mdx
main
model-context-protocol-fastmcp
[ -0.06189395859837532, 0.039261866360902786, -0.055757246911525726, 0.051359400153160095, -0.03006214275956154, -0.07031649351119995, -0.007095934357494116, -0.04399511590600014, 0.02541111409664154, 0.012998176738619804, 0.042896997183561325, -0.0028697631787508726, 0.030742352828383446, 0...
-0.068575
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*Auth0 OAuth\*\*. While Auth0 does have support for Dynamic Client Registration, it is not enabled by default so this integration uses the [\*\*OIDC Proxy\*\*](/servers/auth/oidc-proxy) pattern to ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/auth0.mdx
main
model-context-protocol-fastmcp
[ -0.09376100450754166, 0.04966512322425842, 0.021096086129546165, -0.046366333961486816, -0.004969877190887928, -0.001051973202265799, 0.003307354636490345, -0.0032296108547598124, -0.027024006471037865, -0.048126447945833206, 0.018671641126275063, -0.03536688908934593, 0.11342547833919525, ...
-0.057224
protected tool result = await client.call\_tool("get\_token\_info") print(f"Auth0 audience: {result['audience']}") if \_\_name\_\_ == "\_\_main\_\_": asyncio.run(main()) ``` When you run the client for the first time: 1. Your browser will open to Auth0's authorization page 2. After you authorize the app, you'll be redi...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/auth0.mdx
main
model-context-protocol-fastmcp
[ -0.04930519312620163, 0.012690591625869274, -0.08878897875547409, 0.024285640567541122, -0.02640984207391739, -0.09534844756126404, -0.015425414778292179, 0.04835815727710724, -0.023844461888074875, -0.0425679050385952, 0.01436694711446762, -0.04353103041648865, 0.05598831921815872, -0.031...
0.08512
import { VersionBadge } from "/snippets/version-badge.mdx" FastMCP can generate standard MCP JSON configuration files that work with any MCP-compatible client including Claude Desktop, VS Code, Cursor, and other applications that support the Model Context Protocol. ## MCP JSON Configuration Standard The MCP JSON config...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/mcp-json-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.05931396782398224, -0.0220728050917387, 0.03132294490933418, -0.0501914918422699, 0.0024141997564584017, -0.02332661673426628, -0.06638530641794205, 0.010512051172554493, -0.05715883523225784, -0.0018796315416693687, 0.03145887702703476, -0.006780501455068588, 0.06723258644342422, 0.000...
0.016246
install mcp-json server.py --with pandas # Multiple packages fastmcp install mcp-json server.py --with pandas --with requests --with httpx # Editable local package fastmcp install mcp-json server.py --with-editable ./my-package # From requirements file fastmcp install mcp-json server.py --with-requirements requirements...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/mcp-json-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.01713387295603752, -0.016748346388339996, 0.0029002733062952757, -0.08876082301139832, 0.0052491445094347, -0.042183052748441696, -0.08894822001457214, 0.01612974889576435, -0.06301702558994293, -0.010885286144912243, 0.07108675688505173, -0.03557838127017021, -0.032624952495098114, 0.0...
-0.10537
executable to run (always `uv` for FastMCP servers) - `args`: Command-line arguments including dependencies and server path - `env`: Environment variables (only included if specified) \*\*All file paths in the generated configuration are absolute paths\*\*. This ensures the configuration works regardless of the working...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/mcp-json-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.037034351378679276, 0.030410347506403923, 0.029729818925261497, -0.04068863391876221, 0.029811764135956764, -0.021097905933856964, 0.009911278262734413, 0.014383172616362572, -0.028789101168513298, -0.01618938520550728, 0.07539122551679611, -0.09345220029354095, 0.010611886158585548, 0....
-0.044547
import { VersionBadge } from "/snippets/version-badge.mdx" Anthropic's [Messages API](https://docs.anthropic.com/en/api/messages) supports MCP servers as remote tool sources. This tutorial will show you how to create a FastMCP server and deploy it to a public URL, then how to call it from the Messages API. Currently, t...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/anthropic.mdx
main
model-context-protocol-fastmcp
[ -0.027585159987211227, -0.01576322317123413, -0.0024411261547356844, -0.007037808652967215, 0.030695060268044472, -0.04642842337489128, -0.00715969642624259, -0.00466183852404356, -0.015022801235318184, 0.0203964002430439, 0.027218518778681755, -0.01655544340610504, 0.06391260772943497, -0...
0.039032
server while still allowing Anthropic to access it. ### Server Authentication The simplest way to add authentication to the server is to use a bearer token scheme. For this example, we'll quickly generate our own tokens with FastMCP's `RSAKeyPair` utility, but this may not be appropriate for production use. For more de...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/anthropic.mdx
main
model-context-protocol-fastmcp
[ -0.0685967206954956, 0.0290133748203516, -0.051158566027879715, -0.021369175985455513, -0.024320844560861588, -0.0318513885140419, 0.013641154393553734, 0.03909284248948097, 0.03402222692966461, -0.03211580589413643, 0.008296906016767025, -0.009806535206735134, 0.03743989020586014, -0.0395...
-0.012527
import { VersionBadge } from "/snippets/version-badge.mdx" import { LocalFocusTip } from "/snippets/local-focus.mdx" [Gemini CLI](https://geminicli.com/) supports MCP servers through multiple transport methods including STDIO, SSE, and HTTP, allowing you to extend Gemini's capabilities with custom tools, resources, and...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/gemini-cli.mdx
main
model-context-protocol-fastmcp
[ -0.062487199902534485, -0.02855508029460907, -0.02080462872982025, -0.07358071208000183, -0.03190361335873604, -0.05671520158648491, 0.023371977731585503, -0.013294026255607605, -0.03524656593799591, -0.04020392522215843, 0.025019869208335876, 0.052246615290641785, 0.05577578395605087, -0....
-0.01946
use Gemini CLI's built-in MCP management commands. This gives you direct control over how your server is launched: ```bash # Add a server with custom configuration gemini mcp add dice-roller uv -- run --with fastmcp fastmcp run server.py # Add with environment variables gemini mcp add weather-server -e API\_KEY=secret ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/gemini-cli.mdx
main
model-context-protocol-fastmcp
[ -0.06235929951071739, -0.0075197964906692505, 0.008128142915666103, -0.03913788124918938, -0.038658756762742996, -0.08102557808160782, -0.04441104084253311, 0.0518377348780632, -0.07598526030778885, 0.004954992327839136, -0.006978985853493214, -0.0041045849211514, 0.04956752434372902, 0.00...
-0.05662
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*Discord OAuth\*\*. Since Discord doesn't support Dynamic Client Registration, this integration uses the [\*\*OAuth Proxy\*\*](/servers/auth/oauth-proxy) pattern to bridge Discord's traditional OAu...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/discord.mdx
main
model-context-protocol-fastmcp
[ -0.07356926798820496, 0.002378246746957302, 0.06408944725990295, -0.053513120859861374, 0.009097601287066936, 0.020737674087285995, 0.020074136555194855, 0.001926229684613645, -0.005578635260462761, -0.03439944237470627, 0.019336700439453125, -0.03933607041835785, 0.09155010432004929, -0.0...
-0.031192
restarts, configure `jwt\_signing\_key` and `client\_storage`: ```python server.py import os from fastmcp import FastMCP from fastmcp.server.auth.providers.discord import DiscordProvider from key\_value.aio.stores.redis import RedisStore from key\_value.aio.wrappers.encryption import FernetEncryptionWrapper from crypto...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/discord.mdx
main
model-context-protocol-fastmcp
[ -0.061426084488630295, -0.029072020202875137, -0.01575823500752449, 0.00734232971444726, 0.0169681366533041, -0.06572598218917847, 0.008736667223274708, 0.020040687173604965, 0.06137070432305336, -0.03428502008318901, 0.022288832813501358, -0.035380441695451736, 0.007114009466022253, 0.008...
0.058755
Add \*\*policy-based authorization\*\* to your FastMCP servers with one-line code addition with the \*\*[Permit.io][permit-github] authorization middleware\*\*. Control which tools, resources and prompts MCP clients can view and execute on your server. Define dynamic policies using Permit.io's powerful RBAC, ABAC, and ...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/permit.mdx
main
model-context-protocol-fastmcp
[ -0.04950364679098129, 0.002910463372245431, 0.008594529703259468, -0.006132316309958696, 0.061328038573265076, -0.04671787470579147, 0.03444542735815048, -0.03543761745095253, -0.026357850059866905, 0.0555938258767128, 0.012069997377693653, -0.02277158573269844, 0.06519144028425217, -0.006...
0.13065
`permit-fastmcp` package: ```bash # Using UV (recommended) uv add permit-fastmcp # Using pip pip install permit-fastmcp ``` Then create a FastMCP server and add the Permit.io middleware: ```python server.py from fastmcp import FastMCP from permit\_fastmcp.middleware.middleware import PermitMcpMiddleware mcp = FastMCP("...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/permit.mdx
main
model-context-protocol-fastmcp
[ -0.06305070966482162, 0.04802664741873741, -0.003827183274552226, -0.05420619994401932, -0.025193823501467705, -0.04274526983499527, 0.04461561143398285, 0.01230109017342329, -0.044382091611623764, 0.007953723892569542, 0.04031066223978996, -0.07636989653110504, 0.09025393426418304, 0.0559...
-0.021888
The middleware will now intercept all MCP requests and check them against your Permit.io policies. Requests include user identification through the configured identity mode and automatic mapping of MCP methods to authorization resources and actions. ## Advanced Configuration ### Environment Variables Configure the midd...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/permit.mdx
main
model-context-protocol-fastmcp
[ -0.06334678083658218, 0.001671645906753838, 0.05597968399524689, -0.06219692528247833, 0.15264762938022614, -0.06825004518032074, 0.02933407947421074, 0.007874388247728348, -0.09418362379074097, 0.04797826707363129, -0.030010558664798737, -0.051258835941553116, 0.042818766087293625, 0.0222...
0.140193
import { VersionBadge } from "/snippets/version-badge.mdx" import { LocalFocusTip } from "/snippets/local-focus.mdx" [Goose](https://block.github.io/goose/) is an open-source AI agent from Block that supports MCP servers as extensions. FastMCP can install your server directly into Goose using its deeplink protocol — on...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/goose.mdx
main
model-context-protocol-fastmcp
[ -0.071774423122406, -0.08237367123365402, -0.002094205003231764, -0.04155963659286499, -0.015535992570221424, -0.06003335490822792, -0.04138932749629021, 0.0016324184834957123, 0.01071999128907919, -0.015994977205991745, 0.027250897139310837, 0.0384691096842289, 0.035670988261699677, -0.04...
0.029726
300 ``` #### Environment Variables Environment variables can be specified in the `envs` field: ```yaml extensions: weather-server: name: Weather Server cmd: uvx args: [fastmcp, run, /path/to/weather\_server.py] enabled: true envs: API\_KEY: your-api-key DEBUG: "true" type: stdio timeout: 300 ``` You can also use `goose...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/goose.mdx
main
model-context-protocol-fastmcp
[ -0.05982068181037903, -0.025119071826338768, -0.0064344340935349464, 0.002252238802611828, -0.017862925305962563, -0.10646069794893265, -0.013419671915471554, 0.009694475680589676, -0.0016765189357101917, -0.029820706695318222, 0.03405855968594551, -0.06452850997447968, 0.03618311136960983, ...
-0.036451
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*AWS Cognito user pools\*\*. Since AWS Cognito doesn't support Dynamic Client Registration, this integration uses the [\*\*OAuth Proxy\*\*](/servers/auth/oauth-proxy) pattern to bridge AWS Cognito'...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/aws-cognito.mdx
main
model-context-protocol-fastmcp
[ -0.053435977548360825, 0.038789089769124985, -0.014670881442725658, -0.07466224581003189, 0.0027417242527008057, 0.022054776549339294, 0.012654551304876804, -0.04857904464006424, -0.005011004861444235, 0.0065270219929516315, 0.037667132914066315, -0.10110121965408325, 0.06271414458751678, ...
-0.031208
identifier must exactly match your `base\_url + mcp\_path`. For the default configuration with `base\_url="http://localhost:8000"` and `path="/mcp"`, use `http://localhost:8000/mcp`. After setup, you'll have: - \*\*User Pool ID\*\*: Format like `eu-central-1\_XXXXXXXXX` - \*\*Client ID\*\*: Your application's client id...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/aws-cognito.mdx
main
model-context-protocol-fastmcp
[ -0.04710047319531441, 0.020974861457943916, -0.02579946257174015, -0.06371928751468658, -0.028516540303826332, -0.02850538119673729, -0.01110608596354723, 0.00440021650865674, 0.028831837698817253, 0.041836731135845184, 0.02386457845568657, -0.12701429426670074, 0.06830272078514099, -0.016...
-0.024082
the [OAuth Proxy documentation](/servers/auth/oauth-proxy#configuration-parameters). ## Features ### JWT Token Validation The AWS Cognito provider includes robust JWT token validation: - \*\*Signature Verification\*\*: Validates tokens against AWS Cognito's public keys (JWKS) - \*\*Expiration Checking\*\*: Automaticall...
https://github.com/jlowin/fastmcp/blob/main//docs/integrations/aws-cognito.mdx
main
model-context-protocol-fastmcp
[ -0.09078705310821533, 0.03785005956888199, -0.026286235079169273, -0.011870861053466797, 0.03045940399169922, -0.06810667365789413, 0.04417812079191208, -0.03617962449789047, 0.01130767073482275, -0.02097412757575512, 0.02220418117940426, -0.05338292196393013, 0.058771297335624695, -0.0595...
0.017146
\*\*FastMCP is the standard framework for building MCP applications.\*\* The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) provides a standardized way to connect LLMs to tools and data, and FastMCP makes it production-ready with clean, Pythonic code: ```python {1} from fastmcp import FastMCP mcp = Fa...
https://github.com/jlowin/fastmcp/blob/main//docs/getting-started/welcome.mdx
main
model-context-protocol-fastmcp
[ -0.05943859741091728, -0.06803636252880096, -0.02658599242568016, -0.02589706890285015, -0.05040520429611206, -0.047178152948617935, -0.010834481567144394, 0.02868165634572506, -0.0051914118230342865, -0.0018638384062796831, 0.06995809823274612, -0.04563956707715988, 0.1156298890709877, -0...
0.085648
this page becomes `https://gofastmcp.com/getting-started/welcome.md`. You can also copy any page as markdown by pressing "Cmd+C" (or "Ctrl+C" on Windows) on your keyboard.
https://github.com/jlowin/fastmcp/blob/main//docs/getting-started/welcome.mdx
main
model-context-protocol-fastmcp
[ -0.061789222061634064, 0.038113873451948166, -0.004665642976760864, -0.012990527786314487, 0.0688895583152771, 0.06140323355793953, -0.06011578068137169, -0.06188850477337837, -0.01828276924788952, -0.0010276961838826537, 0.04732586815953255, 0.10257966071367264, 0.0518135130405426, -0.008...
-0.024609
Welcome! This guide will help you quickly set up FastMCP, run your first MCP server, and deploy a server to Prefect Horizon. If you haven't already installed FastMCP, follow the [installation instructions](/getting-started/installation). ## Create a FastMCP Server A FastMCP server is a collection of tools, resources, a...
https://github.com/jlowin/fastmcp/blob/main//docs/getting-started/quickstart.mdx
main
model-context-protocol-fastmcp
[ -0.05804179236292839, -0.046716317534446716, 0.004799433518201113, -0.00999437365680933, -0.07257232069969177, -0.08482612669467926, -0.05204181373119354, 0.036531608551740646, -0.05512696132063866, -0.0006662122323177755, 0.04984671622514725, -0.021656492725014687, 0.04514237865805626, -0...
0.042013
provides managed hosting, authentication, access control, and observability for MCP servers. Horizon is \*\*free for personal projects\*\* and offers enterprise governance for teams. To deploy your server, you'll need a [GitHub account](https://github.com). Once you have one, you can deploy your server in three steps: ...
https://github.com/jlowin/fastmcp/blob/main//docs/getting-started/quickstart.mdx
main
model-context-protocol-fastmcp
[ 0.01675690896809101, -0.06200656667351723, -0.0032321643084287643, -0.04977121576666832, -0.0052585480734705925, -0.07802611589431763, -0.08169196546077728, 0.02474006451666355, 0.014900422655045986, 0.04747581481933594, -0.012615030631422997, -0.009123072028160095, 0.014743425883352757, 0...
0.027461
## Install FastMCP We recommend using [uv](https://docs.astral.sh/uv/getting-started/installation/) to install and manage FastMCP. FastMCP 3.0 is currently in beta. Package managers won't install beta versions by default—you must explicitly request one (e.g., `>=3.0.0b1`). ```bash pip install "fastmcp>=3.0.0b1" ``` Or ...
https://github.com/jlowin/fastmcp/blob/main//docs/getting-started/installation.mdx
main
model-context-protocol-fastmcp
[ -0.02629334107041359, -0.0291402880102396, 0.057596828788518906, -0.017748815938830376, 0.022784143686294556, 0.0004627665621228516, -0.03914667293429375, 0.0053711021319031715, -0.03788270801305771, -0.005760770756751299, 0.025910930708050728, -0.06009766086935997, -0.020739924162626266, ...
-0.02812
import { VersionBadge } from "/snippets/version-badge.mdx"; STDIO transport is perfect for local development and desktop applications. But to unlock the full potential of MCP—centralized services, multi-client access, and network availability—you need remote HTTP deployment. This guide walks you through deploying your ...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ 0.005806921981275082, -0.01955162174999714, 0.023493608459830284, -0.08680209517478943, -0.02045101672410965, -0.007018705829977989, -0.07434887439012527, 0.02404419519007206, -0.05403222143650055, 0.019284140318632126, 0.012059430591762066, -0.029033679515123367, 0.05088772252202034, -0.0...
0.010805
By default, your MCP server is accessible at `/mcp/` on your domain. You can customize this path to fit your URL structure or avoid conflicts with existing endpoints. This is particularly useful when integrating MCP into an existing application or following specific API conventions. ```python # Option 1: With mcp.run()...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.0720977932214737, -0.044498100876808167, 0.0223538875579834, -0.020805099979043007, 0.00168619432952255, -0.09259023517370224, -0.10559988766908646, 0.04762157425284386, 0.0019655984360724688, -0.0034816234838217497, -0.0005853884504176676, 0.027972321957349777, 0.03624521195888519, -0....
-0.025622
use `allow\_origins=["\*"]` in production. Specify the exact origins of your browser-based clients. Using wildcards exposes your server to unauthorized access from any website. ### SSE Polling for Long-Running Operations This feature only applies to the \*\*StreamableHTTP transport\*\* (the default for `http\_app()`). ...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.07730252295732498, 0.003655225969851017, -0.03429001569747925, 0.048868682235479355, -0.0373426154255867, -0.10050376504659653, 0.0000340158621838782, -0.013243749737739563, 0.006814946886152029, -0.044590063393116, -0.027450310066342354, 0.014903226867318153, 0.028149351477622986, 0.02...
0.039806
be properly initialized. #### Nested Mounts You can create complex routing structures by nesting mounts: ```python from fastmcp import FastMCP from starlette.applications import Starlette from starlette.routing import Mount # Create your FastMCP server mcp = FastMCP("MyServer") # Create the ASGI app mcp\_app = mcp.http...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.09103785455226898, -0.04355952516198158, 0.00927741825580597, 0.03291929140686989, -0.06106478348374367, -0.1299385130405426, -0.05957622453570366, 0.06766824424266815, -0.048946406692266464, -0.019242122769355774, 0.06776659935712814, -0.02042665332555771, 0.04897092282772064, -0.03543...
0.048164
protocol: - `/authorize` - OAuth authorization endpoint - `/token` - Token exchange endpoint - `/auth/callback` - OAuth callback handler - `/mcp` - MCP protocol endpoint \*\*Discovery routes\*\* provide metadata for OAuth clients: - `/.well-known/oauth-authorization-server` - Authorization server metadata - `/.well-kno...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.03077894262969494, -0.04749932512640953, 0.06132172420620918, -0.00026699082809500396, -0.0015798464883118868, -0.11157798022031784, -0.0634707659482956, 0.05292142182588577, -0.031708016991615295, 0.011068802326917648, -0.0230655949562788, 0.013303585350513458, 0.028489049524068832, 0....
0.036069
auth=auth) @mcp.tool def analyze(data: str) -> dict: return {"result": f"Analyzed: {data}"} # Create MCP app mcp\_app = mcp.http\_app(path=MCP\_PATH) # Get discovery routes for root level well\_known\_routes = auth.get\_well\_known\_routes(mcp\_path=MCP\_PATH) # Assemble the application app = Starlette( routes=[ \*well...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.010938259772956371, 0.06468196213245392, -0.015546546317636967, 0.023733852431178093, 0.02038738876581192, -0.17143405973911285, -0.006922367960214615, 0.04701187089085579, -0.040078431367874146, -0.00031463796040043235, 0.06403713673353195, -0.0575331412255764, 0.030269388109445572, 0....
0.014842
to clients instead of forwarding upstream provider tokens. This maintains proper OAuth 2.0 token boundaries. \*\*Default Behavior (Development Only):\*\* By default, FastMCP automatically manages cryptographic keys: - \*\*Mac/Windows\*\*: Keys are generated and stored in your system keyring, surviving server restarts. ...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.08121977001428604, -0.023486023768782616, 0.05446290969848633, -0.0409710668027401, 0.01087136846035719, -0.04541844129562378, -0.003081409027799964, 0.041318975389003754, 0.045285917818546295, -0.017235662788152695, 0.05389288067817688, -0.0048049031756818295, 0.049640532582998276, -0....
0.055942
import { VersionBadge } from '/snippets/version-badge.mdx' FastMCP servers can be run in different ways depending on your needs. This guide focuses on running servers locally for development and testing. For production deployment to a URL, see the [HTTP Deployment](/deployment/http) guide. ## The `run()` Method Every F...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/running-server.mdx
main
model-context-protocol-fastmcp
[ -0.04679770767688751, 0.0005410125013440847, 0.009891824796795845, -0.02249356359243393, -0.011893928982317448, -0.06240193173289299, -0.06552588939666748, -0.0352945439517498, -0.0643470510840416, -0.033520832657814026, 0.05525048449635506, 0.02042601816356182, 0.09828843176364899, -0.048...
-0.069586
SSE Transport (Legacy) Server-Sent Events (SSE) transport was the original HTTP-based transport for MCP. While still supported for backward compatibility, it has limitations compared to the newer Streamable HTTP transport. SSE only supports server-to-client streaming, making it less efficient for bidirectional communic...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/running-server.mdx
main
model-context-protocol-fastmcp
[ -0.034386683255434036, -0.03610168397426605, 0.007414419203996658, 0.023392805829644203, -0.04483618587255478, -0.07700341194868088, -0.04394128918647766, 0.08261242508888245, -0.03573164716362953, -0.015235011465847492, -0.07674303650856018, -0.007293364964425564, -0.003212394192814827, 0...
0.101879
does not support auto-reload due to session limitations. Use HTTP transport instead if you need both network access and auto-reload. ### Async Usage FastMCP servers are built on async Python, but the framework provides both synchronous and asynchronous APIs to fit your application's needs. The `run()` method we've been...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/running-server.mdx
main
model-context-protocol-fastmcp
[ -0.06501339375972748, 0.009452844969928265, -0.01583275757730007, 0.0629606619477272, -0.12717115879058838, -0.06740931421518326, -0.029510008171200752, -0.01658945530653, -0.02812887541949749, -0.056246306747198105, -0.013340217061340809, 0.018675079569220543, 0.0011720909969881177, -0.01...
0.020914
[Prefect Horizon](https://www.prefect.io/horizon) is a platform for deploying and managing MCP servers. Built by the FastMCP team at [Prefect](https://www.prefect.io), Horizon provides managed hosting, authentication, access control, and a registry of MCP capabilities. Horizon includes a \*\*free personal tier for Fast...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/prefect-horizon.mdx
main
model-context-protocol-fastmcp
[ 0.007290421519428492, -0.012060856446623802, -0.02182963117957115, -0.06854763627052307, 0.04632595553994179, -0.038523685187101364, -0.010834850370883942, -0.020759493112564087, 0.05956970155239105, 0.060121241956949234, -0.03775511682033539, -0.010705167427659035, 0.03566964343190193, -0...
0.164279
so you can test changes before they go live. ## Testing Your Server Horizon provides two ways to verify your server is working before connecting external clients. ### Inspector The Inspector gives you a structured view of everything your server exposes—tools, resources, and prompts. You can click any tool, fill in the ...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/prefect-horizon.mdx
main
model-context-protocol-fastmcp
[ -0.039462752640247345, -0.04630874842405319, 0.0366988331079483, -0.010664108209311962, 0.00805103499442339, -0.09854196012020111, -0.035229649394750595, -0.03892376646399498, 0.04709417745471001, 0.04836145043373108, -0.019576560705900192, -0.02111678756773472, -0.07354480773210526, -0.00...
0.080267
import { VersionBadge } from "/snippets/version-badge.mdx" FastMCP supports declarative configuration through `fastmcp.json` files. This is the canonical and preferred way to configure FastMCP projects, providing a single source of truth for server settings, dependencies, and deployment options that replaces complex co...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/server-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.05678883567452431, 0.04244085028767586, 0.013446448370814323, -0.08198447525501251, 0.03140777349472046, -0.018232671543955803, -0.06788891553878784, -0.0036320944782346487, -0.023261046037077904, -0.06757824122905731, 0.04910632222890854, 0.027776487171649933, 0.0604514554142952, -0.02...
0.000132
`mcp`, `server`, or `app` \*\*Example:\*\* ```json "source": { "type": "filesystem", "path": "src/server.py", "entrypoint": "mcp" } ``` Note: File paths are resolved relative to the configuration file's location. \*\*Future Source Types\*\* Future releases will support additional source types: - \*\*Git repositories\*\...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/server-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.08908572047948837, -0.048047471791505814, 0.017633624374866486, 0.006328991148620844, 0.0044464245438575745, -0.10222548246383667, -0.06916215270757675, 0.06582919508218765, 0.0008135121897794306, 0.03270470350980759, 0.0061912741512060165, 0.023600826039910316, 0.04947283864021301, -0....
0.05412
number for HTTP transport. URL path for the MCP endpoint when using HTTP transport. Server logging verbosity. Options: - `"DEBUG"`: Detailed debugging information - `"INFO"`: General informational messages - `"WARNING"`: Warning messages - `"ERROR"`: Error messages only - `"CRITICAL"`: Critical errors only Environment ...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/server-configuration.mdx
main
model-context-protocol-fastmcp
[ 0.020929740741848946, -0.04095714911818504, -0.05733116343617439, 0.023609044030308723, -0.03676458075642586, -0.05087124556303024, 0.015138981863856316, 0.05960429087281227, 0.0038100627716630697, 0.025503549724817276, -0.05146811157464981, -0.008866687305271626, -0.03769814223051071, -0....
0.021306
run fastmcp.json --skip-source ``` \*\*When you already have the source:\*\* - You've previously cloned a git repository and don't need to re-fetch - You have a cached copy of a cloud-hosted server - You're in a CI/CD pipeline where source checkout is a separate step - You're iterating locally on already-downloaded cod...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/server-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.07021865993738174, -0.017290962859988213, 0.02182278409600258, -0.0012929548975080252, 0.03738640621304512, -0.08124610036611557, -0.0526689775288105, -0.039491456001996994, 0.0210234634578228, 0.023764800280332565, 0.11002086848020554, -0.021961720660328865, 0.029634995386004448, -0.10...
-0.106412
"source": { "path": "server.py", "entrypoint": "mcp" }, "deployment": { "transport": "http", "log\_level": "DEBUG" } } ``` \*\*prod.fastmcp.json\*\*: ```json { "$schema": "https://gofastmcp.com/public/schemas/fastmcp.json/v1.json", "source": { "path": "server.py", "entrypoint": "mcp" }, "environment": { "requirements":...
https://github.com/jlowin/fastmcp/blob/main//docs/deployment/server-configuration.mdx
main
model-context-protocol-fastmcp
[ -0.014473510906100273, 0.027951207011938095, -0.022812068462371826, -0.05454987287521362, 0.05341954901814461, -0.05534542351961136, -0.02562348172068596, 0.02825453318655491, -0.009542207233607769, -0.003727075643837452, 0.09926677495241165, -0.08910824358463287, 0.023693140596151352, 0.0...
-0.055315
You've built a powerful REST API, and now you want your LLM to be able to use it. Manually writing a wrapper function for every single endpoint is tedious, error-prone, and hard to maintain. This is where \*\*FastMCP\*\* shines. If your API has an OpenAPI (or Swagger) specification, FastMCP can automatically convert yo...
https://github.com/jlowin/fastmcp/blob/main//docs/tutorials/rest-api.mdx
main
model-context-protocol-fastmcp
[ -0.024709336459636688, -0.03489954024553299, 0.016149315983057022, -0.005340689793229103, -0.01208984199911356, -0.03131586313247681, -0.11730093508958817, 0.041040100157260895, -0.061338990926742554, 0.022948164492845535, -0.012868515215814114, -0.05577535554766655, 0.06865940243005753, -...
0.109255
python api\_server.py ``` Then, in another terminal, run the client: ```bash python api\_client.py ``` You should see a list of generated tools (`get\_users`, `get\_user\_by\_id`) and the result of calling the `get\_user\_by\_id` tool, which fetches data from the live JSONPlaceholder API. ![](/assets/images/tutorial-re...
https://github.com/jlowin/fastmcp/blob/main//docs/tutorials/rest-api.mdx
main
model-context-protocol-fastmcp
[ -0.05248037725687027, 0.03894644230604172, -0.01682472974061966, 0.01042888406664133, -0.026890819892287254, -0.0830707848072052, -0.015624302439391613, 0.035753123462200165, -0.03049125149846077, -0.030782543122768402, 0.024991650134325027, 0.045939862728118896, 0.05193803459405899, -0.01...
0.047659
So you want to build a Model Context Protocol (MCP) server in Python. The goal is to create a service that can provide tools and data to AI models like Claude, Gemini, or others that support the protocol. While the [MCP specification](https://modelcontextprotocol.io/specification/) is powerful, implementing it from scr...
https://github.com/jlowin/fastmcp/blob/main//docs/tutorials/create-mcp-server.mdx
main
model-context-protocol-fastmcp
[ -0.07321492582559586, -0.0333697572350502, -0.003843924030661583, 0.005192381329834461, -0.07036164402961731, -0.07807992398738861, -0.016776002943515778, 0.029269812628626823, -0.04862270876765251, -0.01884356141090393, -0.04070906713604927, 0.007867416366934776, 0.05017644166946411, -0.0...
0.132252
MCP Server") @mcp.tool def add(a: int, b: int) -> int: """Adds two integer numbers together.""" return a + b @mcp.resource("resource://config") def get\_config() -> dict: """Provides the application's configuration.""" return {"version": "1.0", "author": "MyTeam"} @mcp.resource("greetings://{name}") def personalized\_g...
https://github.com/jlowin/fastmcp/blob/main//docs/tutorials/create-mcp-server.mdx
main
model-context-protocol-fastmcp
[ -0.08402327448129654, 0.06588264554738998, 0.035610198974609375, 0.012119506485760212, -0.10635723173618317, -0.06369150429964066, 0.06930767744779587, 0.025383276864886284, 0.000606238900218159, -0.0852569192647934, -0.017099158838391304, -0.019595513120293617, 0.10997587442398071, -0.021...
0.048675
The Model Context Protocol (MCP) is an open standard designed to solve a fundamental problem in AI development: how can Large Language Models (LLMs) reliably and securely interact with external tools, data, and services? It's the \*\*bridge between the probabilistic, non-deterministic world of AI and the deterministic,...
https://github.com/jlowin/fastmcp/blob/main//docs/tutorials/mcp.mdx
main
model-context-protocol-fastmcp
[ -0.06676430255174637, -0.06035556644201279, 0.04411671310663223, -0.02895773947238922, 0.039173293858766556, -0.016467895358800888, -0.042370788753032684, 0.026535069569945335, 0.045362405478954315, -0.01896033249795437, -0.04815435782074928, -0.056112855672836304, 0.06059947609901428, 0.0...
0.274206
dict: """Returns the current operational status of the service.""" return {"status": "all systems normal"} ``` #### Resource Templates You can also create \*\*Resource Templates\*\* for dynamic data. A client could request `users://42/profile` to get the profile for a specific user. ```python from fastmcp import FastMC...
https://github.com/jlowin/fastmcp/blob/main//docs/tutorials/mcp.mdx
main
model-context-protocol-fastmcp
[ -0.038910675793886185, 0.061905842274427414, -0.03061450645327568, 0.02058812417089939, -0.056387972086668015, -0.09974107891321182, 0.1329231858253479, 0.08268451690673828, -0.04510919749736786, -0.06702225655317307, 0.02841925621032715, -0.0235909316688776, 0.09435894340276718, 0.0057501...
0.020735
import { YouTubeEmbed } from '/snippets/youtube-embed.mdx' ## Join the Community Connect with other FastMCP developers, share your projects, and discuss ideas. ## Featured Projects Discover exemplary MCP servers and implementations created by our community. These projects demonstrate best practices and innovative uses ...
https://github.com/jlowin/fastmcp/blob/main//docs/community/showcase.mdx
main
model-context-protocol-fastmcp
[ -0.08958044648170471, -0.0940052792429924, 0.01748536340892315, -0.04194101318717003, 0.007086039986461401, -0.02674064226448536, -0.034808456897735596, -0.01687413826584816, -0.055780041962862015, -0.007536677177995443, 0.00601954385638237, 0.03925374522805214, 0.046521466225385666, 0.003...
0.031842
import { VersionBadge } from '/snippets/version-badge.mdx' Tools are the core building blocks that allow your LLM to interact with external systems, execute code, and access data that isn't in its training data. In FastMCP, tools are Python functions exposed to LLMs through the MCP protocol. Tools in FastMCP transform ...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.059229686856269836, 0.02127411589026451, 0.004243445582687855, -0.03944733366370201, 0.03576663136482239, -0.06601358205080032, -0.025976596400141716, -0.022292889654636383, -0.03294986113905907, -0.039091117680072784, 0.007772992365062237, 0.02589586190879345, 0.11112925410270691, -0.0...
0.059946
the tool's domain of interaction is closed. Optional meta information about the tool. This data is passed through to the MCP client as the `meta` field of the client-side tool object and can be used for custom metadata, versioning, or other application-specific purposes. Execution timeout in seconds. If the tool takes ...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.04537725821137428, 0.020446674898266792, 0.0007583571714349091, 0.02532336860895157, -0.02088337391614914, -0.10753572732210159, -0.06544575095176697, 0.0023456248454749584, -0.008594395592808723, 0.01512276940047741, 0.04553312435746193, -0.04069703072309494, 0.019102761521935463, -0.0...
0.007949
Parameters that may be null/omitted | | Union types | `str \| int`, `Union[str, int]`| Parameters accepting multiple types | | Constrained types | `Literal["A", "B"]`, `Enum` | Parameters with specific allowed values | | Paths | `Path` | File system paths (auto-converted from strings) | | UUIDs | `UUID` | Universally u...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.03839133307337761, 0.031710460782051086, -0.04873697832226753, -0.026255503296852112, -0.057327017188072205, -0.061335980892181396, -0.001983178546652198, 0.044370654970407486, -0.05482181906700134, -0.03418285772204399, 0.037096843123435974, -0.07803773134946823, 0.11648761481046677, -...
-0.00943
use cases as it handles common LLM client behaviors gracefully while still providing strong type safety through Pydantic's validation. ### Parameter Metadata You can provide additional metadata about parameters in several ways: #### Simple String Descriptions For basic parameter descriptions, you can use a convenient s...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ 0.00452878512442112, 0.06613827496767044, 0.01592712104320526, -0.026309862732887268, 0.04899046942591667, -0.0807497501373291, 0.01740722917020321, 0.12363742291927338, -0.05846541002392769, -0.042212169617414474, -0.018042515963315964, -0.015464762225747108, 0.10191090404987335, 0.090626...
0.024679
\*\*MCP SDK content blocks\*\*: Sent as-is - \*\*A list of any of the above\*\*: Converts each item according to the above rules - \*\*`None`\*\*: Results in an empty response #### Media Helper Classes FastMCP provides helper classes for returning images, audio, and files. When you return one of these classes, either d...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.04444490000605583, -0.004049197770655155, 0.023212499916553497, -0.001063937321305275, 0.0923498347401619, -0.04714316129684448, -0.010300897061824799, 0.004483579192310572, 0.011374800466001034, -0.0555310919880867, 0.04474382475018501, -0.05500442907214165, 0.07103376090526581, 0.0063...
0.010466
"content": [ { "type": "text", "text": "8" } ] } ``` When you add a return annotation, such as `-> int`, FastMCP generates `structuredContent` by wrapping the primitive value in a `{"result": ...}` object, since JSON schemas require object-type roots for structured output: ```python Tool Definition @mcp.tool def calcul...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.061072904616594315, 0.06339442729949951, 0.04527047276496887, 0.046358443796634674, -0.03848715126514435, -0.012536967173218727, -0.01785779371857643, 0.019206050783395767, 0.02295202575623989, -0.03640430420637131, 0.04701627045869827, -0.05164413899183273, 0.027944330126047134, 0.0855...
0.03717
"""Tool with full control over output.""" return ToolResult( content=[TextContent(type="text", text="Human-readable summary")], structured\_content={"data": "value", "count": 42}, meta={"execution\_time\_ms": 145} ) ``` `ToolResult` accepts three fields: \*\*`content`\*\* - The traditional MCP content blocks that clien...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.01080351509153843, 0.026720579713582993, -0.03683413937687874, 0.10264987498521805, -0.04632383957505226, -0.02099466882646084, 0.020084265619516373, 0.10469990223646164, -0.0029767178930342197, -0.04045095667243004, 0.0328211709856987, -0.073409803211689, 0.09138806909322739, 0.0293642...
0.053846
will be converted to a generic message. ## Timeouts Tools can specify a `timeout` parameter to limit how long execution can take. When the timeout is exceeded, the client receives an MCP error and the tool stops processing. This protects your server from unexpectedly slow operations that could block resources or leave ...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.09871578961610794, 0.07105103135108948, -0.033147405833005905, 0.08096054941415787, -0.0035873213782906532, -0.12742459774017334, -0.08909403532743454, -0.04525187984108925, 0.04368673264980316, -0.03106934390962124, 0.05981070548295975, 0.0517505444586277, 0.029022784903645515, -0.1024...
0.052525
| :--- | :------ | :------ | | `title` | string | - | Display name for user interfaces | | `readOnlyHint` | boolean | false | Indicates if the tool only reads without making changes | | `destructiveHint` | boolean | true | For non-readonly tools, signals if changes are destructive | | `idempotentHint` | boolean | false...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.0851735919713974, 0.006874680984765291, 0.014641099609434605, 0.004212202969938517, 0.03458785265684128, -0.03810836002230644, 0.1203065738081932, 0.058418482542037964, 0.013916057534515858, -0.017134325578808784, 0.006450854707509279, -0.07605213671922684, 0.013188554905354977, 0.00166...
0.157209
mcp = FastMCP(name="ContextDemo") @mcp.tool async def process\_data(data\_uri: str, ctx: Context) -> dict: """Process data from a resource with progress reporting.""" await ctx.info(f"Processing data from {data\_uri}") # Read a resource resource = await ctx.read\_resource(data\_uri) data = resource[0].content if resour...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tools.mdx
main
model-context-protocol-fastmcp
[ -0.04654179885983467, 0.056842222809791565, -0.011657249182462692, 0.06002708896994591, -0.015532235614955425, -0.05576280131936073, 0.04797213152050972, 0.0617515966296196, -0.01317745354026556, -0.029317814856767654, 0.0005218716105446219, -0.05631869286298752, 0.03838001564145088, 0.011...
0.047343
import { VersionBadge } from "/snippets/version-badge.mdx" FastMCP uses pluggable storage backends for caching responses and managing OAuth state. By default, all storage is in-memory, which is perfect for development but doesn't persist across restarts. FastMCP includes support for multiple storage backends, and you c...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/storage-backends.mdx
main
model-context-protocol-fastmcp
[ -0.06527640670537949, 0.02189498208463192, -0.032683003693819046, -0.016695840284228325, 0.0052787852473556995, -0.03414873033761978, -0.03308812156319618, 0.0019840202294290066, -0.013806503266096115, -0.0035809348337352276, 0.038138385862112045, 0.051906879991292953, 0.09233370423316956, ...
0.019242
and storage based on your platform: - \*\*Mac/Windows\*\*: Keys are auto-managed via system keyring, storage defaults to disk. Suitable \*\*only\*\* for development and local testing. - \*\*Linux\*\*: Keys are ephemeral, storage defaults to memory. No configuration needed: ```python from fastmcp.server.auth.providers.g...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/storage-backends.mdx
main
model-context-protocol-fastmcp
[ -0.04117446020245552, -0.020347321406006813, -0.11142139136791229, 0.01648891530930996, -0.018367400392889977, -0.031943704932928085, 0.020827967673540115, 0.023253293707966805, 0.030314723029732704, 0.04261909797787666, 0.10883966088294983, 0.01944238506257534, 0.07359987497329712, -0.023...
0.053298
import { VersionBadge } from "/snippets/version-badge.mdx" Background tasks require the `tasks` optional extra. See [installation instructions](#enabling-background-tasks) below. FastMCP implements the MCP background task protocol ([SEP-1686](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/task...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tasks.mdx
main
model-context-protocol-fastmcp
[ -0.05114639922976494, 0.01614626683294773, 0.037719324231147766, -0.0092614172026515, 0.08112449198961258, -0.04962330684065819, -0.019630471244454384, -0.04808996990323067, 0.026551788672804832, 0.0587347038090229, -0.05549977347254753, 0.0006696428754366934, 0.01712995395064354, -0.01730...
0.150029
Poll Interval When clients poll for task status, the server tells them how frequently to check back. By default, FastMCP suggests a 5-second interval, but you can customize this per component: ```python from datetime import timedelta from fastmcp import FastMCP from fastmcp.server.tasks import TaskConfig mcp = FastMCP(...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tasks.mdx
main
model-context-protocol-fastmcp
[ -0.06587085872888565, -0.020909162238240242, -0.012477186508476734, 0.07576905936002731, -0.05375843122601509, -0.0608225092291832, -0.018416984006762505, -0.049537643790245056, 0.036041010171175, 0.001677718828432262, -0.0006339550600387156, -0.0028199118096381426, 0.005201983731240034, -...
0.044685
Set the total number of steps - `await progress.increment(amount=1)` — Increment progress - `await progress.set\_message(text)` — Update the status message Progress works in both immediate and background execution modes—you can use the same code regardless of how the client invokes your function. ## Docket Dependencies...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/tasks.mdx
main
model-context-protocol-fastmcp
[ -0.021150464192032814, 0.08536441624164581, -0.008910874836146832, 0.03265562653541565, -0.05757896229624748, -0.07249182462692261, -0.026742639020085335, 0.008328845724463463, 0.024264955893158913, -0.024469122290611267, -0.03933083638548851, -0.017509248107671738, 0.01423955149948597, -0...
0.02184
import { VersionBadge } from '/snippets/version-badge.mdx' User elicitation allows MCP servers to request structured input from users during tool execution. Instead of requiring all inputs upfront, tools can interactively ask for missing parameters, clarification, or additional context as needed. Elicitation enables to...
https://github.com/jlowin/fastmcp/blob/main//docs/servers/elicitation.mdx
main
model-context-protocol-fastmcp
[ -0.0741981789469719, 0.017495229840278625, 0.017165273427963257, 0.009699803777039051, 0.013411210849881172, -0.0685650110244751, 0.005669198464602232, 0.020538534969091415, -0.05235777795314789, -0.047342099249362946, 0.002217913046479225, -0.05930653586983681, 0.08718376606702805, -0.072...
0.070161