Update environment note (#1075)

* Update environment note

* Update memory.py
This commit is contained in:
Jeremiah Lowin 2025-07-07 13:44:19 -04:00 committed by GitHub
commit 45c4ceb1bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View file

@ -2,7 +2,7 @@ fail_fast: false
repos:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
rev: v0.24.1
hooks:
- id: validate-pyproject
@ -14,10 +14,10 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.4
rev: v0.12.1
hooks:
# Run the linter.
- id: ruff
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format

View file

@ -160,7 +160,7 @@ fastmcp install cursor server.py
fastmcp install mcp-json server.py
```
Note that for security reasons, MCP clients run every server in a completely isolated environment. Therefore, all dependencies must be explicitly specified using the `--with` and/or `--with-editable` options (following `uv` conventions) or by attaching them to your server in code via the `dependencies` parameter.
Note that for security reasons, MCP clients usually run every server in a completely isolated environment. Therefore, all dependencies must be explicitly specified using the `--with` and/or `--with-editable` options (following `uv` conventions) or by attaching them to your server in code via the `dependencies` parameter. You should not assume that the MCP server will have access to your local environment.
<Warning>
**`uv` must be installed and available in your system PATH**. Both Claude Desktop and Cursor run in isolated environments and need `uv` to manage dependencies. On macOS, install `uv` globally with Homebrew for Claude Desktop compatibility: `brew install uv`.

View file

@ -15,7 +15,7 @@ import os
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
from typing import Annotated, Self
from typing import Annotated, Any, Self
import asyncpg
import numpy as np
@ -60,12 +60,12 @@ def cosine_similarity(a: list[float], b: list[float]) -> float:
)
async def do_ai[T](
async def do_ai(
user_prompt: str,
system_prompt: str,
result_type: type[T] | Annotated,
result_type: type | Annotated,
deps=None,
) -> T:
) -> Any:
agent = Agent(
DEFAULT_LLM_MODEL,
system_prompt=system_prompt,