MCP Server Integration (agentskills-mcp-server)¶
Serves skills as MCP tools/resources.
pip install agentskills-mcp-server
agentskills_mcp_server ¶
MCP server integration for Agent Skills.
This package bridges :mod:agentskills_core and the Model Context
Protocol <https://modelcontextprotocol.io>_, providing:
- :func:
create_mcp_server-- builds an MCP server from a :class:~agentskills_core.SkillRegistry. Useful when you have custom providers or need full control over registration. - CLI entry-point (
python -m agentskills_mcp_server --config server.json) for zero-code server startup.
Quick start (programmatic)::
from agentskills_core import SkillRegistry
from agentskills_mcp_server import create_mcp_server
registry = SkillRegistry()
await registry.register("incident-response", my_custom_provider)
server = create_mcp_server(registry, name="My Agent")
server.run() # stdio by default
CLI::
python -m agentskills_mcp_server --config server.json
Install::
pip install agentskills-mcp-server
__getattr__ ¶
__getattr__(name: str) -> object
Lazy-load optional extras to avoid hard dependencies at import time.
create_mcp_server ¶
create_mcp_server(registry: SkillRegistry, *, name: str, instructions: str | None = None, max_inline_binary_bytes: int = DEFAULT_MAX_INLINE_BINARY_BYTES, fast_path: FastPath | None = None, vision: bool = False, max_inline_image_bytes: int = DEFAULT_MAX_INLINE_IMAGE_BYTES) -> FastMCP
Build an MCP server that exposes an Agent Skills registry.
The returned server (FastMCP on SDK 1.x, MCPServer on SDK 2.x) is
transport-agnostic. Call server.run() to start with the
default stdio transport, or server.run(transport="streamable-http")
for HTTP.
Tools let the LLM agent read skill content (metadata, body, references, scripts, assets). Resources provide the skill catalog and usage instructions for system-prompt injection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
registry
|
SkillRegistry
|
The :class: |
required |
name
|
str
|
Display name for the MCP server. Clients see this during the MCP initialization handshake. Required. |
required |
instructions
|
str | None
|
Optional server-level instructions sent to the MCP client during initialization. Use this to describe the server's purpose or capabilities. |
None
|
max_inline_binary_bytes
|
int
|
Size ceiling for inlining binary
resources as base64. Larger resources are described but
not returned. See
:func: |
DEFAULT_MAX_INLINE_BINARY_BYTES
|
fast_path
|
FastPath | None
|
A :class: |
None
|
vision
|
bool
|
When |
False
|
max_inline_image_bytes
|
int
|
Size ceiling for native images. Only
consulted when |
DEFAULT_MAX_INLINE_IMAGE_BYTES
|
Returns:
| Type | Description |
|---|---|
MCPServer
|
A configured server from the installed MCP SDK, ready for |
MCPServer
|
|