apx-mcp-builder

Author and register MCP servers with JSON-RPC stdio tools for APX agents.

6|1|Updated May 8, 2026
One-click install
npx skills add https://github.com/agentprojectcontext/apx --skill apx-mcp-builder-agentprojectcontext
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: apx-mcp-builder
Source: https://github.com/agentprojectcontext/apx/tree/main/src/core/runtime-skills/apx-mcp-builder
Command: npx skills add https://github.com/agentprojectcontext/apx --skill apx-mcp-builder-agentprojectcontext

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fastmcp, @modelcontextprotocol/sdk.

What problem does it solve? Building a Model Context Protocol server from scratch requires understanding JSON-RPC 2.0 framing over stdio, tool schema design, and APX registration mechanics. This Skill provides the minimum viable server patterns, tool design rules, and debugging commands needed to expose a new tool surface to APX agents without protocol trial-and-error. ## Core Features & Use Cases - Stack Selection Guidance: Choose between Python FastMCP, the Node @modelcontextprotocol/sdk, or raw JSON-RPC based on your library ecosystem. - Minimum Viable Server Templates: Copy-ready Python and TypeScript implementations covering initialize, tools/list, and tools/call handlers. - Tool Design Rules: Enforce snake_case naming, JSON Schema draft-07 input schemas, structured return values, and proper error propagation via isError. - Secrets Management: Register servers with apx mcp add using runtime scope so tokens land in chmod 0600 files that are never committed. - Use Case: You want your APX agent to query an internal inventory API. Write a FastMCP server with search_inventory and get_stock tools, register it with apx mcp add, then verify with apx mcp tools and apx mcp run. ## Quick Start Ask the agent to scaffold a new FastMCP server with two tools and register it in APX using apx mcp add with runtime scope.

Frequently Asked Questions about apx-mcp-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an MCP server in Python?▼

Use the FastMCP package: create a FastMCP instance, decorate functions with @mcp.tool(), and call mcp.run() for stdio transport. Install with pip install fastmcp, then register it in APX with apx mcp add pointing at your script.

FastMCP vs TypeScript MCP SDK, which should I use?▼

FastMCP is the fastest path with decorator-based tools, ideal for wrapping Python libraries. The @modelcontextprotocol/sdk for Node fits when you need Node-only libraries or zero-install distribution via npx -y.

How do I register an MCP server in APX?▼

Run apx mcp add with a name, --command for the executable, --project for scope, and the launch arguments after --. Use --env flags for environment variables and --scope runtime to keep secrets out of committed files.

Where should I store API tokens for an MCP server?▼

Pass tokens with --env and use --scope runtime, which writes to ~/.apx/projects/<id>/mcps.json with chmod 0600 and is never committed. Never use --scope shared for secrets since that file lives in .apc/ and gets committed.

Why does my MCP server fail when APX spawns it?▼

A common cause is printing to stdout outside JSON-RPC frames, which corrupts the protocol; use stderr for logs instead. Debug with apx mcp tools to smoke test, apx mcp logs for stderr output, and apx mcp check to inspect scopes and env.

How many tools should one MCP server expose?▼

Keep 5-10 high-value tools per server because every tool consumes agent context. If you need more, split functionality across multiple servers rather than exposing every internal function.