Skip to content

feat(mcp): add external MCP gateway and skills tools#3

Open
pe200012 wants to merge 1 commit into
Xeift:mainfrom
pe200012:feat/mcp-and-skills-clean
Open

feat(mcp): add external MCP gateway and skills tools#3
pe200012 wants to merge 1 commit into
Xeift:mainfrom
pe200012:feat/mcp-and-skills-clean

Conversation

@pe200012

Copy link
Copy Markdown

This PR adds an external MCP gateway to CatDesk (inspired by pi-mcp-adapter), plus local skill discovery tools.

External MCP config

CatDesk reads external MCP server config from:

$HOME/.catdesk/config.toml

On Windows, the home directory is resolved from USERPROFILE or HOMEDRIVE / HOMEPATH.

Config format:

[mcp.settings]
toolPrefix = "server"
directTools = false
idleTimeout = 10

[mcp.mcpServers.serena]
command = "uvx"
args = [
  "--from",
  "git+https://github.com/oraios/serena",
  "serena",
  "start-mcp-server",
  "--context",
  "ide",
]
lifecycle = "lazy"
directTools = ["read_file", "search_files", "get_code_structure"]
excludeTools = []

[mcp.mcpServers.docs]
url = "https://example.com/mcp"
headers = { Authorization = "Bearer ${DOCS_MCP_TOKEN}" }
lifecycle = "keep_alive"
directTools = true

Supported per-server fields:

command          stdio command
args             stdio args
env              stdio environment variables
cwd              stdio working directory
url              HTTP/SSE MCP endpoint
headers          HTTP headers
lifecycle        lazy | eager | keep_alive
directTools      true, false, or a list of downstream tool names
excludeTools     downstream tool names to hide
unprefixedTools  expose downstream tool names without server prefix

CatDesk creates the gateway from the configured mcp.mcpServers map. Lazy servers connect on demand, eager servers connect during startup, and keep-alive servers stay connected until shutdown or explicit disconnect.

Browser MCP support is routed through the same gateway, so browser tools and configured external servers share one path.

Skills

CatDesk discovers local skills by scanning existing directories in this order:

CATDESK_SKILLS_DIR entries
<workspace>/.catdesk/skills
<workspace>/skills
$HOME/.catdesk/skills
/home/oai/skills

This PR adds four local skill tools:

list_skills
search_skills
read_skill
read_skill_resource

read_skill_resource only accepts paths relative to the skill directory, and rejects path traversal.

@pe200012 pe200012 force-pushed the feat/mcp-and-skills-clean branch from 297217d to 253066c Compare June 13, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant