[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FDR7R04AC1C8WDT2NMCBQ":3,"skill-same:01M71FDR7R04AC1C8WDT2NMCBQ":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":13,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":61,"install":62,"resources":75},"01M71FDR7R04AC1C8WDT2NMCBQ","native-mcp",null,"Built-in MCP (Model Context Protocol) client that connects to external MCP servers, discovers their tools, and registers them as native YOUSEF SHTIWE tools. Supports stdio and HTTP transports with automatic reconnection, security filtering, and zero-config tool injection.","gjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6","gjbvsjjvgm-sketch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F278511911?v=4","01M71F3JXKZQ70H2KCHHTXKZDA","01M71F3JY8A79Z3NZBW08TF4JD",0,"MIT","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002F.yousef\u002Fskills\u002Fmcp\u002Fnative-mcp\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"native","native mcp","MCP","servers","protocol","with","http","filtering","tool","ZeRO","integrations","as","context","Tools","security","injection","automatic","config","model context protocol","model","2026-11-10 10:12:30",false,"---\nname: native-mcp\ndescription: Built-in MCP (Model Context Protocol) client that connects to external MCP servers, discovers their tools, and registers them as native YOUSEF SHTIWE tools. Supports stdio and HTTP transports with automatic reconnection, security filtering, and zero-config tool injection.\nversion: 1.0.0\nauthor: YOUSEF SHTIWE\nlicense: MIT\nmetadata:\n  hermes:\n    tags: [MCP, Tools, Integrations]\n    related_skills: [mcporter]\n---\n\n# Native MCP Client\n\nYOUSEF SHTIWE has a built-in MCP client that connects to MCP servers at startup, discovers their tools, and makes them available as first-class tools the agent can call directly. No bridge CLI needed -- tools from MCP servers appear alongside built-in tools like `terminal`, `read_file`, etc.\n\n## When to Use\n\nUse this whenever you want to:\n- Connect to MCP servers and use their tools from within YOUSEF SHTIWE\n- Add external capabilities (filesystem access, GitHub, databases, APIs) via MCP\n- Run local stdio-based MCP servers (npx, uvx, or any command)\n- Connect to remote HTTP\u002FStreamableHTTP MCP servers\n- Have MCP tools auto-discovered and available in every conversation\n\nFor ad-hoc, one-off MCP tool calls from the terminal without configuring anything, see the `mcporter` skill instead.\n\n## Prerequisites\n\n- **mcp Python package** -- optional dependency; install with `pip install mcp`. If not installed, MCP support is silently disabled.\n- **Node.js** -- required for `npx`-based MCP servers (most community servers)\n- **uv** -- required for `uvx`-based MCP servers (Python-based servers)\n\nInstall the MCP SDK:\n\n```bash\npip install mcp\n# or, if using uv:\nuv pip install mcp\n```\n\n## Quick Start\n\nAdd MCP servers to `~\u002F.yousef\u002Fconfig.yaml` under the `mcp_servers` key:\n\n```yaml\nmcp_servers:\n  time:\n    command: \"uvx\"\n    args: [\"mcp-server-time\"]\n```\n\nRestart YOUSEF SHTIWE. On startup it will:\n1. Connect to the server\n2. Discover available tools\n3. Register them with the prefix `mcp_time_*`\n4. Inject them into all platform toolsets\n\nYou can then use the tools naturally -- just ask the agent to get the current time.\n\n## Configuration Reference\n\nEach entry under `mcp_servers` is a server name mapped to its config. There are two transport types: **stdio** (command-based) and **HTTP** (url-based).\n\n### Stdio Transport (command + args)\n\n```yaml\nmcp_servers:\n  server_name:\n    command: \"npx\"             # (required) executable to run\n    args: [\"-y\", \"pkg-name\"]   # (optional) command arguments, default: []\n    env:                       # (optional) environment variables for the subprocess\n      SOME_API_KEY: \"value\"\n    timeout: 120               # (optional) per-tool-call timeout in seconds, default: 120\n    connect_timeout: 60        # (optional) initial connection timeout in seconds, default: 60\n```\n\n### HTTP Transport (url)\n\n```yaml\nmcp_servers:\n  server_name:\n    url: \"https:\u002F\u002Fmy-server.example.com\u002Fmcp\"   # (required) server URL\n    headers:                                     # (optional) HTTP headers\n      Authorization: \"Bearer sk-...\"\n    timeout: 180               # (optional) per-tool-call timeout in seconds, default: 120\n    connect_timeout: 60        # (optional) initial connection timeout in seconds, default: 60\n```\n\n### All Config Options\n\n| Option            | Type   | Default | Description                                       |\n|-------------------|--------|---------|---------------------------------------------------|\n| `command`         | string | --      | Executable to run (stdio transport, required)     |\n| `args`            | list   | `[]`    | Arguments passed to the command                   |\n| `env`             | dict   | `{}`    | Extra environment variables for the subprocess    |\n| `url`             | string | --      | Server URL (HTTP transport, required)             |\n| `headers`         | dict   | `{}`    | HTTP headers sent with every request              |\n| `timeout`         | int    | `120`   | Per-tool-call timeout in seconds                  |\n| `connect_timeout` | int    | `60`    | Timeout for initial connection and discovery      |\n\nNote: A server config must have either `command` (stdio) or `url` (HTTP), not both.\n\n## How It Works\n\n### Startup Discovery\n\nWhen YOUSEF SHTIWE starts, `discover_mcp_tools()` is called during tool initialization:\n\n1. Reads `mcp_servers` from `~\u002F.yousef\u002Fconfig.yaml`\n2. For each server, spawns a connection in a dedicated background event loop\n3. Initializes the MCP session and calls `list_tools()` to discover available tools\n4. Registers each tool in the Hermes tool registry\n\n### Tool Naming Convention\n\nMCP tools are registered with the naming pattern:\n\n```\nmcp_{server_name}_{tool_name}\n```\n\nHyphens and dots in names are replaced with underscores for LLM API compatibility.\n\nExamples:\n- Server `filesystem`, tool `read_file` → `mcp_filesystem_read_file`\n- Server `github`, tool `list-issues` → `mcp_github_list_issues`\n- Server `my-api`, tool `fetch.data` → `mcp_my_api_fetch_data`\n\n### Auto-Injection\n\nAfter discovery, MCP tools are automatically injected into all `hermes-*` platform toolsets (CLI, Discord, Telegram, etc.). This means MCP tools are available in every conversation without any additional configuration.\n\n### Connection Lifecycle\n\n- Each server runs as a long-lived asyncio Task in a background daemon thread\n- Connections persist for the lifetime of the agent process\n- If a connection drops, automatic reconnection with exponential backoff kicks in (up to 5 retries, max 60s backoff)\n- On agent shutdown, all connections are gracefully closed\n\n### Idempotency\n\n`discover_mcp_tools()` is idempotent -- calling it multiple times only connects to servers that aren't already connected. Failed servers are retried on subsequent calls.\n\n## Transport Types\n\n### Stdio Transport\n\nThe most common transport. Hermes launches the MCP server as a subprocess and communicates over stdin\u002Fstdout.\n\n```yaml\nmcp_servers:\n  filesystem:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fhome\u002Fuser\u002Fprojects\"]\n```\n\nThe subprocess inherits a **filtered** environment (see Security section below) plus any variables you specify in `env`.\n\n### HTTP \u002F StreamableHTTP Transport\n\nFor remote or shared MCP servers. Requires the `mcp` package to include HTTP client support (`mcp.client.streamable_http`).\n\n```yaml\nmcp_servers:\n  remote_api:\n    url: \"https:\u002F\u002Fmcp.example.com\u002Fmcp\"\n    headers:\n      Authorization: \"Bearer sk-...\"\n```\n\nIf HTTP support is not available in your installed `mcp` version, the server will fail with an ImportError and other servers will continue normally.\n\n## Security\n\n### Environment Variable Filtering\n\nFor stdio servers, Hermes does NOT pass your full shell environment to MCP subprocesses. Only safe baseline variables are inherited:\n\n- `PATH`, `HOME`, `USER`, `LANG`, `LC_ALL`, `TERM`, `SHELL`, `TMPDIR`\n- Any `XDG_*` variables\n\nAll other environment variables (API keys, tokens, secrets) are excluded unless you explicitly add them via the `env` config key. This prevents accidental credential leakage to untrusted MCP servers.\n\n```yaml\nmcp_servers:\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-github\"]\n    env:\n      # Only this token is passed to the subprocess\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"ghp_...\"\n```\n\n### Credential Stripping in Error Messages\n\nIf an MCP tool call fails, any credential-like patterns in the error message are automatically redacted before being shown to the LLM. This covers:\n\n- GitHub PATs (`ghp_...`)\n- OpenAI-style keys (`sk-...`)\n- Bearer tokens\n- Generic `token=`, `key=`, `API_KEY=`, `password=`, `secret=` patterns\n\n## Troubleshooting\n\n### \"MCP SDK not available -- skipping MCP tool discovery\"\n\nThe `mcp` Python package is not installed. Install it:\n\n```bash\npip install mcp\n```\n\n### \"No MCP servers configured\"\n\nNo `mcp_servers` key in `~\u002F.yousef\u002Fconfig.yaml`, or it's empty. Add at least one server.\n\n### \"Failed to connect to MCP server 'X'\"\n\nCommon causes:\n- **Command not found**: The `command` binary isn't on PATH. Ensure `npx`, `uvx`, or the relevant command is installed.\n- **Package not found**: For npx servers, the npm package may not exist or may need `-y` in args to auto-install.\n- **Timeout**: The server took too long to start. Increase `connect_timeout`.\n- **Port conflict**: For HTTP servers, the URL may be unreachable.\n\n### \"MCP server 'X' requires HTTP transport but mcp.client.streamable_http is not available\"\n\nYour `mcp` package version doesn't include HTTP client support. Upgrade:\n\n```bash\npip install --upgrade mcp\n```\n\n### Tools not appearing\n\n- Check that the server is listed under `mcp_servers` (not `mcp` or `servers`)\n- Ensure the YAML indentation is correct\n- Look at YOUSEF SHTIWE startup logs for connection messages\n- Tool names are prefixed with `mcp_{server}_{tool}` -- look for that pattern\n\n### Connection keeps dropping\n\nThe client retries up to 5 times with exponential backoff (1s, 2s, 4s, 8s, 16s, capped at 60s). If the server is fundamentally unreachable, it gives up after 5 attempts. Check the server process and network connectivity.\n\n## Examples\n\n### Time Server (uvx)\n\n```yaml\nmcp_servers:\n  time:\n    command: \"uvx\"\n    args: [\"mcp-server-time\"]\n```\n\nRegisters tools like `mcp_time_get_current_time`.\n\n### Filesystem Server (npx)\n\n```yaml\nmcp_servers:\n  filesystem:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fhome\u002Fuser\u002Fdocuments\"]\n    timeout: 30\n```\n\nRegisters tools like `mcp_filesystem_read_file`, `mcp_filesystem_write_file`, `mcp_filesystem_list_directory`.\n\n### GitHub Server with Authentication\n\n```yaml\nmcp_servers:\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-github\"]\n    env:\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"ghp_xxxxxxxxxxxxxxxxxxxx\"\n    timeout: 60\n```\n\nRegisters tools like `mcp_github_list_issues`, `mcp_github_create_pull_request`, etc.\n\n### Remote HTTP Server\n\n```yaml\nmcp_servers:\n  company_api:\n    url: \"https:\u002F\u002Fmcp.mycompany.com\u002Fv1\u002Fmcp\"\n    headers:\n      Authorization: \"Bearer sk-xxxxxxxxxxxxxxxxxxxx\"\n      X-Team-Id: \"engineering\"\n    timeout: 180\n    connect_timeout: 30\n```\n\n### Multiple Servers\n\n```yaml\nmcp_servers:\n  time:\n    command: \"uvx\"\n    args: [\"mcp-server-time\"]\n\n  filesystem:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Ftmp\"]\n\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-github\"]\n    env:\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"ghp_xxxxxxxxxxxxxxxxxxxx\"\n\n  company_api:\n    url: \"https:\u002F\u002Fmcp.internal.company.com\u002Fmcp\"\n    headers:\n      Authorization: \"Bearer sk-xxxxxxxxxxxxxxxxxxxx\"\n    timeout: 300\n```\n\nAll tools from all servers are registered and available simultaneously. Each server's tools are prefixed with its name to avoid collisions.\n\n## Sampling (Server-Initiated LLM Requests)\n\nHermes supports MCP's `sampling\u002FcreateMessage` capability — MCP servers can request LLM completions through the agent during tool execution. This enables agent-in-the-loop workflows (data analysis, content generation, decision-making).\n\nSampling is **enabled by default**. Configure per server:\n\n```yaml\nmcp_servers:\n  my_server:\n    command: \"npx\"\n    args: [\"-y\", \"my-mcp-server\"]\n    sampling:\n      enabled: true           # default: true\n      model: \"gemini-3-flash\" # model override (optional)\n      max_tokens_cap: 4096    # max tokens per request\n      timeout: 30             # LLM call timeout (seconds)\n      max_rpm: 10             # max requests per minute\n      allowed_models: []      # model whitelist (empty = all)\n      max_tool_rounds: 5      # tool loop limit (0 = disable)\n      log_level: \"info\"       # audit verbosity\n```\n\nServers can also include `tools` in sampling requests for multi-turn tool-augmented workflows. The `max_tool_rounds` config prevents infinite tool loops. Per-server audit metrics (requests, errors, tokens, tool use count) are tracked via `get_mcp_status()`.\n\nDisable sampling for untrusted servers with `sampling: { enabled: false }`.\n\n## Notes\n\n- MCP tools are called synchronously from the agent's perspective but run asynchronously on a dedicated background event loop\n- Tool results are returned as JSON with either `{\"result\": \"...\"}` or `{\"error\": \"...\"}`\n- The native MCP client is independent of `mcporter` -- you can use both simultaneously\n- Server connections are persistent and shared across all conversations in the same agent process\n- Adding or removing servers requires restarting the agent (no hot-reload currently)\n","# Native MCP Client\n\nYOUSEF SHTIWE has a built-in MCP client that connects to MCP servers at startup, discovers their tools, and makes them available as first-class tools the agent can call directly. No bridge CLI needed -- tools from MCP servers appear alongside built-in tools like `terminal`, `read_file`, etc.\n\n## When to Use\n\nUse this whenever you want to:\n- Connect to MCP servers and use their tools from within YOUSEF SHTIWE\n- Add external capabilities (filesystem access, GitHub, databases, APIs) via MCP\n- Run local stdio-based MCP servers (npx, uvx, or any command)\n- Connect to remote HTTP\u002FStreamableHTTP MCP servers\n- Have MCP tools auto-discovered and available in every conversation\n\nFor ad-hoc, one-off MCP tool calls from the terminal without configuring anything, see the `mcporter` skill instead.\n\n## Prerequisites\n\n- **mcp Python package** -- optional dependency; install with `pip install mcp`. If not installed, MCP support is silently disabled.\n- **Node.js** -- required for `npx`-based MCP servers (most community servers)\n- **uv** -- required for `uvx`-based MCP servers (Python-based servers)\n\nInstall the MCP SDK:\n\n```bash\npip install mcp\n# or, if using uv:\nuv pip install mcp\n```\n\n## Quick Start\n\nAdd MCP servers to `~\u002F.yousef\u002Fconfig.yaml` under the `mcp_servers` key:\n\n```yaml\nmcp_servers:\n  time:\n    command: \"uvx\"\n    args: [\"mcp-server-time\"]\n```\n\nRestart YOUSEF SHTIWE. On startup it will:\n1. Connect to the server\n2. Discover available tools\n3. Register them with the prefix `mcp_time_*`\n4. Inject them into all platform toolsets\n\nYou can then use the tools naturally -- just ask the agent to get the current time.\n\n## Configuration Reference\n\nEach entry under `mcp_servers` is a server name mapped to its config. There are two transport types: **stdio** (command-based) and **HTTP** (url-based).\n\n### Stdio Transport (command + args)\n\n```yaml\nmcp_servers:\n  server_name:\n    command: \"npx\"             # (required) executable to run\n    args: [\"-y\", \"pkg-name\"]   # (optional) command arguments, default: []\n    env:                       # (optional) environment variables for the subprocess\n      SOME_API_KEY: \"value\"\n    timeout: 120               # (optional) per-tool-call timeout in seconds, default: 120\n    connect_timeout: 60        # (optional) initial connection timeout in seconds, default: 60\n```\n\n### HTTP Transport (url)\n\n```yaml\nmcp_servers:\n  server_name:\n    url: \"https:\u002F\u002Fmy-server.example.com\u002Fmcp\"   # (required) server URL\n    headers:                                     # (optional) HTTP headers\n      Authorization: \"Bearer sk-...\"\n    timeout: 180               # (optional) per-tool-call timeout in seconds, default: 120\n    connect_timeout: 60        # (optional) initial connection timeout in seconds, default: 60\n```\n\n### All Config Options\n\n| Option            | Type   | Default | Description                                       |\n|-------------------|--------|---------|---------------------------------------------------|\n| `command`         | string | --      | Executable to run (stdio transport, required)     |\n| `args`            | list   | `[]`    | Arguments passed to the command                   |\n| `env`             | dict   | `{}`    | Extra environment variables for the subprocess    |\n| `url`             | string | --      | Server URL (HTTP transport, required)             |\n| `headers`         | dict   | `{}`    | HTTP headers sent with every request              |\n| `timeout`         | int    | `120`   | Per-tool-call timeout in seconds                  |\n| `connect_timeout` | int    | `60`    | Timeout for initial connection and discovery      |\n\nNote: A server config must have either `command` (stdio) or `url` (HTTP), not both.\n\n## How It Works\n\n### Startup Discovery\n\nWhen YOUSEF SHTIWE starts, `discover_mcp_tools()` is called during tool initialization:\n\n1. Reads `mcp_servers` from `~\u002F.yousef\u002Fconfig.yaml`\n2. For each server, spawns a connection in a dedicated background event loop\n3. Initializes the MCP session and calls `list_tools()` to discover available tools\n4. Registers each tool in the Hermes tool registry\n\n### Tool Naming Convention\n\nMCP tools are registered with the naming pattern:\n\n```\nmcp_{server_name}_{tool_name}\n```\n\nHyphens and dots in names are replaced with underscores for LLM API compatibility.\n\nExamples:\n- Server `filesystem`, tool `read_file` → `mcp_filesystem_read_file`\n- Server `github`, tool `list-issues` → `mcp_github_list_issues`\n- Server `my-api`, tool `fetch.data` → `mcp_my_api_fetch_data`\n\n### Auto-Injection\n\nAfter discovery, MCP tools are automatically injected into all `hermes-*` platform toolsets (CLI, Discord, Telegram, etc.). This means MCP tools are available in every conversation without any additional configuration.\n\n### Connection Lifecycle\n\n- Each server runs as a long-lived asyncio Task in a background daemon thread\n- Connections persist for the lifetime of the agent process\n- If a connection drops, automatic reconnection with exponential backoff kicks in (up to 5 retries, max 60s backoff)\n- On agent shutdown, all connections are gracefully closed\n\n### Idempotency\n\n`discover_mcp_tools()` is idempotent -- calling it multiple times only connects to servers that aren't already connected. Failed servers are retried on subsequent calls.\n\n## Transport Types\n\n### Stdio Transport\n\nThe most common transport. Hermes launches the MCP server as a subprocess and communicates over stdin\u002Fstdout.\n\n```yaml\nmcp_servers:\n  filesystem:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fhome\u002Fuser\u002Fprojects\"]\n```\n\nThe subprocess inherits a **filtered** environment (see Security section below) plus any variables you specify in `env`.\n\n### HTTP \u002F StreamableHTTP Transport\n\nFor remote or shared MCP servers. Requires the `mcp` package to include HTTP client support (`mcp.client.streamable_http`).\n\n```yaml\nmcp_servers:\n  remote_api:\n    url: \"https:\u002F\u002Fmcp.example.com\u002Fmcp\"\n    headers:\n      Authorization: \"Bearer sk-...\"\n```\n\nIf HTTP support is not available in your installed `mcp` version, the server will fail with an ImportError and other servers will continue normally.\n\n## Security\n\n### Environment Variable Filtering\n\nFor stdio servers, Hermes does NOT pass your full shell environment to MCP subprocesses. Only safe baseline variables are inherited:\n\n- `PATH`, `HOME`, `USER`, `LANG`, `LC_ALL`, `TERM`, `SHELL`, `TMPDIR`\n- Any `XDG_*` variables\n\nAll other environment variables (API keys, tokens, secrets) are excluded unless you explicitly add them via the `env` config key. This prevents accidental credential leakage to untrusted MCP servers.\n\n```yaml\nmcp_servers:\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-github\"]\n    env:\n      # Only this token is passed to the subprocess\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"ghp_...\"\n```\n\n### Credential Stripping in Error Messages\n\nIf an MCP tool call fails, any credential-like patterns in the error message are automatically redacted before being shown to the LLM. This covers:\n\n- GitHub PATs (`ghp_...`)\n- OpenAI-style keys (`sk-...`)\n- Bearer tokens\n- Generic `token=`, `key=`, `API_KEY=`, `password=`, `secret=` patterns\n\n## Troubleshooting\n\n### \"MCP SDK not available -- skipping MCP tool discovery\"\n\nThe `mcp` Python package is not installed. Install it:\n\n```bash\npip install mcp\n```\n\n### \"No MCP servers configured\"\n\nNo `mcp_servers` key in `~\u002F.yousef\u002Fconfig.yaml`, or it's empty. Add at least one server.\n\n### \"Failed to connect to MCP server 'X'\"\n\nCommon causes:\n- **Command not found**: The `command` binary isn't on PATH. Ensure `npx`, `uvx`, or the relevant command is installed.\n- **Package not found**: For npx servers, the npm package may not exist or may need `-y` in args to auto-install.\n- **Timeout**: The server took too long to start. Increase `connect_timeout`.\n- **Port conflict**: For HTTP servers, the URL may be unreachable.\n\n### \"MCP server 'X' requires HTTP transport but mcp.client.streamable_http is not available\"\n\nYour `mcp` package version doesn't include HTTP client support. Upgrade:\n\n```bash\npip install --upgrade mcp\n```\n\n### Tools not appearing\n\n- Check that the server is listed under `mcp_servers` (not `mcp` or `servers`)\n- Ensure the YAML indentation is correct\n- Look at YOUSEF SHTIWE startup logs for connection messages\n- Tool names are prefixed with `mcp_{server}_{tool}` -- look for that pattern\n\n### Connection keeps dropping\n\nThe client retries up to 5 times with exponential backoff (1s, 2s, 4s, 8s, 16s, capped at 60s). If the server is fundamentally unreachable, it gives up after 5 attempts. Check the server process and network connectivity.\n\n## Examples\n\n### Time Server (uvx)\n\n```yaml\nmcp_servers:\n  time:\n    command: \"uvx\"\n    args: [\"mcp-server-time\"]\n```\n\nRegisters tools like `mcp_time_get_current_time`.\n\n### Filesystem Server (npx)\n\n```yaml\nmcp_servers:\n  filesystem:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fhome\u002Fuser\u002Fdocuments\"]\n    timeout: 30\n```\n\nRegisters tools like `mcp_filesystem_read_file`, `mcp_filesystem_write_file`, `mcp_filesystem_list_directory`.\n\n### GitHub Server with Authentication\n\n```yaml\nmcp_servers:\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-github\"]\n    env:\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"ghp_xxxxxxxxxxxxxxxxxxxx\"\n    timeout: 60\n```\n\nRegisters tools like `mcp_github_list_issues`, `mcp_github_create_pull_request`, etc.\n\n### Remote HTTP Server\n\n```yaml\nmcp_servers:\n  company_api:\n    url: \"https:\u002F\u002Fmcp.mycompany.com\u002Fv1\u002Fmcp\"\n    headers:\n      Authorization: \"Bearer sk-xxxxxxxxxxxxxxxxxxxx\"\n      X-Team-Id: \"engineering\"\n    timeout: 180\n    connect_timeout: 30\n```\n\n### Multiple Servers\n\n```yaml\nmcp_servers:\n  time:\n    command: \"uvx\"\n    args: [\"mcp-server-time\"]\n\n  filesystem:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Ftmp\"]\n\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol\u002Fserver-github\"]\n    env:\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"ghp_xxxxxxxxxxxxxxxxxxxx\"\n\n  company_api:\n    url: \"https:\u002F\u002Fmcp.internal.company.com\u002Fmcp\"\n    headers:\n      Authorization: \"Bearer sk-xxxxxxxxxxxxxxxxxxxx\"\n    timeout: 300\n```\n\nAll tools from all servers are registered and available simultaneously. Each server's tools are prefixed with its name to avoid collisions.\n\n## Sampling (Server-Initiated LLM Requests)\n\nHermes supports MCP's `sampling\u002FcreateMessage` capability — MCP servers can request LLM completions through the agent during tool execution. This enables agent-in-the-loop workflows (data analysis, content generation, decision-making).\n\nSampling is **enabled by default**. Configure per server:\n\n```yaml\nmcp_servers:\n  my_server:\n    command: \"npx\"\n    args: [\"-y\", \"my-mcp-server\"]\n    sampling:\n      enabled: true           # default: true\n      model: \"gemini-3-flash\" # model override (optional)\n      max_tokens_cap: 4096    # max tokens per request\n      timeout: 30             # LLM call timeout (seconds)\n      max_rpm: 10             # max requests per minute\n      allowed_models: []      # model whitelist (empty = all)\n      max_tool_rounds: 5      # tool loop limit (0 = disable)\n      log_level: \"info\"       # audit verbosity\n```\n\nServers can also include `tools` in sampling requests for multi-turn tool-augmented workflows. The `max_tool_rounds` config prevents infinite tool loops. Per-server audit metrics (requests, errors, tokens, tool use count) are tracked via `get_mcp_status()`.\n\nDisable sampling for untrusted servers with `sampling: { enabled: false }`.\n\n## Notes\n\n- MCP tools are called synchronously from the agent's perspective but run asynchronously on a dedicated background event loop\n- Tool results are returned as JSON with either `{\"result\": \"...\"}` or `{\"error\": \"...\"}`\n- The native MCP client is independent of `mcporter` -- you can use both simultaneously\n- Server connections are persistent and shared across all conversations in the same agent process\n- Adding or removing servers requires restarting the agent (no hot-reload currently)\n",{"name":5,"author":48,"license":14,"version":49,"metadata":50,"description":7},"YOUSEF SHTIWE","1.0.0",{"hermes":51},{"tags":52,"related_skills":54},[25,36,53],"Integrations",[55],"mcporter","main","93bbc269671fbb340afa15b36a8766f15dc30df2",".yousef\u002Fskills\u002Fmcp\u002Fnative-mcp","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch","2026-04-27 02:51:28",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add gjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6 --skill native-mcp",{"tool":68,"command":69},"bunx","bunx skills add gjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6 --skill native-mcp",{"tool":71,"command":72},"pnpm","pnpm dlx skills add gjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6 --skill native-mcp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002F.yousef\u002Fskills\u002Fmcp\u002Fnative-mcp\u002FSKILL.md",true,[],[77,118,146,162,181,202],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":97,"publishedAt":43},"01M71G6TJ2RAQ1J0PV3K6D9GQA","writing-plans","Use when you have a spec or requirements for a multi-step task. Creates comprehensive implementation plans with bite-sized tasks, exact file paths, and complete code examples.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002Fhermes_sovereign_data\u002Fskills\u002Fsoftware-development\u002Fwriting-plans\u002FSKILL.md",[83,86,89,94],{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":87,"categoryName":88,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":90,"categoryName":91,"taxonomyType":92,"taxonomyTypeDesc":93},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":95,"categoryName":96,"taxonomyType":92,"taxonomyTypeDesc":93},"01JBSEEDCAT000000000000036","内容创作者",[98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],"writing","writing plans","plans","design","review","workflow","documentation","tasks","development","code","planning","code-review","subagent","superpowers","paths","test-driven-development","you","for","test-driven","when",{"skillNo":119,"name":113,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":131,"publishedAt":43},"01M71G6R81013R3T7W5VP56GCB","Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle with test-first approach.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002Fhermes_sovereign_data\u002Fskills\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[123,126,129,130],{"categoryNo":124,"categoryName":125,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":87,"categoryName":88,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":95,"categoryName":96,"taxonomyType":92,"taxonomyTypeDesc":93},[132,133,106,134,135,98,136,107,137,110,111,138,139,140,141,142,143,144,145,117],"test","test driven development","driven","testing","debugging","refactor","red-green-refactor","cycle","green","systematic","bugfix","implementing","systematic-debugging","test-first",{"skillNo":147,"name":144,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":152,"publishedAt":43},"01M71G6N0Y546JZEDF25E2PMCE","Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation — NO fixes without understanding the problem first.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002Fhermes_sovereign_data\u002Fskills\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[151],{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},[153,136,141,98,132,106,110,154,111,155,156,157,100,158,113,159,116,160,161,117],"systematic debugging","use","bug","root-cause","problem-solving","problem","fixes","phase","root cause",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":174,"publishedAt":43},"01M71G6J0DXEGY48GH4KVW2SJH","subagent-driven-development","Use when executing implementation plans with independent tasks. Dispatches fresh delegate_task per task with two-stage review (spec compliance then code quality).","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002Fhermes_sovereign_data\u002Fskills\u002Fsoftware-development\u002Fsubagent-driven-development\u002FSKILL.md",[168,169,170,171],{"categoryNo":87,"categoryName":88,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":90,"categoryName":91,"taxonomyType":92,"taxonomyTypeDesc":93},{"categoryNo":95,"categoryName":96,"taxonomyType":92,"taxonomyTypeDesc":93},{"categoryNo":172,"categoryName":173,"taxonomyType":92,"taxonomyTypeDesc":93},"01JBSEEDCAT000000000000037","律师与法务",[106,175,110,134,98,102,103,176,105,107,177,109,178,179,111,100,180,113,116,117],"subagent driven development","code quality","delegation","parallel","delegate","fresh",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":189,"publishedAt":43},"01M71G6EFFBQX6634E6XHB09Y1","requesting-code-review","Pre-commit verification pipeline — static security scan, baseline-aware quality gates, independent reviewer subagent, and auto-fix loop. Use after code changes and before committing, pushing, or opening a PR.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002Fhermes_sovereign_data\u002Fskills\u002Fsoftware-development\u002Frequesting-code-review\u002FSKILL.md",[187,188],{"categoryNo":124,"categoryName":125,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":90,"categoryName":91,"taxonomyType":92,"taxonomyTypeDesc":93},[190,102,107,191,98,192,109,193,194,195,196,110,197,198,199,111,113,200,201,116],"code review","requesting code review","commit","verification","security scan","pipeline","loop","reviewer","fix","auto","static","auto-fix",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":208,"publishedAt":43},"01M71G6CM8ANSWVFXCN9AAD58Y","plan","Plan mode for Hermes — inspect context, write a markdown plan into the active workspace's `.hermes\u002Fplans\u002F` directory, and do not execute the work.","https:\u002F\u002Fgithub.com\u002Fgjbvsjjvgm-sketch\u002Fhermes-sovereign-unified-v13.6\u002Fblob\u002Fmain\u002Fhermes_sovereign_data\u002Fskills\u002Fsoftware-development\u002Fplan\u002FSKILL.md",[],[204,98,209,103,106,108,210,110,211,212,213,214,215,216,100,217,218,219,115,220],"directory","markdown","workspace","work","write","implementation","do","active","plan mode","inspect","mode","plan-mode"]