mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 05:54:19 +02:00
feat: introduce fastmcp.json configuration system (#1517)
This commit is contained in:
parent
108ad4b70d
commit
2d3d5392f1
40 changed files with 3917 additions and 108 deletions
|
|
@ -81,17 +81,22 @@ fastmcp install claude-code server.py --with-requirements requirements.txt
|
|||
fastmcp install claude-code server.py --with-editable ./my-local-package
|
||||
```
|
||||
|
||||
Alternatively, you can specify dependencies directly in your server code:
|
||||
Alternatively, you can use a `fastmcp.json` configuration file (recommended):
|
||||
|
||||
```python server.py
|
||||
from fastmcp import FastMCP
|
||||
|
||||
mcp = FastMCP(
|
||||
name="Dice Roller",
|
||||
dependencies=["pandas", "requests"]
|
||||
)
|
||||
```json fastmcp.json
|
||||
{
|
||||
"$schema": "https://gofastmcp.com/schemas/fastmcp_config/v1.json",
|
||||
"entrypoint": {
|
||||
"file": "server.py",
|
||||
"object": "mcp"
|
||||
},
|
||||
"environment": {
|
||||
"dependencies": ["pandas", "requests"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### Python Version and Project Configuration
|
||||
|
||||
Control the Python environment for your server with these options:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue