Mcp Auth Fetch — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Auth Fetch (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
mcp-auth-fetch is a powerful and flexible package designed to simplify HTTP/HTTPS requests by automatically applying authentication credentials based on configurable rules.
It acts as a seamless proxy for your fetch calls, finding the correct authentication method for a given URL, and attaching the necessary headers or parameters.
{
"mcpServers": {
"mcp-auth-fetch": {
"command": "npx",
"args": ["mcp-auth-fetch"]
}
}
}This package is designed to be used as a plugin within an MCP (Model-Centric Programming) environment. Once the package is installed, it exposes its functions as tools that can be called from a compatible MCP client.
#### Tool: fetch_url
Fetches a URL, automatically applying the authentication configured in .mcp-auth-fetch.json.
Parameters:
--url (required): The URL to fetch.--method (optional): The HTTP method (e.g., GET, POST). Defaults to GET.--headers (optional): A JSON string of custom headers.--body (optional): The request body for POST, PUT, etc.--timeout (optional): A request-specific timeout in milliseconds.#### Tool: test_auth
Tests your configuration by finding which rule matches a given domain and returns the result as a JSON string.
The power of this tool lies in its configuration file. Create a file named .mcp-auth-fetch.json in your project's root directory or your home directory.
{
"global_settings": {
"default_timeout": 15000,
"user_agent": "MyAwesomeApp/1.0"
},
"auth_rules": [
{
"url_pattern": "api.github.com",
"description": "GitHub API",
"auth": {
"type": "bearer",
"token": "${GITHUB_TOKEN}"
}
},
{
"url_pattern": "*.openai.com",
"description": "OpenAI API",
"auth": {
"type": "api_key",
"in": "header",
"key": "Authorization",
"value": "Bearer ${OPENAI_API_KEY}"
}
},
{
"url_pattern": "internal-api.my-company.com",
"description": "Internal Basic Auth API",
"auth": {
"type": "basic",
"username": "${INTERNAL_USER}",
"password": "${INTERNAL_PASS}"
}
},
{
"url_pattern": "legacy.example.com",
"description": "Legacy Cookie Auth",
"auth": {
"type": "cookie",
"cookies": {
"session_id": "abc-123-def-456",
"user_token": "${LEGACY_USER_TOKEN}"
}
}
},
{
"url_pattern": "auth-server.my-company.com",
"description": "OAuth2 Client Credentials",
"auth": {
"type": "oauth2",
"token_url": "https://auth-server.my-company.com/oauth/token",
"client_id": "${OAUTH_CLIENT_ID}",
"client_secret": "${OAUTH_CLIENT_SECRET}",
"scope": "api:read"
}
},
{
"url_pattern": "another-service.com",
"description": "OAuth2 with Refresh Token",
"auth": {
"type": "oauth2",
"token_url": "https://another-service.com/api/token",
"client_id": "${SERVICE_CLIENT_ID}",
"client_secret": "${SERVICE_CLIENT_SECRET}",
"refresh_token": "${SERVICE_REFRESH_TOKEN}"
}
},
{
"url_pattern": "/api\\.special\\.com/",
"description": "A special API requiring regex matching",
"auth": {
"type": "bearer",
"token": "${SPECIAL_TOKEN}"
},
"enabled": true
}
]
}default_timeout: Default request timeout in milliseconds.user_agent: A custom User-Agent string.verbose_test_auth: Set to true to show the full, unmasked authentication details in the test_auth output. Defaults to false, which masks sensitive information for security.url_pattern: The URL pattern to match against the domain of the request URL.api.service.com*.service.com/api\\.service\\.(com|org)/ (Note: Regex must be a string starting and ending with /)description (optional): A human-readable description of the rule.enabled (optional): Set to false to disable a rule. Defaults to true.auth: An object describing the authentication method.type: One of bearer, api_key, basic, cookie, oauth2, function.{ "type": "bearer", "token": "..." }{ "type": "api_key", "in": "header"|"query", "key": "...", "value": "..." }{ "type": "basic", "username": "...", "password": "..." }{ "type": "cookie", "cookies": { "key1": "value1", ... } }{ "type": "oauth2", "token_url": "...", "client_id": "...", "client_secret": "...", "scope": "(optional)", "refresh_token": "(optional)" }.mcp-auth-fetch.js config file. The value is a function that returns headers or a bearer token. { "type": "function", "function": () => ({ "Authorization": "Bearer ..." }) }For security, you can store secrets in environment variables and reference them in your config file using the ${VAR_NAME} syntax. The tool will automatically substitute them at runtime.
To contribute or run this project locally:
npm installnpm testnpm run build~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.