api-auth — for Claude Code api-auth, community, for Claude Code, ide skills, ai-agents, ai-tools, bioinformatics, biomedical, citations, e-utilities

v1.0

이 스킬 정보

적합한 상황: Ideal for AI agents that need inline auth (primary pattern). 현지화된 요약: MCP server for the NCBI E-utilities API. It covers ai-agents, ai-tools, bioinformatics workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

기능

Inline auth (primary pattern)
import { tool } from '@cyanheads/mcp-ts-core';
const myTool = tool('my tool', {
input: z.object({ query: z.string().describe('Search query') }),
output: z.object({ result: z.string().describe('Search result') }),

# Core Topics

cyanheads cyanheads
[87]
[21]
Updated: 4/23/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 10/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
10/11
Quality Score
59
Canonical Locale
en
Detected Body Locale
en

적합한 상황: Ideal for AI agents that need inline auth (primary pattern). 현지화된 요약: MCP server for the NCBI E-utilities API. It covers ai-agents, ai-tools, bioinformatics workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

이 스킬을 사용하는 이유

추천 설명: api-auth helps agents inline auth (primary pattern). MCP server for the NCBI E-utilities API. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

최적의 용도

적합한 상황: Ideal for AI agents that need inline auth (primary pattern).

실행 가능한 사용 사례 for api-auth

사용 사례: Applying Inline auth (primary pattern)
사용 사례: Applying import { tool } from '@cyanheads/mcp-ts-core';
사용 사례: Applying const myTool = tool('my tool', {

! 보안 및 제한 사항

  • 제한 사항: // Only reached if caller has 'tool:my tool:read' scope
  • 제한 사항: // Continues only if scope is satisfied
  • 제한 사항: MCP AUTH SECRET KEY Yes (unless bypass) Signing secret for HS256 JWT verification. Must be ≥ 32 characters.

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is api-auth?

적합한 상황: Ideal for AI agents that need inline auth (primary pattern). 현지화된 요약: MCP server for the NCBI E-utilities API. It covers ai-agents, ai-tools, bioinformatics workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

How do I install api-auth?

Run the command: npx killer-skills add cyanheads/pubmed-mcp-server/api-auth. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for api-auth?

Key use cases include: 사용 사례: Applying Inline auth (primary pattern), 사용 사례: Applying import { tool } from '@cyanheads/mcp-ts-core';, 사용 사례: Applying const myTool = tool('my tool', {.

Which IDEs are compatible with api-auth?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for api-auth?

제한 사항: // Only reached if caller has 'tool:my tool:read' scope. 제한 사항: // Continues only if scope is satisfied. 제한 사항: MCP AUTH SECRET KEY Yes (unless bypass) Signing secret for HS256 JWT verification. Must be ≥ 32 characters..

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add cyanheads/pubmed-mcp-server/api-auth. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use api-auth immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

api-auth

MCP server for the NCBI E-utilities API. It covers ai-agents, ai-tools, bioinformatics workflows. This AI agent skill supports Claude Code, Cursor, and

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Overview

The framework handles auth at the handler factory level — tools and resources declare required scopes declaratively, and the framework enforces them before calling the handler. No try/catch or manual scope checking required for the common case.


Inline auth (primary pattern)

Declare required scopes directly on the tool or resource definition via the auth property. The handler factory checks ctx.auth.scopes against these before calling handler.

ts
1import { tool } from '@cyanheads/mcp-ts-core'; 2 3const myTool = tool('my_tool', { 4 input: z.object({ query: z.string().describe('Search query') }), 5 output: z.object({ result: z.string().describe('Search result') }), 6 auth: ['tool:my_tool:read'], 7 async handler(input, ctx) { 8 // Only reached if caller has 'tool:my_tool:read' scope 9 }, 10});

When MCP_AUTH_MODE=none, auth checks are skipped and defaults are allowed.


Dynamic auth

For runtime-computed scopes (e.g., scopes that depend on input values like a team or resource ID), use checkScopes from @cyanheads/mcp-ts-core/auth inside the handler:

ts
1import { checkScopes } from '@cyanheads/mcp-ts-core/auth'; 2 3handler: async (input, ctx) => { 4 checkScopes(ctx, [`team:${input.teamId}:write`]); 5 // Continues only if scope is satisfied 6},

Signature: checkScopes(ctx: Context, requiredScopes: string[]): void

Throws:

  • McpError(Forbidden) — auth is active and one or more required scopes are missing
  • McpError(Unauthorized) — auth is enabled but no auth context exists on the request
  • No-ops when MCP_AUTH_MODE=none

Auth modes

Set via MCP_AUTH_MODE environment variable.

ModeValueBehavior
DisablednoneNo auth enforcement. All requests allowed.
JWTjwtLocal secret verification via MCP_AUTH_SECRET_KEY. Requires explicit DEV_MCP_AUTH_BYPASS=true to bypass in development.
OAuthoauthJWKS verification against an external issuer.

JWT config

VariableRequiredPurpose
MCP_AUTH_SECRET_KEYYes (unless bypass)Signing secret for HS256 JWT verification. Must be ≥ 32 characters.
DEV_MCP_AUTH_BYPASSNoSet to true to skip JWT verification in development. Blocked in NODE_ENV=production.
DEV_MCP_CLIENT_IDNoClient ID injected when bypass is active (default: 'dev-client-id').
DEV_MCP_SCOPESNoComma-separated scopes injected when bypass is active (default: ['dev-scope']).

Important: With MCP_AUTH_MODE=jwt, a missing MCP_AUTH_SECRET_KEY is a fatal startup error unless DEV_MCP_AUTH_BYPASS=true is explicitly set. Setting DEV_MCP_AUTH_BYPASS in production (NODE_ENV=production) is rejected at config parse time.

OAuth config

VariableRequiredPurpose
OAUTH_ISSUER_URLYesToken issuer URL (used for JWKS discovery)
OAUTH_AUDIENCEYesExpected aud claim value
OAUTH_JWKS_URINoOverride JWKS endpoint (defaults to {issuer}/.well-known/jwks.json)
MCP_SERVER_RESOURCE_IDENTIFIERNoRFC 8707 resource indicator URI. When set, the OAuth strategy validates that the token's resource or aud claim matches this value — throws Forbidden on mismatch.

JWT claims mapping

ClaimJWT FieldPurpose
clientIdcid / client_idIdentifies the calling client
scopesscp / scopeSpace-separated list of granted scopes
subsubSubject (user or service identity)
tenantIdtidTenant identifier — drives ctx.state scoping

Endpoints

EndpointProtected
GET /healthzNo
GET /mcpNo
POST /mcpYes (when auth enabled)
OPTIONS /mcpYes (when auth enabled)

CORS: Set MCP_ALLOWED_ORIGINS to a comma-separated list of allowed origins, or * for open access.

Stdio mode: No HTTP auth layer. Authorization is handled entirely by the host process.


Multi-tenancy

ctx.state is automatically scoped to the current tenant — no manual key prefixing needed.

tenantId sources

TransportSourceValue
HTTP with authJWT tid claimAuto-propagated from token
StdioHardcoded default'default'

Tenant ID validation rules

  • Max 128 characters
  • Characters: alphanumeric, hyphens, underscores, dots
  • Must start and end with an alphanumeric character
  • No path traversal sequences (../)
  • No consecutive dots (..)

Using ctx.state

ts
1handler: async (input, ctx) => { 2 // Automatically scoped to ctx.tenantId — no manual prefixing 3 await ctx.state.set('item:123', { name: 'Widget', count: 42 }); 4 const item = await ctx.state.get<Item>('item:123'); 5 await ctx.state.delete('item:123'); 6 7 const page = await ctx.state.list('item:', { cursor, limit: 20 }); 8 // page: { items: Array<{ key, value }>, cursor?: string } 9},

ctx.state throws McpError(InvalidRequest) if tenantId is missing. In stdio mode, tenantId defaults to 'default' so ctx.state works without auth.


Auth context shape

Available on ctx.auth inside handlers (when auth is enabled):

ts
1interface AuthContext { 2 clientId: string; // Required — 'cid' or 'client_id' JWT claim 3 scopes: string[]; // Required — derived from 'scp' or 'scope' claim 4 sub: string; // Required — 'sub' claim; falls back to clientId when absent 5 token: string; // Required — raw JWT or OAuth bearer token string 6 tenantId?: string; // Optional — 'tid' claim; present only for multi-tenant tokens 7}

Access directly for conditional logic:

ts
1handler: async (input, ctx) => { 2 const isAdmin = ctx.auth?.scopes.includes('admin:write') ?? false; 3 // ... 4},

관련 스킬

Looking for an alternative to api-auth or another community skill for your workflow? Explore these related open-source skills.

모두 보기

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
인공지능

widget-generator

Logo of f
f

prompts.chat 피드 시스템을 위한 사용자 지정 가능한 위젯 플러그인을 생성합니다

149.6k
0
인공지능

flags

Logo of vercel
vercel

리액트 프레임워크

138.4k
0
브라우저

pr-review

Logo of pytorch
pytorch

파이썬에서 텐서와 동적 신경망 구현 및 강력한 GPU 가속 지원

98.6k
0
개발자