Skip to content

Commit 0a95397

Browse files
committed
merge with recent branch
1 parent 75ca216 commit 0a95397

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

README.md

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
- [Completions](#completions)
3434
- [Elicitation](#elicitation)
3535
- [Authentication](#authentication)
36-
- [Token Introspection](#token-introspection)
3736
- [Running Your Server](#running-your-server)
3837
- [Development Mode](#development-mode)
3938
- [Claude Desktop Integration](#claude-desktop-integration)
@@ -45,8 +44,6 @@
4544
- [Advanced Usage](#advanced-usage)
4645
- [Low-Level Server](#low-level-server)
4746
- [Writing MCP Clients](#writing-mcp-clients)
48-
- [OAuth Authentication for Clients](#oauth-authentication-for-clients)
49-
- [Client Credentials Grant](#client-credentials-grant)
5047
- [MCP Primitives](#mcp-primitives)
5148
- [Server Capabilities](#server-capabilities)
5249
- [Documentation](#documentation)
@@ -463,39 +460,6 @@ For a complete example with separate Authorization Server and Resource Server im
463460

464461
See [TokenVerifier](src/mcp/server/auth/provider.py) for more details on implementing token validation.
465462

466-
### Token Introspection
467-
468-
The SDK provides `IntrospectionTokenVerifier` for servers that validate
469-
tokens via an OAuth 2.0 introspection endpoint. This verifier performs
470-
an HTTP POST to the configured endpoint and checks the returned token
471-
metadata. When combined with the `--oauth-strict` flag in the example
472-
server, it also enforces RFC 8707 resource validation.
473-
474-
```python
475-
from examples.servers.simple_auth.token_verifier import IntrospectionTokenVerifier
476-
from mcp.server.fastmcp import FastMCP
477-
from mcp.server.auth.settings import AuthSettings
478-
479-
verifier = IntrospectionTokenVerifier(
480-
introspection_endpoint="http://localhost:9000/introspect",
481-
server_url="http://localhost:8001",
482-
validate_resource=True, # same as --oauth-strict
483-
)
484-
485-
app = FastMCP(
486-
"MCP Resource Server",
487-
token_verifier=verifier,
488-
auth=AuthSettings(
489-
issuer_url="http://localhost:9000",
490-
resource_server_url="http://localhost:8001",
491-
required_scopes=["mcp:read"],
492-
),
493-
)
494-
```
495-
496-
See [`examples/servers/simple-auth/`](examples/servers/simple-auth/) for a full
497-
demonstration.
498-
499463
## Running Your Server
500464

501465
### Development Mode
@@ -1125,30 +1089,6 @@ async def main():
11251089

11261090
For a complete working example, see [`examples/clients/simple-auth-client/`](examples/clients/simple-auth-client/).
11271091

1128-
### Client Credentials Grant
1129-
1130-
Machine clients that do not require a user interaction can authenticate using
1131-
the OAuth2 *client credentials* grant. Use `ClientCredentialsProvider` to
1132-
obtain and refresh access tokens automatically.
1133-
1134-
```python
1135-
from mcp.client.auth import ClientCredentialsProvider, OAuthClientMetadata
1136-
1137-
auth = ClientCredentialsProvider(
1138-
server_url="https://api.example.com",
1139-
client_metadata=OAuthClientMetadata(
1140-
client_name="My Machine Client",
1141-
grant_types=["client_credentials"],
1142-
),
1143-
storage=CustomTokenStorage(),
1144-
)
1145-
```
1146-
1147-
`TokenExchangeProvider` builds on this to implement the RFC 8693
1148-
`token_exchange` grant when you need to exchange an existing user token for an
1149-
MCP token.
1150-
1151-
11521092
### MCP Primitives
11531093

11541094
The MCP protocol defines three core primitives that servers can implement:

0 commit comments

Comments
 (0)