MCP Server
localskills.sh provides a Model Context Protocol (MCP) server that lets AI agents discover, read, and author skills without leaving their workflow. Any MCP-compatible client — Claude Code, Cursor, Windsurf, and others — can connect directly.
Server endpoint
The MCP server is available at:
https://localskills.sh/mcp/mcpIt uses the Streamable HTTP transport (stateless mode). Each request is independent — no session management required.
Authentication
The MCP server supports OAuth 2.0 Device Authorization Grant (RFC 8628) for interactive login, and Bearer token authentication for headless access.
Most MCP clients handle OAuth automatically. When you first connect, the client will show a user code and a URL to visit in your browser. Approve the code, and the client receives a token.
The OAuth discovery endpoint is at:
https://localskills.sh/mcp/.well-known/oauth-authorization-serverYou can also use an existing API token by passing it as a Bearer token in the Authorization header. See API Tokens for details on creating tokens.
Client setup
Claude Code — Add the server via the CLI:
claude mcp add localskills --transport http https://localskills.sh/mcp/mcpCursor — Add to your .cursor/mcp.json:
{
"mcpServers": {
"localskills": {
"url": "https://localskills.sh/mcp/mcp"
}
}
}For other MCP-compatible clients, point the Streamable HTTP transport to https://localskills.sh/mcp/mcp. The server will handle OAuth automatically if your client supports it.
Available tools
The MCP server exposes four tools that agents can call:
search_skills
Search for skills and rules on localskills.sh. Returns matching skills with metadata including name, description, tags, version, and author.
| Flag | Description |
|---|---|
query | Search text to match against name, description, and tags |
type | Filter by "skill" or "rule" |
tag | Filter by a specific tag |
limit | Max results, 1–50 (default 20) |
get_skill_content
Fetch the full content of a skill by slug. Returns the skill text or package manifest. Supports exact semver, semver ranges, and integer version numbers.
| Flag | Description |
|---|---|
slug | The skill slug (required) |
version | Version: exact semver (1.2.3), range (^1.0.0), or integer |
create_skill
Create a new skill on localskills.sh. Requires authentication. The skill is published under the specified team.
| Flag | Description |
|---|---|
name | Skill name, 1–100 characters (required) |
content | Skill content in markdown (required) |
tenantId | Team ID to create the skill under (required) |
type | "skill" or "rule" (default: skill) |
visibility | "public", "private", or "unlisted" (default: private) |
tags | Up to 10 tags |
description | Short description |
publish_version
Publish a new version of an existing skill. Requires authentication. Auto-bumps the patch version by default, or you can specify an explicit semver or bump type.
| Flag | Description |
|---|---|
slug | Skill slug (required) |
content | New content for this version (required) |
semver | Explicit semver (must be greater than current) |
bump | Auto-bump: "major", "minor", or "patch" (default: patch) |
message | Version message / changelog |
Resources
The server also provides MCP resources for browsing skills:
localskills://skills — Lists all accessible skills with metadata (slug, name, description, type, semver). Includes public skills and team-private skills you have access to.
localskills://skills/{slug} — Returns the full content of an individual skill. Agents can browse the list, then read individual skills to inject content into their context.
Dynamic skill loading
Agents can discover and load skills on the fly during a conversation. This is useful when an agent encounters a task it doesn't have instructions for — it can search localskills.sh, pull in the relevant skill, and continue without interruption.
Example workflow — An agent is asked to write a Next.js API route. It searches for relevant skills, finds one with best practices, and injects it into context:
// 1. Agent calls search_skills
search_skills({ query: "next.js api routes", type: "skill", limit: 5 })
// 2. Agent picks the best match and fetches its content
get_skill_content({ slug: "nextjs-api-patterns" })
// 3. The skill content is now in the agent's context
// and it follows the instructions while writing codeBecause MCP tools are native to the agent's runtime, this happens seamlessly. The agent decides when to search, what to load, and how to apply the instructions — no manual intervention needed.
Loading skills on boot
You can configure your agent to automatically load skills from localskills.sh when a session starts. This is done by adding instructions to your project's agent configuration file — AGENTS.md, CLAUDE.md, .cursorrules, or equivalent.
CLAUDE.md example — Add this to your project's CLAUDE.md to have Claude Code load skills at the start of every session:
# Skills
At the start of each session, use the localskills MCP server to load
the following skills into context:
- `nextjs-api-patterns` — Follow these patterns for all API routes
- `drizzle-d1-guide` — Reference for database queries
- `testing-conventions` — Standards for writing tests
To load a skill, call get_skill_content with the slug above.
If you need additional skills for a task, search localskills.sh first.AGENTS.md example — For multi-agent setups, you can scope skills to specific agent roles:
# Agent Skills
## All agents
Load these skills from localskills.sh via MCP at session start:
- `code-review-checklist` — Apply during all code reviews
- `security-rules` — Enforce on every change
## Frontend agent
Additionally load:
- `react-component-patterns` — Component architecture guidelines
- `tailwind-conventions` — Styling standards
## Backend agent
Additionally load:
- `api-design-guide` — REST API conventions
- `error-handling-patterns` — Error handling standards.cursorrules example — Cursor users can add MCP skill loading to their project rules:
You have access to the localskills MCP server.
At the start of each conversation, load these skills:
1. Call get_skill_content({ slug: "react-component-patterns" })
2. Call get_skill_content({ slug: "typescript-strict-mode" })
Follow the loaded skill instructions for all code you write.
When asked about an unfamiliar topic, search localskills.sh
for relevant skills before answering.This pattern lets teams maintain a shared set of coding standards, patterns, and guidelines that every agent session picks up automatically. Update a skill on localskills.sh and every agent gets the latest version on their next session — no reinstall needed.
search_skills for on-demand discovery during the session.Read-your-writes consistency
The MCP server uses Cloudflare D1 with read replicas for low-latency reads. To ensure consistency after writes, the server returns an x-d1-bookmark response header. Clients that send this header back on subsequent requests are guaranteed to see their own writes.
Health check
Verify the server is running:
curl https://localskills.sh/mcp/healthReturns {"status":"ok"} when healthy.