Get the FREE Ultimate OpenClaw Setup Guide →

api

lightweight API MCP server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adamshannag-api-mcp-server api-mcp-server --transport stdio --config ./config.json \
  --env LOG_LEVEL="Sets the minimum logging level (DEBUG, INFO, WARN, ERROR)" \
  --env API_MCP_HOST="SSE host to bind to" \
  --env API_MCP_PORT="SSE port to bind to" \
  --env API_MCP_SSE_API_KEY="Optional Bearer token for auth"

How to use

This MCP server provides a lightweight interface for executing defined API tools via the MCP protocol. It supports dynamic HTTP requests with typed arguments, and can operate over multiple transports, including stdio (default) and SSE. To use it, first configure one or more tools in a JSON tool configuration file describing the target host, HTTP method, endpoints, and the arguments expected from the language model. Run the server with the desired transport and point it at your tool configuration. The server will expose these tools to clients via MCP, allowing you to invoke them with structured inputs and receive formatted responses. If you enable the SSE transport, you can optionally secure the endpoint with a Bearer token. The environment variable placeholders in the tool configuration support substituting values at runtime, ensuring safe and repeatable executions.

How to install

Prerequisites:

  • Go installed to build from source or to install the binary via go install.
  • Internet access to download dependencies if building.

Option A: Install via pre-built binary

  1. Download the latest release binary from the project's Releases page.
  2. Make it executable: chmod +x api-mcp-server
  3. Run with a sample config: ./api-mcp-server --transport stdio --config ./config.json

Option B: Build from source

  1. Ensure Go is installed (version 1.18+): go version
  2. Fetch and build the CLI: go install github.com/AdamShannag/api-mcp-server/cmd/api-mcp-server@v0.2.0
  3. Run the binary: api-mcp-server --transport stdio --config ./config.json

Configuration and runtime:

  • Prepare a tool configuration JSON (config.json) as described in the repository README.
  • Set necessary environment variables as described in the Environment Variables section if you rely on substitutions.

Additional notes

Tips and common considerations:

  • If using the SSE transport, remember to set API_MCP_SSE_API_KEY to enable Bearer token authentication.
  • The tool configuration supports environment variable substitution using the syntax {{env VAR_NAME:default_value}}. Use this to keep sensitive values out of the config file.
  • Ensure the host and port are accessible from the runtime environment, especially when running behind firewalls or in containerized environments.
  • The server supports multiple tools in a single config file; you can reuse the same host with different endpoints and argument sets.
  • When troubleshooting, enable LOG_LEVEL=DEBUG to get verbose logs for request construction, header handling, and response parsing.

Related MCP Servers

Sponsor this space

Reach thousands of developers