Table of Contents
- FAQ
- General
- Configuration
- Tools
- How do I add a new tool?
- What naming convention should tools follow?
- How does the api_request tool work?
- How does the list_connections tool work?
- Troubleshooting
- Development
- Can I use this template for non-REST APIs?
- Can I use HTTP transport instead of stdio?
- How do I test without Claude Code?
- Related
← Home
FAQ
Frequently asked questions about MCP servers built from the Template-MCP template.
General
What is an MCP server?
A Model Context Protocol (MCP) server bridges AI assistants (like Claude) with external APIs. It exposes REST API operations as MCP tools that Claude can call directly.
Why TypeScript?
TypeScript provides full type safety, which is critical for API bridging where data shapes must be validated. The strict mode and Zod integration catch errors at compile time.
Why node:https instead of fetch?
Node.js fetch does not reliably support self-signed certificate bypass. The classic node:https module with rejectUnauthorized: false works across all Node.js versions. See Architecture for details.
Configuration
Where is the config file?
At ~/.<project>.json (e.g., ~/.mcp_mokowaas.json). Run npm run setup to create it.
Can I have multiple connections?
Yes. The config supports named connections:
{
"defaultConnection": "production",
"connections": {
"production": { "baseUrl": "...", "apiKey": "..." },
"staging": { "baseUrl": "...", "apiKey": "..." }
}
}
Pass connection: "staging" to any tool to use a specific connection.
How do I switch the default connection?
Edit ~/.<project>.json and change the "defaultConnection" field.
Tools
How do I add a new tool?
Register it in src/index.ts using server.tool(). See Development for the full pattern.
What naming convention should tools follow?
snake_case with the pattern resource_action:
resource_list,resource_get,resource_create,resource_update,resource_delete
How does the api_request tool work?
It is a generic escape hatch that lets Claude make raw API calls:
api_request(method: "GET", endpoint: "/api/v1/resource/123")
Use specific tools for common operations and api_request for one-off requests.
How does the list_connections tool work?
It returns all configured connections (names and URLs, not API keys). Useful for Claude to discover available environments.
Troubleshooting
Claude does not see my MCP server
- Check
.mcp.jsonor~/.claude.jsonregistration - Verify the path to
dist/index.jsis absolute - Ensure the project is built (
npm run build) - Restart Claude Code
See Troubleshooting for more.
Tool calls return errors
- Test the underlying API with curl
- Check the config file has valid credentials
- Run the server manually to see stderr:
node dist/index.js 2> debug.log
How do I debug MCP communication?
DEBUG=* node dist/index.js 2> /tmp/mcp-debug.log
tail -f /tmp/mcp-debug.log
Development
Can I use this template for non-REST APIs?
The template is designed for REST APIs, but the ApiClient can be adapted for other protocols. You would need to modify src/client.ts for your protocol.
Can I use HTTP transport instead of stdio?
The template is set up for stdio transport. HTTP/SSE transport can be added by modifying src/index.ts to use a different transport from the MCP SDK.
How do I test without Claude Code?
Send MCP protocol messages via stdin:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js
Related
- Installation -- setup and registration
- Development -- tool implementation guide
- Configuration -- config file reference
- Troubleshooting -- detailed issue resolution
Repo: Template-MCP · MokoStandards
| Field | Value |
|---|---|
| Minimum Version | 04.07.00 |
| Platform | mcp-server |
| Applies To | MCP server repositories |
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-05-19 | Moko Consulting | Initial version |