DEV Community

HasMCP for HasMCP

Posted on

Step by Step Guide for Creating MCP Server from API endpoint

01. Create an API provider definition:

Create an API provider definition
Add a name, base API URL and description

02. Create an MCP Tool:

Give a nice readable name and title to your tool. So LLM can understand what it does quickly.

Create an MCP Tool

03. Optional token response optimization with Jmespath

LLM token response optimization with Jmespath

This small optimization will save ~66% per MCP Tool Call response and will make LLM more accurate.

04. Provider tool overview

Review what you have created

API provider MCP tool overview

05. Generate MCP Server from Provider
Click on the MCP Server button to generate an MCP server.

MCP Server from Provider API Provider

06. Overview of the MCP Server

Check the MCP Server definition and edit if needed

Overview of the MCP Server

07. Overview of the MCP Server with Tools

Check the tools and remove unwanted tools with toggling off.

MCP Server with Tools

08. Generate access token

HasMCP protects your MCP servers with tokens. So, if an LLM tries to interact without token it will get 401 (Unauthorized) value.

Generate MCP auth access token

09. Copy connection string for your favorite LLM or IDE

Copy MCP connection string

10. Access server logs

Tail the MCP tool calls from LLMs

Access MCP server logs

Top comments (0)