My HTTP MCP Server
A Model Context Protocol server that provides cryptocurrency data tools and resources via an HTTP endpoint. It enables users to fetch real-time market data from Binance, track activity logs, and generate cryptocurrency executive summaries.
README
My HTTP MCP Server
A small Model Context Protocol (MCP) server built with:
@modelcontextprotocol/sdkexpresstypescriptzod
The app exposes a Streamable HTTP MCP endpoint at /mcp and includes a few example tools, resources, and prompts centered around cryptocurrency data.
Project Structure
src/
server.ts
http/
createMcpApp.ts
mcp/
createMcpServer.ts
services/
cryptoService.ts
Responsibilities
-
src/server.tsStarts the HTTP server and wires the app together. -
src/http/createMcpApp.tsContains the HTTP and MCP transport boilerplate: request parsing, origin validation, session management, and/mcproute handling. -
src/mcp/createMcpServer.tsDefines the MCP server itself: tools, resources, prompts, and their schemas. -
src/services/cryptoService.tsContains the business logic for symbol normalization, Binance API calls, and activity log access.
Features
The server currently registers:
-
Tools:
ping,add_numbers,get_price,get_price_change -
Resources:
activity_log,crypto_price -
Prompt:
executive_summary
The crypto-related tools call Binance's public market-data endpoints and append activity to activity.log.
Requirements
- Node.js 20+
- npm
Node 20+ is recommended because the app relies on the built-in fetch API.
Install
npm install
Run
Start the server directly from TypeScript with tsx:
npx tsx src/server.ts
By default, the server listens on:
http://127.0.0.1:8787/mcp
You can override the port with PORT:
PORT=3000 npx tsx src/server.ts
Build / Type Check
This repo does not currently include a tsconfig.json or build script, so the simplest way to validate the TypeScript sources is:
npx tsc --noEmit --module nodenext --moduleResolution nodenext --target es2022 --esModuleInterop src/server.ts src/http/createMcpApp.ts src/mcp/createMcpServer.ts src/services/cryptoService.ts
If you want to add a real build pipeline later, the next step would usually be:
- Add a
tsconfig.json - Add
build,dev, andtypecheckscripts topackage.json - Emit compiled JavaScript into a
dist/directory
Testing
There is not a dedicated automated test suite yet.
Right now, the practical testing flow is:
- Run the TypeScript check command above
- Start the server with
npx tsx src/server.ts - Connect with an MCP client and exercise the registered tools/resources/prompts
Suggested Manual Smoke Tests
- Call
pingand confirm it returnspong - Call
add_numberswith two values and confirm the sum - Call
get_pricewithBTC,ETH,Bitcoin, orEthereum - Call
get_price_changeand confirm a 24-hour summary is returned - Read the
activity_logresource and confirm requests are recorded - Use the
executive_summaryprompt and confirm it references the crypto tools correctly
Notes
- The HTTP boilerplate and session handling are intentionally separate from business logic.
- Session state is stored in memory, so this server is best suited for local development or simple demos.
- The crypto tools depend on outbound network access to Binance.
- The activity log is stored locally in
activity.logat the project root.
Future Improvements
- Add
tsconfig.json - Add npm scripts for
dev,build,typecheck, andtest - Add automated tests for:
- symbol normalization
- Binance response handling
- MCP tool/resource/prompt registration
- HTTP session lifecycle
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.