Skip to content

Commit c4334d3

Browse files
authored
chore: polish repo (#5)
1 parent fd60ed8 commit c4334d3

File tree

4 files changed

+66
-5
lines changed

4 files changed

+66
-5
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Silverhand, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
11
# MCP Auth Python SDK
2+
3+
[![GitHub branch check runs](https://img.shields.io/github/check-runs/mcp-auth/python/master)](https://github.com/mcp-auth/python/actions?query=branch%3Amaster)
4+
[![codecov](https://codecov.io/gh/mcp-auth/python/graph/badge.svg?token=JXZ4C50SCV)](https://codecov.io/gh/mcp-auth/python)
5+
[![Stable Version](https://img.shields.io/pypi/v/mcp-auth?label=stable)][PyPI Releases]
6+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mcp-auth)][PyPI]
7+
[![PyPI - License](https://img.shields.io/pypi/l/mcp-auth)](https://github.com/mcp-auth/python/blob/master/LICENSE)
8+
9+
[Website]: https://mcp-auth.dev/
10+
[PyPI]: https://pypi.org/project/mcp-auth/
11+
[PyPI Releases]: https://pypi.org/project/mcp-auth/#history
12+
13+
The MCP specification [requires OAuth 2.1 and other RFCs](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) to be implemented for authorization. MCP Auth aims to connect your MCP server to **any** compatible OAuth 2 or OpenID Connect provider, without spending hours on lengthy implementations.
14+
15+
## Get started
16+
17+
### Is my provider supported?
18+
19+
Check out the [MCP-compatible providers](https://mcp-auth.dev/docs/providers-list) to see which providers are supported. It also includes a tool for real-time checking of provider compatibility.
20+
21+
### Installation
22+
23+
```bash
24+
pip install mcp-auth
25+
```
26+
27+
Or use your package manager of choice, such as `poetry` or `uv`.
28+
29+
See [the documentation](https://mcp-auth.dev/docs/get-started) for the full guide.
30+
31+
## Join the discussion
32+
33+
Join the [MCP Auth org discussion](https://github.com/orgs/mcp-auth/discussions) to ask questions or share your feedback.

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
[project]
22
name = "mcpauth"
33
version = "0.0.0"
4-
description = "Connect your MCP server to any eligible OAuth 2 or OpenID Connect provider"
4+
description = "Plug-and-play auth for Python MCP servers."
55
authors = [{ name = "Silverhand Inc.", email = "[email protected]" }]
66
readme = "README.md"
77
requires-python = ">=3.9"
8-
license = { text = "MIT" }
8+
license = "MIT"
99
keywords = [
1010
"authentication",
1111
"authorization",
1212
"mcp",
13+
"modelcontextprotocol",
1314
"oauth2",
1415
"openid-connect",
16+
"oidc",
1517
]
1618
dependencies = [
1719
"pydantic>=2.11.3",
@@ -38,3 +40,6 @@ dev = [
3840
[tool.coverage.run]
3941
branch = true
4042
source = ["mcpauth"]
43+
44+
[tool.setuptools]
45+
packages = ["mcpauth"]

samples/server/starlette.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
from starlette.middleware import Middleware
77
from starlette.responses import JSONResponse
88
from starlette.requests import Request
9+
import os
10+
11+
MCP_AUTH_ISSUER = (
12+
os.getenv("MCP_AUTH_ISSUER") or "https://replace-with-your-issuer-url.com"
13+
)
914

1015
mcpAuth = MCPAuth(
11-
MCPAuthConfig(
12-
server=fetch_server_config("https://auth.logto.io/oidc", AuthServerType.OIDC)
13-
)
16+
MCPAuthConfig(server=fetch_server_config(MCP_AUTH_ISSUER, AuthServerType.OIDC))
1417
)
1518

1619
protected_app = Starlette(

0 commit comments

Comments
 (0)