About MCP API Server
MCP API Server is an MCP server for managing token authentication and calling external APIs through tools. It is intended for MCP clients that need authenticated API access, and formats JSON or text responses in the MCP response structure.
Key features
- 01Token-based authentication management
- 02Authenticated calls to external APIs
- 03Authentication state tracking
- 04JSON and text response formatting
Use cases
- 01Set or clear an API token
- 02Check the current authentication state
- 03Retrieve vehicle API data through MCP
MCP support
It exposes `auth` and `vehicle_api` tools to MCP clients for token management and retrieval of external vehicle data. Responses follow the MCP protocol structure.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP API Server
An API-focused Model Context Protocol (MCP) server that provides authentication and API call capabilities. This server allows secure API calls through MCP tools, with authentication management and response handling.
Architecture
Features
- Authentication management with token-based security
- Make authenticated API calls to external services
- Secure token management with authentication state tracking
- Well-typed responses using the MCP protocol structure
- Response formatting for different content types (JSON, text)
Documentation
This repository includes a comprehensive step-by-step guide for building MCP servers:
- BUILD_MCP_SERVER_GUIDE.md: A detailed tutorial that walks through the process of creating a Model Context Protocol server from scratch, with explanations of core concepts, implementation details, and best practices.
The guide covers:
- Project setup and structure
- MCP architecture fundamentals
- Building core components
- Authentication implementation
- Creating custom tools
- Testing and VS Code integration
- Advanced feature suggestions
Both beginners and experienced developers will find valuable information in this guide for implementing their own MCP servers.
Prerequisites
- Node.js 16+
- npm
Installation
# Clone the repository
git clone https://github.com/ranjanmadhu/mcp-api-server.git
cd mcp-api-server
# Install dependencies
npm install
Usage
You can run the server directly:
# Development mode
npm run dev
# Or build and run in production
npm run build
npm start
VS Code Integration
This server can be integrated with VS Code through the Model Context Protocol:
- Create a
.vscodefolder in your project (if it doesn't exist) - Add a
mcp.jsonfile with the following configuration:
{
"servers": {
"api-mcp-server": {
"type": "stdio",
"command": "sh",
"args": [
"-c",
"cd /path/to/mcp-api-server && npm run build && npm run start"
]
}
}
}
- Replace
/path/to/mcp-api-serverwith the absolute path to your project - Restart VS Code or reload the window
- The MCP server will be available to compatible AI extensions
Troubleshooting
- If the MCP server isn't connecting, check the VS Code Developer Console for errors
- Verify the path in
mcp.jsonis correct and accessible - Ensure the server builds successfully with
npm run build
MCP Integration
This MCP server exposes the following tools:
1. auth
Manages authentication tokens for secure API access.
Parameters:
action: The authentication action to perform (set,check, orclear)token: The authentication token (required forsetaction)
2. vehicle_api
Makes an API call to retrieve vehicle data from an external API.
No parameters required.
Data Structure
API call responses are formatted according to the MCP protocol:
interface ToolResponse {
content: Array<{
type: "text" | "image" | "audio" | "resource";
text?: string;
data?: string;
mimeType?: string;
resource?: {
text?: string;
uri: string;
blob?: string;
mimeType?: string;
};
}>;
_meta?: Record<string, unknown>;
isError?: boolean;
}
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.