Quickstart
Prerequisites
Section titled “Prerequisites”- Node.js 22+ — check with
node --version - npm — comes with Node.js
Create Your First Schema
Section titled “Create Your First Schema”-
Install FlowMCP Core
Create a new project and install the core library:
Terminal window mkdir my-flowmcp-projectcd my-flowmcp-projectnpm init -ynpm install github:FlowMCP/flowmcp-coreAdd
"type": "module"to yourpackage.jsonfor ES module support. -
Write a Schema
Create a file called
coingecko-ping.mjs:export const main = {namespace: 'coingecko',name: 'Ping',description: 'Check CoinGecko API server status',version: '3.0.0',root: 'https://api.coingecko.com/api/v3',requiredServerParams: [],requiredLibraries: [],headers: {},tools: {ping: {method: 'GET',path: '/ping',description: 'Check if CoinGecko API is online',parameters: [],output: {mimeType: 'application/json',schema: {type: 'object',properties: {gecko_says: { type: 'string', description: 'Response message' }}}}}}}This schema declares a single tool that calls the CoinGecko ping endpoint. No API key required.
-
Validate and Call
Create a file called
test.mjs:import { FlowMCP } from 'flowmcp-core'import { main } from './coingecko-ping.mjs'// Validate the schemaconst { status, messages } = FlowMCP.validateSchema( { schema: main } )console.log( status ? 'Schema valid!' : messages )// Call the APIconst result = await FlowMCP.fetch( {schema: main,routeName: 'ping',userParams: {},serverParams: {}} )console.log( result.dataAsString )// → {"gecko_says":"(V3) To the Moon!"}Run it:
Terminal window node test.mjsYou should see
Schema valid!followed by the CoinGecko ping response. -
Run as MCP Server
Create a file called
server.mjsto expose your schema as an MCP tool:import { FlowMCP } from 'flowmcp-core'import { Server } from '@modelcontextprotocol/sdk/server/index.js'import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'import { main } from './coingecko-ping.mjs'const server = new Server({ name: 'my-first-server', version: '1.0.0' },{ capabilities: { tools: {} } })FlowMCP.activateServerTools( { server, schemas: [main] } )const transport = new StdioServerTransport()await server.connect( transport )Install the MCP SDK:
Terminal window npm install @modelcontextprotocol/sdkRun the server:
Terminal window node server.mjsYour MCP server is now running over stdio. AI clients like Claude Desktop can connect to it and call the
coingecko__pingtool.
What Just Happened?
Section titled “What Just Happened?”- You declared an API endpoint as a schema (no server code needed)
- FlowMCP validated the schema structure
- FlowMCP called the API with correct URL construction and headers
- FlowMCP exposed the schema as an MCP tool with auto-generated Zod validation
The same pattern works for any REST API — add authentication via requiredServerParams and headers, add parameters via the parameters array, add response transformation via the handlers export.