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" The FastMCP `Client` communicates with MCP servers through transport objects that handle the underlying connection mechanics. While the client can automatically select a transport based on what you pass to it, instantiating transports explicitly gives you full ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/clients/transports.mdx
main
model-context-protocol-fastmcp
[ -0.016513556241989136, -0.009024331346154213, 0.03548629209399223, -0.034947287291288376, 0.02035417966544628, -0.07058636099100113, -0.006157487165182829, 0.012135060504078865, -0.034108877182006836, -0.021348191425204277, 0.036768749356269836, -0.018789395689964294, 0.050284139811992645, ...
0.102897
import StdioTransport required\_vars = ["API\_KEY", "DATABASE\_URL", "REDIS\_HOST"] env = { var: os.environ[var] for var in required\_vars if var in os.environ } transport = StdioTransport( command="python", args=["server.py"], env=env ) client = Client(transport) ``` \*\*Loading from .env files\*\* keeps configuration...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/clients/transports.mdx
main
model-context-protocol-fastmcp
[ -0.0032936325296759605, -0.007667015306651592, -0.06561330705881119, -0.005058039911091328, -0.025509744882583618, -0.1006779596209526, 0.06445886939764023, 0.03854060918092728, 0.029156995937228203, -0.018968282267451286, -0.012865002267062664, -0.005790881346911192, 0.06487800180912018, ...
0.007732
client code—no isolation or explicit environment passing required. ```python from fastmcp import FastMCP, Client import os mcp = FastMCP("TestServer") @mcp.tool def greet(name: str) -> str: prefix = os.environ.get("GREETING\_PREFIX", "Hello") return f"{prefix}, {name}!" client = Client(mcp) async with client: result = ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/clients/transports.mdx
main
model-context-protocol-fastmcp
[ -0.11834131926298141, 0.025858160108327866, 0.03635210543870926, 0.05846831202507019, -0.022414570674300194, -0.1279330551624298, -0.042397480458021164, -0.018992954865098, -0.013385877944529057, -0.07067513465881348, 0.017150698229670525, -0.04526601359248161, 0.042641881853342056, 0.0441...
-0.001198
import { VersionBadge } from "/snippets/version-badge.mdx" OAuth authentication is only relevant for HTTP-based transports and requires user interaction via a web browser. When your FastMCP client needs to access an MCP server protected by OAuth 2.1, and the process requires user interaction (like logging in and granti...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/clients/auth/oauth.mdx
main
model-context-protocol-fastmcp
[ -0.08413687348365784, 0.05423731729388237, 0.009280248545110226, -0.05188567936420441, 0.007900016382336617, -0.06551436334848404, 0.002186516532674432, 0.03192633017897606, -0.007801018189638853, -0.07271309942007065, 0.016860581934452057, -0.0002224474010290578, 0.10617899149656296, -0.0...
-0.055865
to the MCP server. If the access token expires, the client will automatically use the refresh token to get a new access token. ## Token Storage By default, tokens are stored in memory and lost when your application restarts. For persistent storage, pass an `AsyncKeyValue`-compatible storage backend to the `token\_stora...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/clients/auth/oauth.mdx
main
model-context-protocol-fastmcp
[ -0.08191315829753876, 0.0017019144725054502, -0.0017612570663914084, 0.029590819031000137, 0.0247808750718832, -0.04708242416381836, 0.017798012122511864, 0.036226920783519745, 0.06886425614356995, 0.011143608018755913, 0.021271629258990288, 0.06499477475881577, 0.10085266828536987, -0.048...
0.025478
import { VersionBadge } from "/snippets/version-badge.mdx" Bearer Token authentication is only relevant for HTTP-based transports. You can configure your FastMCP client to use \*\*bearer authentication\*\* by supplying a valid access token. This is most appropriate for service accounts, long-lived API keys, CI/CD, appl...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/clients/auth/bearer.mdx
main
model-context-protocol-fastmcp
[ -0.09900227189064026, 0.0736517384648323, -0.0030492148362100124, -0.055633947253227234, -0.01956663280725479, -0.03501017764210701, 0.03885091096162796, 0.00004822613118449226, -0.0037401560693979263, -0.052669789642095566, 0.03148674964904785, -0.002241556067019701, 0.1122540831565857, -...
0.009034
import { VersionBadge } from "/snippets/version-badge.mdx" FastMCP provides a command-line interface (CLI) that makes it easy to run, develop, and install your MCP servers. The CLI is automatically installed when you install FastMCP. ```bash fastmcp --help ``` ## Commands Overview | Command | Purpose | Dependency Manag...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ -0.053564950823783875, -0.018180737271904945, 0.05209784209728241, -0.04867960885167122, 0.04635344818234444, -0.04847140982747078, -0.07730986922979355, -0.016180865466594696, -0.06500773131847382, -0.02449582703411579, 0.04362322390079498, -0.038850218057632446, 0.04446934163570404, -0.0...
-0.024106
and uses the specified server entrypoint 3. \*\*[Factory function](#factory-function)\*\*: `server.py:create\_server` - calls the specified function (sync or async) to create a server instance 4. \*\*[Remote server proxy](#remote-server-proxy)\*\*: `https://example.com/mcp-server` - connects to a remote server and crea...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ -0.08637183159589767, -0.041308388113975525, -0.028025498613715172, -0.03753509372472763, -0.031249234452843666, -0.0781506597995758, -0.04463120549917221, -0.03645767644047737, -0.035891856998205185, -0.015820682048797607, 0.0710771456360817, 0.04974914342164993, 0.03183756023645401, 0.00...
0.072414
Or explicitly specify a configuration file fastmcp run my-config.fastmcp.json ``` The configuration file handles dependencies, environment variables, and transport settings. Command-line arguments override configuration file values: ```bash # Override port from config file fastmcp run fastmcp.json --port 8080 # Skip en...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ -0.015281298197805882, 0.05826297774910927, 0.023692237213253975, -0.043721459805965424, 0.03140122443437576, -0.06356191635131836, -0.056068968027830124, -0.006090782582759857, -0.024909552186727524, 0.0020412339363247156, 0.09552162885665894, -0.042990703135728836, 0.0413125716149807, 0....
-0.094237
\*\*FastMCP configuration\*\*: `fastmcp.json` - uses FastMCP's declarative configuration (auto-detects in current directory) The `dev` command \*\*only supports local files and fastmcp.json\*\* - no URLs, remote servers, or standard MCP configuration files. \*\*Examples\*\* ```bash # Run dev server with editable mode a...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ -0.06186934933066368, -0.013873420655727386, -0.012492064386606216, -0.05775246024131775, 0.039832696318626404, -0.10715076327323914, -0.09800927340984344, 0.006521305534988642, -0.0402141772210598, -0.021684719249606133, 0.07508525252342224, -0.021821793168783188, -0.012019929476082325, -...
-0.015893
object is found. 2. \*\*Explicit server entrypoint\*\*: `server.py:custom\_name` - imports and uses the specified server entrypoint 3. \*\*Factory function\*\*: `server.py:create\_server` - calls the specified function (sync or async) to create a server instance 4. \*\*FastMCP configuration\*\*: `fastmcp.json` - uses F...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ -0.06843964010477066, -0.03514143452048302, -0.015415774658322334, -0.009404998272657394, -0.009978855960071087, -0.04169480502605438, -0.026033494621515274, -0.012186127714812756, -0.0057668923400342464, -0.012520680204033852, 0.0892566666007042, -0.006971691735088825, 0.03930216282606125, ...
0.051559
#### FastMCP Format (`--format fastmcp`) The default and most comprehensive format, includes all FastMCP-specific metadata: - Server name, instructions, and version - FastMCP version and MCP version - Tool tags and enabled status - Output schemas for tools - Annotations and custom metadata - Uses snake\_case field name...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ -0.0186994057148695, 0.0312693752348423, 0.014839638955891132, -0.0169584471732378, 0.0420050211250782, -0.021103180944919586, -0.032769858837127686, -0.03452787548303604, -0.015023033134639263, -0.026724863797426224, 0.0601215586066246, -0.027228299528360367, 0.02916642278432846, -0.05612...
0.061083
------ | ---- | ----------- | | Copy to Clipboard | `--copy` | Copy version information to clipboard |
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/cli.mdx
main
model-context-protocol-fastmcp
[ 0.044375285506248474, -0.03293359652161598, -0.01703903265297413, -0.022454651072621346, 0.07962843030691147, 0.016240833327174187, -0.0386541411280632, -0.01957888901233673, 0.003696235129609704, -0.03975868225097656, 0.053769901394844055, -0.017907127737998962, -0.08477521687746048, -0.1...
-0.056758
FastMCP's decorator system is designed to work with functions, but you may see unexpected behavior if you try to decorate an instance or class method. This guide explains the correct approach for using methods with all FastMCP decorators (`@tool`, `@resource`, and `@prompt`). ## Why Are Methods Hard? When you apply a F...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/decorating-methods.mdx
main
model-context-protocol-fastmcp
[ -0.07770925015211105, 0.05627337843179703, 0.08028465509414673, -0.005738536827266216, -0.007374590262770653, -0.03502747043967247, -0.006966633256524801, -0.061231374740600586, 0.0009698863723315299, -0.005207129288464785, 0.023567287251353264, -0.028817616403102875, 0.05889220908284187, ...
-0.037371
# Register the class method after the class is defined mcp.tool(MyClass.from\_string) ``` This works because: 1. The `@classmethod` decorator is applied properly during class definition 2. When you access `MyClass.from\_string`, Python provides a special method object that automatically binds the class to the `cls` par...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/decorating-methods.mdx
main
model-context-protocol-fastmcp
[ -0.07136791199445724, 0.004263268318027258, 0.009177545085549355, 0.0073960525915026665, -0.07644443213939667, -0.017326651141047478, 0.03435440734028816, -0.017145073041319847, -0.09329774230718613, -0.05831044167280197, 0.04289397597312927, -0.019098851829767227, 0.04611090198159218, 0.0...
-0.050289
The best way to ensure a reliable and maintainable FastMCP Server is to test it! The FastMCP Client combined with Pytest provides a simple and powerful way to test your FastMCP servers. ## Prerequisites Testing FastMCP servers requires `pytest-asyncio` to handle async test functions and fixtures. Install it as a develo...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/testing.mdx
main
model-context-protocol-fastmcp
[ -0.06036306917667389, 0.002273860154673457, 0.022936100140213966, 0.06392118334770203, -0.028451908379793167, -0.10525081306695938, -0.08066757023334503, 0.0013872297713533044, -0.034630004316568375, -0.060996443033218384, 0.03288336098194122, -0.017358725890517235, 0.021417435258626938, 0...
-0.058017
import { VersionBadge } from '/snippets/version-badge.mdx' Tool transformation allows you to create new, enhanced tools from existing ones. This powerful feature enables you to adapt tools for different contexts, simplify complex interfaces, or add custom logic without duplicating code. ## Why Transform Tools? Often, a...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/tool-transformation.mdx
main
model-context-protocol-fastmcp
[ -0.048966944217681885, 0.06932388991117477, -0.020846126601099968, -0.01739349775016308, 0.009271142072975636, 0.04474261403083801, -0.006486509460955858, -0.011643989011645317, -0.05046176165342331, -0.011097201146185398, -0.052675846964120865, -0.038686033338308334, 0.12716186046600342, ...
0.003969
this tool to your MCP server using its `add\_tool()` method. ## Modifying Arguments To modify a tool's parameters, provide a dictionary of `ArgTransform` objects to the `transform\_args` parameter of `Tool.from\_tool()`. Each key is the name of the \*original\* argument you want to modify. You only need to provide a `t...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/tool-transformation.mdx
main
model-context-protocol-fastmcp
[ -0.042378153651952744, -0.0022091225255280733, -0.06496190279722214, 0.040987879037857056, -0.09233293682336807, -0.017131265252828598, 0.06767928600311279, -0.005925917532294989, -0.043270401656627655, 0.04120652377605438, -0.012940546497702599, -0.03855212777853012, 0.006217525340616703, ...
0.069023
you provide a new default), because the LLM can't provide a value at call time. To pass a constant value to the parent tool, combine `hide=True` with `default=`. ```python {19-20} import os from fastmcp import FastMCP from fastmcp.tools import Tool from fastmcp.tools.tool\_transform import ArgTransform mcp = FastMCP() ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/tool-transformation.mdx
main
model-context-protocol-fastmcp
[ -0.05486911162734032, 0.03386539965867996, 0.016841579228639603, 0.04300719127058983, 0.0037294868379831314, -0.10070794075727463, 0.03709731251001358, 0.027679894119501114, 0.05747241526842117, -0.03279343992471695, 0.04152723401784897, -0.09882120043039322, 0.06645707041025162, -0.021336...
0.01945
of the time, you don't want to completely replace the parent tool's behavior. Instead, you want to add validation, modify inputs, or post-process outputs while still leveraging the parent tool's core functionality. For this, FastMCP provides the special `forward()` and `forward\_raw()` functions. Both `forward()` and `...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/tool-transformation.mdx
main
model-context-protocol-fastmcp
[ -0.11603937298059464, -0.007548090070486069, -0.029724741354584694, 0.006274203769862652, -0.016127903014421463, -0.04501575604081154, -0.027642609551548958, -0.01628340221941471, 0.019054515287280083, -0.030640486627817154, 0.07075924426317215, -0.08008891344070435, -0.0004592378973029554, ...
0.005146
int: """Adds two numbers.""" return x + y async def ensure\_a\_positive(a: int, \*\*kwargs) -> int: if a <= 0: raise ValueError("a must be positive") return await forward(a=a, \*\*kwargs) new\_tool = Tool.from\_tool( add, transform\_fn=ensure\_a\_positive, transform\_args={ "x": ArgTransform(name="a"), "y": ArgTransfor...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/tool-transformation.mdx
main
model-context-protocol-fastmcp
[ -0.1190209612250328, 0.013211469165980816, -0.03938654810190201, 0.03663879260420799, -0.10151555389165878, -0.04713280126452446, 0.05170074850320816, -0.007598166354000568, -0.025224046781659126, 0.00031399427098222077, 0.04839809611439705, -0.0898420587182045, 0.07235443592071533, -0.015...
0.011007
GitHub repository.", transform\_args={ "owner": ArgTransform(description="The owner of the repository."), "repo": ArgTransform(description="The name of the repository."), "limit": ArgTransform(description="Maximum number of issues to return."), # Hide internal parameters "include\_debug\_info": ArgTransform(hide=True, ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/tool-transformation.mdx
main
model-context-protocol-fastmcp
[ -0.08682770282030106, -0.005132731050252914, -0.04980809614062309, 0.01363799162209034, -0.04067995026707649, -0.07694780081510544, 0.029941188171505928, 0.024469787254929543, -0.016062960028648376, 0.010839569382369518, 0.03082369826734066, -0.0476919561624527, 0.06876574456691742, -0.048...
0.029
import { VersionBadge } from "/snippets/version-badge.mdx" FastMCP includes a `contrib` package that holds community-contributed modules. These modules extend FastMCP's functionality but aren't officially maintained by the core team. Contrib modules provide additional features, integrations, or patterns that complement...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/patterns/contrib.mdx
main
model-context-protocol-fastmcp
[ -0.10464499890804291, -0.026192743331193924, -0.006444904953241348, -0.03171877935528755, 0.0769624412059784, -0.02527458593249321, -0.029542136937379837, -0.0014241962926462293, -0.06893099099397659, -0.11075769364833832, 0.07228904962539673, -0.006210338324308395, 0.03396931663155556, -0...
0.049772
import { VersionBadge } from "/snippets/version-badge.mdx" Good tests are the foundation of reliable software. In FastMCP, we treat tests as first-class documentation that demonstrates how features work while protecting against regressions. Every new capability needs comprehensive tests that demonstrate correctness. ##...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/tests.mdx
main
model-context-protocol-fastmcp
[ -0.03759452700614929, 0.026847021654248238, 0.03203975409269333, -0.005608680658042431, 0.052800990641117096, -0.08500175923109055, -0.031455740332603455, 0.021472690626978874, -0.046380527317523956, -0.006792730651795864, 0.055120643228292465, 0.03667089343070984, 0.045869749039411545, 0....
-0.012811
test\_setup\_server(): """Setup for other tests.""" global test\_server test\_server = FastMCP("shared-server") def test\_server\_works(): """Test server functionality.""" # Depends on test\_setup\_server running first assert test\_server is not None ``` #### Clear Intent Test names and assertions should make the verif...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/tests.mdx
main
model-context-protocol-fastmcp
[ -0.1015302985906601, -0.01914246752858162, -0.03718133643269539, 0.06126740947365761, -0.026265908032655716, -0.06278336048126221, 0.007621889468282461, -0.06545277684926987, -0.029286867007613182, -0.02814970351755619, 0.09003610908985138, -0.04414059594273567, 0.09596667438745499, 0.0227...
-0.014541
test\_weather\_operations(): # Pass server directly - no deployment needed async with Client(server) as client: result = await client.call\_tool("get\_temperature", {"city": "NYC"}) assert result.data == {"city": "NYC", "temp": 72} ``` This pattern makes tests deterministic and fast - typically completing in millisecon...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/tests.mdx
main
model-context-protocol-fastmcp
[ -0.0482586994767189, -0.0052968282252550125, 0.02507450245320797, 0.13305532932281494, -0.08448008447885513, -0.1360350102186203, 0.0030875219963490963, -0.0707809329032898, -0.05400586500763893, 0.001970705110579729, 0.040973685681819916, -0.07984257489442825, 0.049956172704696655, -0.028...
-0.039924
This guide provides migration instructions for breaking changes and major updates when upgrading between FastMCP versions. ## v2.14.0 ### OpenAPI Parser Promotion The experimental OpenAPI parser is now the standard implementation. The legacy parser has been removed. \*\*If you were using the legacy parser:\*\* No code ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/upgrade-guide.mdx
main
model-context-protocol-fastmcp
[ -0.05442827567458153, -0.015245573595166206, 0.09992523491382599, 0.010979663580656052, 0.0196986086666584, -0.1358889490365982, -0.11244325339794159, -0.02477353997528553, -0.06924552470445633, -0.04426342993974686, 0.06620615720748901, -0.045531827956438065, -0.0008085609879344702, -0.01...
0.01666
Contributing to FastMCP means joining a community that values clean, maintainable code and thoughtful API design. All contributions are valued - from fixing typos in documentation to implementing major features. ## Issues ### Issue First, Code Second \*\*Every pull request requires a corresponding issue - no exceptions...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/contributing.mdx
main
model-context-protocol-fastmcp
[ -0.07383590191602707, 0.034358639270067215, 0.03421606123447418, 0.003683611983433366, 0.037989869713783264, 0.035881079733371735, 0.0034907914232462645, 0.03296378254890442, -0.0451766699552536, -0.006179254502058029, 0.03935234248638153, -0.00879369955509901, 0.01852675899863243, -0.0287...
0.055928
possibly years from now, possibly without context about your decisions. \*\*PRs can be rejected for two opposing reasons:\*\* 1. \*\*Insufficient quality\*\* - Code that doesn't meet our standards for clarity, maintainability, or idiomaticity 2. \*\*Overengineering\*\* - Code that is overbearing, unnecessarily complex,...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/contributing.mdx
main
model-context-protocol-fastmcp
[ -0.16359059512615204, 0.03158579021692276, -0.011676555499434471, 0.009876339696347713, -0.003512921277433634, -0.042603086680173874, 0.03532106801867485, 0.024374254047870636, -0.0340299978852272, -0.0028310411144047976, 0.056382060050964355, -0.015437363646924496, 0.02611057460308075, -0...
0.130979
the "why" - the code shows the "what". Keep it concise but complete. #### What We Look For \*\*Framework Philosophy\*\*: FastMCP is NOT trying to do all things or provide all shortcuts. Features are rejected when they don't align with the framework's vision, even if perfectly implemented. The burden of proof is on the ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/contributing.mdx
main
model-context-protocol-fastmcp
[ -0.08946002274751663, 0.05325040593743324, 0.024097003042697906, 0.045148029923439026, 0.15688161551952362, 0.0023091514594852924, -0.026116935536265373, -0.04224860295653343, -0.06180335953831673, 0.033118490129709244, 0.08671926707029343, -0.010514858178794384, -0.032564688473939896, -0....
0.055354
FastMCP releases frequently to deliver features quickly in the rapidly evolving MCP ecosystem. We use semantic versioning pragmatically - the Model Context Protocol is young, patterns are still emerging, and waiting for perfect stability would mean missing opportunities to empower developers with better tools. ## Versi...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/releases.mdx
main
model-context-protocol-fastmcp
[ -0.04021451622247696, 0.04065835475921631, 0.11236821115016937, -0.038588155061006546, 0.12127432227134705, -0.03917226940393448, -0.10266092419624329, -0.06161292642354965, -0.04866621643304825, -0.0011659970041364431, 0.04268447682261467, -0.029230307787656784, -0.03737775981426239, -0.0...
0.041447
fixes This approach means you get improvements as soon as they're ready rather than waiting for arbitrary release dates.
https://github.com/jlowin/fastmcp/blob/main//docs/v2/development/releases.mdx
main
model-context-protocol-fastmcp
[ -0.02922416292130947, -0.015252199023962021, 0.11128921061754227, -0.01964293234050274, 0.04883607104420662, -0.012222988530993462, -0.11393625289201736, -0.0347290001809597, -0.034256577491760254, 0.04475676268339157, 0.06258974969387054, 0.09474637359380722, -0.08527372032403946, 0.00489...
0.011417
import { VersionBadge } from "/snippets/version-badge.mdx" This guide shows you how to secure your FastMCP server using \*\*OCI IAM OAuth\*\*. Since OCI IAM doesn't support Dynamic Client Registration, this integration uses the [\*\*OIDC Proxy\*\*](/v2/servers/auth/oidc-proxy) pattern to bridge OCI's traditional OAuth ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/oci.mdx
main
model-context-protocol-fastmcp
[ -0.10399021208286285, 0.06035381183028221, 0.020709112286567688, -0.04715149477124214, 0.0009620270575396717, -0.07506797462701797, 0.022330299019813538, 0.0008754143491387367, 0.050164323300123215, -0.018433814868330956, 0.00993274711072445, -0.06344430893659592, 0.08972390741109848, -0.0...
-0.012454
you can also use OCI CLI. Before using the CLI command below, ensure that you have created a token exchange OAuth client. In most cases, you can use the same OAuth client that you created above. You will use the client ID of the token exchange OAuth client in the CLI command below and replace it with {FASTMCP\_SERVER\_...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/oci.mdx
main
model-context-protocol-fastmcp
[ -0.06721227616071701, 0.010233217850327492, -0.04132221266627312, -0.05859369784593582, -0.0035038073547184467, -0.1132795438170433, 0.07324247807264328, 0.03446492925286293, 0.02210826985538006, -0.027267320081591606, 0.057614948600530624, -0.10675759613513947, 0.045844051986932755, -0.00...
0.010961
config\_url=FASTMCP\_SERVER\_AUTH\_OCI\_CONFIG\_URL, client\_id=FASTMCP\_SERVER\_AUTH\_OCI\_CLIENT\_ID, client\_secret=FASTMCP\_SERVER\_AUTH\_OCI\_CLIENT\_SECRET, base\_url="https://your-production-domain.com", # Production token management jwt\_signing\_key=os.environ["JWT\_SIGNING\_KEY"], client\_storage=FernetEncryp...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/oci.mdx
main
model-context-protocol-fastmcp
[ -0.045364439487457275, 0.007527388632297516, -0.037751391530036926, -0.0347672700881958, -0.000019959052224294282, -0.12079963833093643, -0.008330299519002438, 0.042277347296476364, -0.0017110032495111227, -0.052368760108947754, 0.058412566781044006, -0.08162590116262436, 0.04511453956365585...
-0.002738
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/v2/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](/v2/servers/auth/remote-oauth) pattern: Scalekit handles user authentication, and the MCP server validates issued tokens. ### Prerequisites Before you begin...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/scalekit.mdx
main
model-context-protocol-fastmcp
[ -0.026758644729852676, 0.009768066927790642, 0.022150857374072075, -0.03180338069796562, 0.043797023594379425, -0.025273101404309273, -0.06634099781513214, 0.007529562804847956, -0.02870313450694084, 0.0029639415442943573, 0.05589663237333298, -0.07612594962120056, 0.06366262584924698, -0....
-0.053173
with the Remote OAuth pattern without pre‑provisioned credentials. \*\*Validation and SSO\*\*: tokens are verified (keys, RS256, issuer, audience, expiry), and SAML, OIDC, OAuth 2.0, ADFS, Azure AD, and Google Workspace are supported; use HTTPS in production and review auth logs as needed. ## Debugging Enable detailed ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/scalekit.mdx
main
model-context-protocol-fastmcp
[ -0.09331018477678299, -0.005079454742372036, 0.02941041626036167, -0.009266274981200695, 0.01957671344280243, -0.09217134118080139, 0.013701586984097958, -0.05315934494137764, -0.012230961583554745, -0.029154878109693527, 0.01137869618833065, -0.020441563799977303, 0.0638515055179596, -0.0...
-0.063421
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\*\*](/v2/servers/auth/remote-oauth) pattern, where AuthKit handles user lo...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/authkit.mdx
main
model-context-protocol-fastmcp
[ -0.07902351021766663, 0.06090904399752617, -0.019025465473532677, -0.07572345435619354, 0.03406244516372681, -0.031594499945640564, -0.0006591194542124867, -0.027762258425354958, -0.030189555138349533, -0.02198054827749729, 0.04586639255285263, -0.04748832806944847, 0.07364370673894882, 0....
0.036359
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\*\*](/v2/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/v2/integrations/supabase.mdx
main
model-context-protocol-fastmcp
[ -0.06196818873286247, 0.03035951964557171, -0.004363954067230225, -0.03663421422243118, 0.035487063229084015, 0.031018637120723724, -0.06532489508390427, -0.021985530853271484, -0.029455028474330902, -0.042197585105895996, 0.06868721544742584, -0.03568664565682411, 0.1082918792963028, -0.0...
-0.029878
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\*\*](/v2/servers/auth/oauth-proxy) pattern to bridge GitHub's traditional OAu...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/github.mdx
main
model-context-protocol-fastmcp
[ -0.06333805620670319, -0.003757419064640999, 0.007690859492868185, -0.026192255318164825, 0.011786410585045815, -0.004920061212033033, -0.03522443026304245, 0.007503334898501635, 0.0004080429207533598, -0.046276938170194626, 0.042794860899448395, -0.011172529309988022, 0.11860588937997818, ...
-0.060421
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/v2/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 supports MCP servers through local STDIO connections and remote servers (beta), allowing you to extend Claude's capabilities with custom tools, resources, and prompts from your FastMCP ser...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/claude-desktop.mdx
main
model-context-protocol-fastmcp
[ 0.008964101783931255, -0.04414689913392067, -0.015426011756062508, -0.08000240474939346, -0.010463317856192589, 0.04227433353662491, -0.039775311946868896, 0.028581833466887474, -0.04939999431371689, 0.0012663722736760974, 0.007169962394982576, 0.0034666110295802355, 0.04741796851158142, -...
-0.017228
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/v2/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/v2/integrations/claude-desktop.mdx
main
model-context-protocol-fastmcp
[ -0.021139537915587425, 0.018094845116138458, -0.03660652041435242, -0.04667136073112488, -0.08791173994541168, -0.05573130398988724, -0.05735711753368378, 0.0812932625412941, -0.01787405088543892, 0.005347668658941984, 0.002347663277760148, -0.019112149253487587, 0.06111661717295647, -0.03...
-0.060572
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/v2/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/v2/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\*\*](/v2/servers/auth/remote-oauth) pattern, where Desc...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/descope.mdx
main
model-context-protocol-fastmcp
[ -0.09362678229808807, 0.025134531781077385, 0.01582092046737671, -0.060562457889318466, 0.02118728868663311, -0.007926338352262974, -0.02645796164870262, -0.016984328627586365, -0.010117551311850548, -0.04070209339261055, 0.06348621100187302, -0.04013020545244217, 0.09014935791492462, -0.0...
-0.039078
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/v2/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 supports MCP servers through multiple transport methods including STDIO, SSE, and Streamable HTTP, allowing you to extend Cursor's AI assistant with custom tools, resources, and prompts from your ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/cursor.mdx
main
model-context-protocol-fastmcp
[ -0.09025735408067703, -0.06581855565309525, 0.0060805692337453365, -0.0705493614077568, -0.03644121065735817, -0.048712458461523056, 0.003982563968747854, -0.02547227218747139, -0.020641274750232697, -0.0007464422378689051, 0.02851884625852108, -0.012496949173510075, 0.08574467152357101, -...
0.020638
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/v2/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/v2/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/v2/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.05911504477262497, 0.012144505977630615, 0.03172493353486061, -0.046119797974824905, 0.04001118615269661, -0.044111527502536774, -0.10307802259922028, -0.026538046076893806, -0.03550298884510994, -0.0439484529197216, 0.0005122311413288116, -0.0341731458902359, 0.09738335758447647, -0.04...
0.011641
meaning you can add new tools, resources, and other components to it just like you would with any other FastMCP instance. ```python {8-11} # Assumes the FastAPI app from above is already defined from fastmcp import FastMCP # Convert to MCP server mcp = FastMCP.from\_fastapi(app=app) # Add a new tool @mcp.tool def get\_...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.0638786107301712, -0.03947552666068077, -0.008046237751841545, -0.03088650479912758, -0.020822184160351753, -0.051827725023031235, -0.004399915225803852, 0.049650367349386215, -0.05607053264975548, -0.05985178425908089, 0.06893114000558853, -0.04937135428190231, 0.09130171686410904, -0....
-0.007232
FastMCP from fastapi import FastAPI # Create MCP server mcp = FastMCP("Analytics Tools") @mcp.tool def analyze\_pricing(category: str) -> dict: """Analyze pricing for a category.""" products = [p for p in products\_db.values() if p.category == category] if not products: return {"error": f"No products in {category}"} pr...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.07060703635215759, 0.07324090600013733, -0.06820756942033768, 0.07073480635881424, -0.03470248356461525, -0.07806620746850967, 0.020888322964310646, 0.015526222996413708, 0.035582177340984344, -0.036078087985515594, 0.08593696355819702, -0.11941597610712051, 0.01606639102101326, -0.0477...
0.02076
= mcp.http\_app(path='/mcp') # Combine both lifespans @asynccontextmanager async def combined\_lifespan(app: FastAPI): # Run both lifespans async with app\_lifespan(app): async with mcp\_app.lifespan(app): yield # Use the combined lifespan app = FastAPI(lifespan=combined\_lifespan) app.mount("/mcp", mcp\_app) ``` This ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/fastapi.mdx
main
model-context-protocol-fastmcp
[ -0.08129331469535828, 0.020583748817443848, -0.007256538141518831, 0.06075853481888771, -0.013209720142185688, -0.11821557581424713, -0.051604583859443665, 0.017319807782769203, -0.03686834126710892, -0.017075881361961365, 0.03217728063464165, -0.0298576932400465, 0.04455871507525444, -0.0...
0.017035
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/v2/integrations/workos.mdx
main
model-context-protocol-fastmcp
[ -0.09042047709226608, 0.04600946977734566, 0.0017870328156277537, -0.056540463119745255, 0.025263190269470215, -0.03876281902194023, -0.021797386929392815, 0.006365352310240269, -0.03823480010032654, -0.042864300310611725, 0.03238794580101967, -0.030368885025382042, 0.044929176568984985, 0...
0.032322
variables and use a persistent storage backend like Redis for distributed deployments. For complete details on these parameters, see the [OAuth Proxy documentation](/v2/servers/auth/oauth-proxy#configuration-parameters). ## Environment Variables For production deployments, use environment variables instead of hardcodin...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/workos.mdx
main
model-context-protocol-fastmcp
[ -0.05381941422820091, 0.046726007014513016, -0.051919564604759216, 0.008077671751379967, -0.026962142437696457, -0.09536321461200714, 0.03559735044836998, 0.04295558109879494, 0.006652681156992912, -0.016062824055552483, 0.02117954194545746, 0.010789032094180584, 0.07127594947814941, 0.025...
0.055747
ChatGPT 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, you must first enable Dev...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/chatgpt.mdx
main
model-context-protocol-fastmcp
[ -0.0798717737197876, -0.06785586476325989, 0.02711409516632557, 0.023634880781173706, -0.045495640486478806, -0.129426047205925, 0.03131598234176636, -0.016202813014388084, 0.025553999468684196, 0.005657839588820934, 0.017346492037177086, 0.04613121971487999, -0.007703685201704502, 0.00297...
0.112844
"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/v2/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 supports MCP servers through multiple transport methods including STDIO, SSE, and HTTP, allowing you to extend Claude's capabilities with custom tools, resources, and prompts from your FastMC...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/claude-code.mdx
main
model-context-protocol-fastmcp
[ -0.05268595367670059, -0.03571208938956261, -0.04426467791199684, -0.032663047313690186, -0.044548556208610535, -0.04123849794268608, -0.007149797864258289, -0.005141090136021376, -0.024274496361613274, -0.001963375834748149, 0.043325889855623245, 0.014475412666797638, 0.08594582229852676, ...
-0.014772
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/v2/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\*\*](/v2/servers/auth/oauth-proxy) pattern to bridge Google's traditional OAu...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/google.mdx
main
model-context-protocol-fastmcp
[ -0.10958240926265717, 0.018349982798099518, 0.09273718297481537, -0.06491165608167648, -0.004493876826018095, 0.0019438241142779589, 0.007700374349951744, -0.036474887281656265, -0.03125697001814842, -0.021042045205831528, 0.019920194521546364, -0.03865727782249451, 0.09870191663503647, -0...
-0.132094
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/v2/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/v2/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.036171991378068924, -0.00021802097035106272, 0.0517742745578289, -0.021604619920253754, 0.042595893144607544, -0.05222649127244949, -0.11563972383737564, -0.012564849108457565, -0.026521164923906326, -0.02103160321712494, -0.03896322101354599, -0.03133315593004227, 0.09745366126298904, ...
0.045555
`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 providing custom route maps: ```python from fastmcp import FastMCP from fastmcp.server.openapi import RouteMap, MCPType # Restore pre-2.8.0...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.012584271840751171, 0.04191941022872925, 0.04264551401138306, 0.0653364509344101, -0.04238709807395935, -0.051913026720285416, -0.024886444211006165, -0.00897526927292347, -0.05600880831480026, -0.028106940910220146, 0.0012960202293470502, -0.0372806191444397, 0.005578975658863783, 0.01...
0.006968
client=client, route\_map\_fn=custom\_route\_mapper, ) ``` ## Customization ### Component Names FastMCP automatically generates names for MCP components based on the OpenAPI specification. By default, it uses the `operationId` from your OpenAPI spec, up to the first double underscore (`\_\_`). All component names are a...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ -0.037063486874103546, 0.01610296405851841, 0.026829631999135017, 0.03908298909664154, -0.07151401787996292, -0.09618817269802094, 0.025581497699022293, 0.01019228994846344, -0.024210786446928978, -0.08752674609422684, 0.049674779176712036, -0.05720016732811928, 0.06164891645312309, -0.016...
0.025988
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 ignored. ```python from fastmcp.server.openapi import ( HTTPRoute, OpenAPITool, OpenAPIResource, OpenAPIResourceTemplate, ) def custom...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/openapi.mdx
main
model-context-protocol-fastmcp
[ 0.00944732315838337, 0.04439243674278259, 0.03063357248902321, 0.056979890912771225, 0.03667284548282623, -0.03856085613369942, 0.02261258102953434, 0.05694105848670006, 0.0035107708536088467, -0.02259800210595131, 0.0467391312122345, -0.028981149196624756, -0.013086034916341305, -0.020637...
-0.026657
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\*\*](/v2/servers/auth/oauth-proxy) pattern to bridge Azure...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/azure.mdx
main
model-context-protocol-fastmcp
[ -0.08055410534143448, 0.03647695481777191, 0.030565928667783737, -0.03141523897647858, -0.013187090866267681, 0.037968672811985016, 0.0028068411629647017, -0.05980760604143143, 0.015266051515936852, 0.02550571784377098, 0.033024370670318604, -0.04278859123587608, 0.11887240409851074, -0.01...
-0.061286
- \*\*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/v2/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
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 will automatically handle Azure OAuth async with Client("http://localhost:80...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/azure.mdx
main
model-context-protocol-fastmcp
[ -0.08303660154342651, 0.04364464804530144, -0.07701221853494644, 0.053833842277526855, -0.01408848911523819, -0.04842870309948921, 0.019409803673624992, -0.046989649534225464, -0.0019805075135082006, 0.003901388496160507, 0.0401579886674881, 0.004554685205221176, 0.04293976351618767, 0.013...
-0.031899
list of additional scopes to include in the authorization request without prefixing. Use this to request upstream scopes such as Microsoft Graph permissions. These are not used for token validation. Application ID URI used to prefix scopes during authorization. Azure authority base URL. Override this to use Azure Gover...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/azure.mdx
main
model-context-protocol-fastmcp
[ -0.06806200742721558, 0.06669152528047562, 0.004292741417884827, -0.008598284795880318, -0.0016871111001819372, -0.05048048496246338, 0.027754593640565872, -0.03590331971645355, 0.013381761498749256, 0.06892383843660355, 0.027089830487966537, -0.038878925144672394, 0.0776059478521347, 0.04...
-0.072824
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\*\*](/v2/servers/auth/oidc-proxy) pattern ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/auth0.mdx
main
model-context-protocol-fastmcp
[ -0.09005054086446762, 0.05005321651697159, 0.015837902203202248, -0.05057062208652496, -0.0034595669712871313, 0.004585775546729565, 0.004289770033210516, -0.011505370028316975, -0.03449522331357002, -0.0512816347181797, 0.03183787688612938, -0.03402275592088699, 0.11373643577098846, -0.03...
-0.066048
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/v2/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/v2/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/v2/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/v2/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/v2/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/v2/integrations/anthropic.mdx
main
model-context-protocol-fastmcp
[ -0.06602396816015244, 0.027873700484633446, -0.049470625817775726, -0.026088962331414223, -0.02454855851829052, -0.030513038858771324, 0.011232287622988224, 0.03358615189790726, 0.03706837445497513, -0.03260409086942673, 0.011578141711652279, -0.010470462962985039, 0.03739769756793976, -0....
-0.016392
import { VersionBadge } from "/snippets/version-badge.mdx" import { LocalFocusTip } from "/snippets/local-focus.mdx" Gemini CLI supports MCP servers through multiple transport methods including STDIO, SSE, and HTTP, allowing you to extend Gemini's capabilities with custom tools, resources, and prompts from your FastMCP...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/gemini-cli.mdx
main
model-context-protocol-fastmcp
[ -0.06680549681186676, -0.03116886503994465, -0.029079513624310493, -0.06939785182476044, -0.038935765624046326, -0.06271901726722717, 0.017795151099562645, -0.010384207591414452, -0.03557167574763298, -0.03288513422012329, 0.013023941777646542, 0.049334943294525146, 0.051464423537254333, -...
-0.015895
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/v2/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\*\*](/v2/servers/auth/oauth-proxy) pattern to bridge Discord's traditional ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/discord.mdx
main
model-context-protocol-fastmcp
[ -0.07297109067440033, 0.004858506843447685, 0.05822843313217163, -0.06687355041503906, 0.0028008418157696724, 0.023297278210520744, 0.02124437503516674, 0.001804628991521895, -0.0000016052139244493446, -0.033303067088127136, 0.0071858796291053295, -0.03774245083332062, 0.11034118384122849, ...
-0.042115
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/v2/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/v2/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/v2/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/v2/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" 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\*\*](/v2/servers/auth/oauth-proxy) pattern to bridge AWS Cogni...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/aws-cognito.mdx
main
model-context-protocol-fastmcp
[ -0.049867674708366394, 0.039086781442165375, -0.006326661910861731, -0.0752154216170311, 0.008678272366523743, 0.018322808668017387, 0.009220442734658718, -0.04733625426888466, -0.0078087905421853065, 0.004576188512146473, 0.04353545978665352, -0.0952574610710144, 0.06375392526388168, -0.0...
-0.030717
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/v2/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](/v2/servers/auth/oauth-proxy#configuration-parameters). ## Environment Variables For production deployments, use environment variables instead of hardcoding credentials. ### Provider Selection Setting this environment variable allows the AWS Cognito provider to be used automatically with...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/integrations/aws-cognito.mdx
main
model-context-protocol-fastmcp
[ -0.015383083373308182, 0.02450917847454548, -0.021266844123601913, -0.02325558103621006, -0.005103947129100561, -0.03457557410001755, 0.033410970121622086, -0.040484584867954254, 0.05989859625697136, 0.02460932545363903, 0.06262042373418808, -0.07940605282783508, 0.04084833711385727, -0.02...
-0.056516
\*\*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/v2/getting-started/welcome.mdx
main
model-context-protocol-fastmcp
[ -0.0811285525560379, -0.04661867767572403, -0.020605042576789856, -0.024916354566812515, -0.049859266728162766, -0.06964337825775146, -0.001204624306410551, 0.021362826228141785, -0.007875916548073292, -0.0072317421436309814, 0.06306235492229462, -0.030899764969944954, 0.10721379518508911, ...
0.132096
A sitemap listing all documentation pages - [llms-full.txt](https://gofastmcp.com/llms-full.txt) - The entire documentation in one file (may exceed context windows) Any page can be accessed as markdown by appending `.md` to the URL. For example, this page becomes `https://gofastmcp.com/getting-started/welcome.md`. You ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/getting-started/welcome.mdx
main
model-context-protocol-fastmcp
[ 0.006445499137043953, 0.08502280712127686, 0.008813958615064621, -0.036159057170152664, 0.0715421810746193, 0.014255509711802006, -0.08185847848653793, 0.025811919942498207, -0.018247030675411224, 0.04906057193875313, -0.006519383750855923, 0.09126294404268265, 0.06653673946857452, -0.0283...
-0.005798
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](/v2/getting-started/installation). ## Create a FastMCP Server A FastMCP server is a collection of tools, resources...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/getting-started/quickstart.mdx
main
model-context-protocol-fastmcp
[ -0.04618241265416145, -0.047415073961019516, 0.007188417483121157, -0.010106582194566727, -0.07020827382802963, -0.08199276030063629, -0.04924902319908142, 0.03505706787109375, -0.053870800882577896, -0.0011425656266510487, 0.04343806952238083, -0.024862969294190407, 0.034870583564043045, ...
0.037963
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/v2/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. If you plan to use FastMCP in your project, you can add it as a dependency with: ```bash uv add fastmcp ``` Alternatively, you can install it directly with `pip` or `uv pip`: ```bash uv uv ...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/getting-started/installation.mdx
main
model-context-protocol-fastmcp
[ -0.06509692966938019, -0.000993496272712946, 0.04353397339582443, -0.05019993707537651, 0.02447911910712719, -0.012247939594089985, -0.062081173062324524, 0.023353714495897293, -0.06105000898241997, -0.020770352333784103, 0.09274820238351822, -0.07896693795919418, -0.01725476235151291, 0.0...
-0.077635
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/v2/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/v2/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.07469204813241959, -0.04466303065419197, 0.022242115810513496, -0.01671341434121132, 0.004244165029376745, -0.09256535768508911, -0.10621826350688934, 0.04687033221125603, 0.0029727525543421507, -0.004030849318951368, 0.0010594684863463044, 0.02844269573688507, 0.03731324523687363, -0.0...
-0.026241
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/v2/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/v2/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.09183088690042496, -0.041518695652484894, 0.008118238300085068, 0.033751312643289566, -0.0586337186396122, -0.12858320772647858, -0.06124214828014374, 0.06591736525297165, -0.04923358932137489, -0.018213341012597084, 0.0696505457162857, -0.020336970686912537, 0.04745164513587952, -0.035...
0.045571
under a prefix, operational routes move with it, but discovery routes must stay at root level for RFC compliance. ### Configuration Parameters Three parameters control where routes are located and how they combine: \*\*`base\_url`\*\* tells clients where to find operational endpoints. This includes any Starlette `Mount...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.05299842357635498, -0.04787682369351387, 0.040063124150037766, -0.000534005113877356, -0.030058886855840683, -0.12113623321056366, -0.08272717893123627, 0.03436800837516785, 0.014480562880635262, -0.02295573800802231, 0.03858618810772896, 0.01575559191405773, 0.03306661918759346, 0.0687...
0.017809
For more details on OAuth authentication, see the [Authentication guide](/v2/servers/auth). ## Production Deployment ### Running with Uvicorn When deploying to production, you'll want to optimize your server for performance and reliability. Uvicorn provides several options to improve your server's capabilities: ```bash...
https://github.com/jlowin/fastmcp/blob/main//docs/v2/deployment/http.mdx
main
model-context-protocol-fastmcp
[ -0.026867523789405823, 0.04080919921398163, -0.024465855211019516, -0.017412137240171432, -0.010983631014823914, -0.10871217399835587, -0.029230104759335518, 0.04688302055001259, -0.03150761500000954, -0.0421438030898571, 0.02359021082520485, -0.03945159912109375, 0.059784628450870514, -0....
0.034843