Small Clean-up (#2247)

* Project Clean-up

* Move pytest-asyncio to dev dependencies and update agents.md
This commit is contained in:
William Easton 2025-10-24 18:11:01 -05:00 committed by GitHub
commit c002bc389c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 7 deletions

View file

@ -24,7 +24,7 @@ uv run pytest # Run full test suite
| ------------------ | --------------------------------------------------- |
| `src/fastmcp/` | Library source code (Python ≥ 3.10) |
| `├─server/` | Server implementation, `FastMCP`, auth, networking |
| `│ ├─auth/` | Authentication providers (Bearer, JWT, WorkOS) |
| `│ ├─auth/` | Authentication providers (Google, GitHub, Azure, AWS, WorkOS, Auth0, JWT, and more) |
| `│ └─middleware/` | Error handling, logging, rate limiting |
| `├─client/` | High-level client SDK + transports |
| `│ └─auth/` | Client authentication (Bearer, OAuth) |
@ -262,4 +262,4 @@ uv sync # Installs all deps including dev tools
1. **Dependencies**: Always `uv sync` first
2. **Pre-commit fails**: Run `uv run pre-commit run --all-files` to see failures
3. **Type errors**: Use `uv run ty check` directly, check `pyproject.toml` config
4. **Test timeouts**: Default 3s - optimize or mark as integration tests
4. **Test timeouts**: Default 5s - optimize or mark as integration tests

View file

@ -211,7 +211,6 @@ Access MCP session capabilities within your tools, resources, or prompts by addi
- **Logging:** Log messages to MCP clients with `ctx.info()`, `ctx.error()`, etc.
- **LLM Sampling:** Use `ctx.sample()` to request completions from the client's LLM.
- **HTTP Request:** Use `ctx.http_request()` to make HTTP requests to other servers.
- **Resource Access:** Use `ctx.read_resource()` to access resources on the server
- **Progress Reporting:** Use `ctx.report_progress()` to report progress to the client.
- and more...
@ -321,7 +320,7 @@ FastMCP provides comprehensive authentication support that sets it apart from ba
Protecting a server takes just two lines:
```python
from fastmcp.server.auth import GoogleProvider
from fastmcp.server.auth.providers.google import GoogleProvider
auth = GoogleProvider(client_id="...", client_secret="...", base_url="https://myserver.com")
mcp = FastMCP("Protected Server", auth=auth)

View file

@ -18,7 +18,6 @@ dependencies = [
"openapi-core>=0.19.5",
"py-key-value-aio[disk,keyring,memory]>=0.2.6,<0.3.0",
"websockets>=15.0.1",
"pytest-asyncio>=1.2.0",
]
requires-python = ">=3.10"
@ -41,6 +40,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
@ -61,6 +61,7 @@ dev = [
"pyinstrument>=5.0.2",
"pyperclip>=1.9.0",
"pytest>=8.3.3",
"pytest-asyncio>=1.2.0",
"pytest-cov>=6.1.1",
"pytest-env>=1.1.5",
"pytest-flakefinder",

View file

@ -217,7 +217,6 @@ class TestAzureProvider:
# Scopes should be prefixed with identifier_uri
assert verifier.required_scopes == ["api://my-api/.default"]
@pytest.mark.asyncio
async def test_authorize_filters_resource_and_accepts_prefixed_scopes(self):
"""authorize() should drop resource parameter and accept prefixed scopes from clients."""
provider = AzureProvider(
@ -272,7 +271,6 @@ class TestAzureProvider:
# Azure provider filters resource parameter (not stored in transaction)
assert transaction.resource is None
@pytest.mark.asyncio
async def test_authorize_appends_additional_scopes(self):
"""authorize() should append additional_authorize_scopes to the authorization request."""
provider = AzureProvider(