{"id":50372159,"url":"https://github.com/aigc-hackers/mcpx","last_synced_at":"2026-05-30T08:00:29.226Z","repository":{"id":354395716,"uuid":"1093927100","full_name":"AIGC-Hackers/mcpx","owner":"AIGC-Hackers","description":"苹果 MCP 工具 ✅","archived":false,"fork":false,"pushed_at":"2026-05-24T06:46:00.000Z","size":534,"stargazers_count":20,"open_issues_count":2,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T08:24:07.576Z","etag":null,"topics":["anthropic","automation","batch-operations","claude","claude-skills","cli","codex","cursor","developer-tools","llm-tools","mcp","mcp-client","model-context-protocol","oauth","token-efficient","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AIGC-Hackers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T02:57:18.000Z","updated_at":"2026-05-24T06:46:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5accf8a-87af-4cf4-88ea-09e1f3748708","html_url":"https://github.com/AIGC-Hackers/mcpx","commit_stats":null,"previous_names":["aigc-hackers/mcpx"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/AIGC-Hackers/mcpx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIGC-Hackers%2Fmcpx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIGC-Hackers%2Fmcpx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIGC-Hackers%2Fmcpx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIGC-Hackers%2Fmcpx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AIGC-Hackers","download_url":"https://codeload.github.com/AIGC-Hackers/mcpx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AIGC-Hackers%2Fmcpx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33684413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","automation","batch-operations","claude","claude-skills","cli","codex","cursor","developer-tools","llm-tools","mcp","mcp-client","model-context-protocol","oauth","token-efficient","typescript"],"created_at":"2026-05-30T08:00:20.076Z","updated_at":"2026-05-30T08:00:29.212Z","avatar_url":"https://github.com/AIGC-Hackers.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcpx\n\nmcpx is a command line tool that turns registered MCP servers into an\nagent-friendly command surface.\n\nIt keeps MCP server registrations in a global user registry, discovers tool\nschemas, handles OAuth where possible, and exposes each MCP server as a root\ncommand:\n\n```bash\nmcpx posthog projects-get\nmcpx sentry search-issues --input '{\"query\":\"is:unresolved\"}'\n```\n\nmcpx is designed for agents. The command surface is intentionally schema-first,\nstable, and explicit: tool calls pass input through `--input`, while mcpx's own\ncontrol commands live under the `@` namespace.\n\n## Requirements\n\n- Bun\n- macOS, Linux, or any environment that can run Bun executables\n\n## Install\n\nInstall the latest release:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/AIGC-Hackers/mcpx/main/install.sh | bash\n```\n\nBy default, the installer downloads the executable JS bundle from GitHub Releases\nand installs it to `~/.local/bin/mcpx`.\n\nSet `MCPX_INSTALL_DIR` to choose another install directory.\n\n## Add MCP Servers\n\nRegister MCP servers globally:\n\n```bash\nmcpx @add --name posthog --url https://mcp.posthog.com/mcp\nmcpx @add --name sentry --url https://mcp.sentry.dev/mcp\nmcpx @add --name cf-docs --url https://docs.mcp.cloudflare.com/mcp\nmcpx @add --name cf-bindings --url https://bindings.mcp.cloudflare.com/mcp\nmcpx @add --name cf-observability --url https://observability.mcp.cloudflare.com/mcp\nmcpx @add --name browser --url http://127.0.0.1:9000/mcp\n```\n\n\u003e [browser-os](https://www.browseros.com/) is an agent-native browser built on\n\u003e Chrome. It exposes a local MCP server that lets agents control the browser\n\u003e directly — navigating pages, extracting content, and interacting with web UIs.\n\nmcpx stores server configuration in:\n\n```text\n~/.agents/mcpx/servers.json\n```\n\nOAuth tokens and client secrets are stored separately in the global token cache:\n\n```text\n~/.agents/mcpx/tokens.json\n```\n\nProject directories do not need MCP config files. A project should decide which\nglobal servers are relevant by using schema selectors or a generated skill.\n\n## Call Tools\n\nCall tools through the server command:\n\n```bash\nmcpx \u003cserver\u003e \u003ctool\u003e --input '\u003cjson-or-json5\u003e'\n```\n\nExamples:\n\n```bash\nmcpx posthog projects-get --input '{}'\nmcpx sentry whoami --input '{}'\n```\n\nFor complex payloads, use `@-` with a heredoc to keep the input readable:\n\n```bash\nmcpx cf-graphql graphql_query --input @- \u003c\u003c'JSON'\n{\n  \"query\": \"query GetWorkerAnalytics($accountTag: String!, $scriptName: String!, $since: Time!, $until: Time!) { viewer { accounts(filter: {accountTag: $accountTag}) { workersInvocationsAdaptive(limit: 1000, filter: {scriptName: $scriptName, datetime_geq: $since, datetime_leq: $until}, orderBy: [datetimeHour_ASC]) { dimensions { datetimeHour scriptName status } sum { requests subrequests errors duration } quantiles { cpuTimeP50 cpuTimeP99 } } } } }\",\n  \"operationName\": \"GetWorkerAnalytics\",\n  \"variables\": {\n    \"accountTag\": \"abc123def456\",\n    \"scriptName\": \"my-worker\",\n    \"since\": \"2026-04-20T00:00:00Z\",\n    \"until\": \"2026-04-27T00:00:00Z\"\n  }\n}\nJSON\n```\n\n`--input` is the primary input path. It accepts inline JSON/JSON5, `@file`, and\n`@-` stdin inputs.\n\n## Discover Schemas\n\nPrint the command schema for agents:\n\n```bash\nmcpx --schema\n```\n\nFocus on one server:\n\n```bash\nmcpx --schema=.posthog\n```\n\nFocus on a set of servers:\n\n```bash\nmcpx --schema='.{posthog,sentry}'\n```\n\nFocus on an internal mcpx command:\n\n```bash\nmcpx --schema='.[\"@add\"]'\n```\n\nmcpx caches discovered tool schemas in the global registry. Cached schemas older\nthan one day are refreshed opportunistically in a single background worker when\nmcpx starts, so normal commands do not block on schema discovery. Servers that\nhave not discovered any tools yet are still retried synchronously during startup.\n\n## Control Commands\n\nmcpx control commands use the `@` namespace so they do not collide with server\nnames:\n\n```bash\nmcpx @add --name \u003cserver\u003e --url \u003cmcp-url\u003e\nmcpx @add --name \u003cserver\u003e --transport stdio --command \u003ccommand\u003e --arg \u003carg\u003e\nmcpx @remove --name \u003cserver\u003e\nmcpx @refresh\nmcpx @daemon status\nmcpx @daemon stop\nmcpx @daemon server\nmcpx @skill\n```\n\nServer names cannot start with `@`.\n\nHTTP is the default transport. Stdio servers are local process registrations;\npass each process argument with `--arg`, or use `--input` when you need structured\n`args` / `env`:\n\n```bash\nmcpx @add --input '{\n  \"name\": \"open-design\",\n  \"transport\": \"stdio\",\n  \"command\": \"node\",\n  \"args\": [\"/path/to/open-design/apps/daemon/dist/cli.js\", \"mcp\"],\n  \"env\": { \"OPEN_DESIGN_TOKEN\": \"...\" }\n}'\n```\n\n`@refresh` checks every registered MCP server, repairs OAuth state first,\nrefreshes cached tool schemas after auth is ready, and reports servers that\nstill require re-authentication. It may open a browser for interactive OAuth.\n\nStdio servers are called through `mcpxd`, a user-local daemon that reuses stdio\nMCP sessions across CLI invocations. `mcpxd` starts on demand, keeps idle stdio\nservers warm, and can be inspected or stopped with `mcpx @daemon status` and\n`mcpx @daemon stop`. The daemon process is started through the explicit\n`mcpx @daemon server` subcommand. HTTP servers continue to use the direct client path.\n\n## Authentication\n\nWhen `@add` detects OAuth, mcpx tries to complete authentication immediately.\nFor OAuth servers that support dynamic client registration, mcpx registers a\nclient automatically.\n\nFor OAuth servers that do not support dynamic client registration, such as\nSlack, mcpx prompts for a manual `client_id` and `client_secret`. These providers\nusually require a preconfigured redirect URL. mcpx uses:\n\n```text\nhttp://127.0.0.1:65245/callback\n```\n\nAdd and save that exact Redirect URL in the provider app settings before\ncontinuing the prompt.\n\nWhen an OAuth token is close to expiry, mcpx refreshes it before calling the MCP\ntool and then continues the original command.\n\nTool calls use a 5 minute request timeout by default. Set\n`MCPX_TOOL_CALL_TIMEOUT_MS` when a remote MCP server legitimately needs longer.\n\n## Output\n\nmcpx optimizes output for humans and agents by default:\n\n- text MCP content is printed directly\n- JSON text content is rendered as TOON\n- non-text content is saved to a temporary file and printed as `file saved \u003cpath\u003e`\n\nUse `--raw` to preserve raw server text output:\n\n```bash\nmcpx posthog projects-get --raw\n```\n\n## Project Skills\n\nGenerate a project-local skill that tells agents which global MCP servers to use:\n\n```bash\nmcpx @skill --servers posthog,sentry\n```\n\nThis writes:\n\n```text\n.agents/skills/mcpx/SKILL.md\n```\n\nThe generated skill instructs agents to discover tools with focused schema\nselectors and call MCP tools through mcpx.\n\n## Skill\n\nGeneral mcpx skill definition lives at `skills/mcpx/SKILL.md`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faigc-hackers%2Fmcpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faigc-hackers%2Fmcpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faigc-hackers%2Fmcpx/lists"}