npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mondaydotcomorg/atp-mcp-adapter

v0.19.10

Published

MCP compatibility adapter for Agent Tool Protocol

Maintainers

guykorenguykorennitzanezranitzanezrayairfeyairfesaararsaararyonaharelyonahareljoshpe-mondayjoshpe-mondayalonbehaimalonbehaimsergeyroytsergeyroytantonru92antonru92laviomrilaviomrishanibenaderetmondayshanibenaderetmondayvitalimvitalimadarmondayadarmondayaviel_mondayaviel_mondayhadaspehadasperotemtarotemtashayelmodnayshayelmodnaychristopher-nowakchristopher-nowakvladmondayvladmondayella-miella-miliorkeliorkeomermondayomermondayrutikeveshrutikeveshaf8811af8811shiraweshirawewitold-mondaywitold-mondayavihayavavihayavcsalomancsalomaneran.hubermaneran.hubermandanielabdanielabmoshikmoshikaviv_go_npmaviv_go_npmdanielb-bladepopdanielb-bladepoporibaoribaoronmelleroronmelleryglaubachyglaubachayelet-mondayayelet-mondaydanielle.ahdanielle.ahidohayidohayliran-brimer-mondayliran-brimer-mondaynavecohennavecohensaharbsaharbtombogtombogbarakbebarakbeidoyana-mondayidoyana-mondaylorin-totahlorin-totahoronmondayoronmondaynik-savchenkonik-savchenkotomerfriedmantomerfriedmanyosefwyosefwigor_budiigor_budimatanyaw2matanyaw2nirlachmannirlachmanorrgottlorrgottlsebastian-curland-mndysebastian-curland-mndyyuly-robermanyuly-robermanamirbardugoamirbardugobarcohen2barcohen2illyayuillyayutootmorantootmoranfreak4pcfreak4pcmateuszwomateuszwoamit_hanochamit_hanochdorhasondorhasongal_libermangal_libermannoamn3knoamn3kitamargolditamargoldronachmany-mondayronachmany-mondayshahafmelamedshahafmelamedyuvalbyuvalbbenpibenpidorshakeddorshakedmickael_firstmickael_firstitaycohenitaycohenmayaheilbrunmayaheilbrunventuramdventuramdudidoronudidorondoryehudadoryehudagoralthgoralthshaietshaieturi-shmueliuri-shmuelianatkatzanatkatzshalomsteinbachshalomsteinbachannasoannasoboazjboazjofirmonsingoofirmonsingoshaneeshaneeavifreegeavifreegeliorrabinliorrabinvirtservirtserarinaonmondayarinaonmondayssddnodessddnodepablo-mdcpablo-mdcamitbiranamitbiranorelhazorelhazroyna-devroyna-devsergeybrsergeybrofirc-mondayofirc-mondayavnerhaavnerhaaxelstaxelstdanielkheyfetsdanielkheyfetscarloscr.mondaycarloscr.mondaylorenzo.palorenzo.pagiuliofigiuliofiheshamgoheshamgotaniasilvataniasilvabenymondaybenymondaydanielokanindanielokaninneomi_shavitneomi_shavitshaikatzzshaikatzzarielmondayarielmondayguywaguywatomsap-mondaytomsap-mondaylukaszf-mondaylukaszf-mondayeran-coheneran-cohenliorla13liorla13maya-assayagmaya-assayagrami-mondayrami-mondayethans-mondayethans-mondaywitoldtkwitoldtkerlich75erlich75adamflooradamfloorchenbechenbelahavplahavpomernave1omernave1rankupmondayrankupmondayjeandavidjeandavidmeromcomeromcoarnonrgoarnonrgomitzafon-mondaymitzafon-mondayyoavgayoavgalueranlueranliors619liors619nirro.mondaynirro.mondaynicole_kezliknicole_kezliklaurefelaurefemichalsz-mondaymichalsz-mondaymickey_mondaymickey_mondayitamarteitamartedor-cohendor-cohenliranbinliranbinasif_mondayasif_mondaylotemkirshlotemkirshorihassid2507orihassid2507itaymndyitaymndyeyalmueyalmuamirdana115amirdana115arekze-mondayarekze-mondayibmondayibmondayvikas-mondayvikas-mondayalonmualonmulukaszfiszer-mondaylukaszfiszer-mondaymarszelun-mondaymarszelun-mondayarnonguarnonguliortalmondayliortalmondaymarekpemarekpeharelcohenharelcohenameerdoameerdokamiekamiedekelabedekelabesergeyts4sergeyts4hadascohadascoalonsadanalonsadanrama-ronrama-rongilby1gilby1galor-mondaygalor-mondayran-haveshush-mondayran-haveshush-mondaymichaelsimkinmichaelsimkinbarakbsbarakbsedenhayatedenhayatrachelikarachelikaliorfrliorfranyatchernishovanyatchernishovnadavavnadavavthierryguythierryguynirarazi.mondaynirarazi.mondayedenberdugoedenberdugoneilmonneilmonalonzialonzirongabbayrongabbayetgarmonetgarmonronniemironniemiidofinderidofindermoshe-samsonmoshe-samsonadamru-mondayadamru-mondaygauravsh-mondaygauravsh-mondayshlomiatmondayshlomiatmondayandrey-palmanandrey-palmanleonidkrleonidkrtomzohtomzohshirsharshirsharmonday-grahamlamonday-grahamlayoni-alalufyoni-alaluftomer-gillmoretomer-gillmorerobertdarobertdasaarbasaarbatalsoffertalsofferalonlealonlestasshwstasshwataliareataliareidanmondayidanmondayraneldanraneldanbarosenbarosennoarenoarerotemda10rotemda10vladislavmovladislavmoyardendvyardendvchensarchensaryuvalgryuvalgrjohhh_mondayjohhh_mondayandreihryhoryeuandreihryhoryeuinbaldginbaldgjosephsamondayjosephsamondaynoasharvitnoasharvitkubakolybaczkubakolybaczbanueldobanueldomoriatmoriatmatanlamatanlaavivgiavivgialonschatzalonschatzidanoridanorshayo-arshayo-arshaharga4shaharga4michallormichallorsrdjan-mondaysrdjan-mondayggaallggaallshanmondayshanmondaytomerzlotomerzloophirdoophirdojohnny-morjohnny-morfilip-daca-mondayfilip-daca-mondayurielwasyngurielwasyngchrisbamondaychrisbamondayamitmazor37amitmazor37jakubmojakubmoflistflistoded_by_mondayoded_by_mondaymichaljamichaljatalahmondaytalahmondayamitcoamitcogalspmondaygalspmondayorelco2orelco2eyalleeyallealexjalbaalexjalbaadva-gonshadva-gonshorcomondayorcomondayronov1ronov1shoshanyshoshanygalko_mondaygalko_mondaymaciej-mondaymaciej-mondayalonbrimeralonbrimeraviv_goaviv_gobernardpo-mondaybernardpo-mondayeviatharmeviatharmshayalshayalronavmondayronavmondaygal_finger_mondaygal_finger_mondaymichaelimasmichaelimasyoavteyoavtemarta-mondaymarta-mondayarielklarielklmichalbelmichalbeldvirpedvirpeshaharshakishaharshakitomasztarczynskitomasztarczynskishalevkeshalevkeransarusiransarusimaor-barazanimaor-barazanimarcinko-mondaymarcinko-mondaydanielga-mondaydanielga-mondayeliyapleliyaplsapir_barsapir_baryavgenypayavgenypaomergrinomergrinigorczigorczmayaismayaistim-mondaytim-mondaygil_zilbermangil_zilbermansandeepkmondaysandeepkmondayleimoniomndleimoniomndadirhadirhgrzegorzrojekgrzegorzrojekorilaorilatomhousmantomhousmantomkochtomkochromkadriaromkadriayotamhermesyotamhermesroni-ben-aharonroni-ben-aharontomnisimtomnisimmoro256moro256litalwlitalwshirazbehar2shirazbehar2cezarylacezarylanirfridnirfridvasilyklvasilykldorbidorbiaviel_hershkovitzaviel_hershkovitzmayabarkanmayabarkanmatanmamanmatanmamanbenmamondaybenmamondaydoron.brikmandoron.brikmanliorl-mondayliorl-mondaytalhararitalhararitalshetalshetomersttomersttsemachlitsemachlilotanyuranlotanyuranramhillelramhillelidangaidangapiotrdu-mondaypiotrdu-mondayephraimgrephraimgrjakubso2749jakubso2749yevgeniliyevgenilidorsimmdorsimmmichaelvamondaymichaelvamondaygioraguatmondaygioraguatmondayyahorzhyahorzhshaharzishaharzianastasiyakhanastasiyakhomrialomrialofir-efraimofir-efraimmiloszpi-mondaymiloszpi-mondaykarolszmndykarolszmndyyardengavyardengavdanielmo-mondaydanielmo-mondaytalibl.mondaytalibl.mondayamirkeamirkeantonigmantonigmashb22ashb22neyemaawneyemaawrzmndrzmndrangr-mondayrangr-mondaytomer.mondaytomer.mondayyossisaadi.mondayyossisaadi.mondayofekkiofekkijonathansejonathansetheidotheidoguyhadasguyhadasronco99ronco99olegsh_mondayolegsh_mondayjr-mondayjr-mondayomerraomerradord2dord2giladar-mondaygiladar-mondaygiladscgiladscyuliagoldbergyuliagoldbergpiotrkopiotrkoyonatanbi-mondayyonatanbi-mondayaranweb-mondayaranweb-mondayhananmahananmaeladna-mondayeladna-mondaynaorsnaorssamwisamwilukaszmichlukaszmichuziabuziabasafswasafswadmonsaadmonsatalkortalkorv0vs-mondayv0vs-mondayamitbenmoramitbenmoravivzafraniavivzafraniyoniho_myoniho_mpinizopinizovickyhivickyhitiagopi-mondaytiagopi-mondayliangcaoldnliangcaoldnidanklingeridanklingerdanielepdanielepidanmoralidanmoralorborochovichorborochovichadirmonadirmontomergatomerganegevmanegevmayosia1990yosia1990rivkaungarrivkaungarmatbec96matbec96eliyahumanymondayeliyahumanymondayadirhaziz2adirhaziz2galbenoziliomdygalbenoziliomdyori-mondayori-mondaykuzalekskuzaleksnatanrolnik_mndnatanrolnik_mndkapusjkapusjavileviavileviliranroliranroorizvidamondayorizvidamondaykamalwo-mondaykamalwo-mondayasaf472mondayasaf472mondayguygotguygotnoamco-mondaynoamco-mondaydavidgohbergdavidgohbergnurkiewicznurkiewicznoamst-mondaynoamst-mondaymichael-azimovmichael-azimovnitzanshinitzanshisaridansaridanidanpedidanpedronilaronilaitaykalitaykalmoshiko_ben_avimoshiko_ben_avimondayshpiglifymondayshpiglifynoamagoodmannoamagoodmandimaaldimaalgadshgadshrotemdurotemduroishroishcmp-mondaycmp-mondaymaxime.mondaymaxime.mondaydanielvadanielvagabriel.amramgabriel.amraminbalziinbalzitomasz-fijalkowski-mondaytomasz-fijalkowski-mondayalmogrualmogrudaniilvodaniilvomondayjohnmondayjohnrotemassa123rotemassa123bashanyebashanyetomaszlamondaytomaszlamondayeden-eitanieden-eitanitom-katztom-katzlihibmlihibmdoniawadoniawaedogr1edogr1yonatanelyonataneleladdoeladdolukasz-dudzinskilukasz-dudzinskitom_shlomitom_shlomiodedsandakodedsandakhodayaishodayaisalexandrzhalexandrzhmichalpl-mondaymichalpl-mondayiradcoiradconitzanholmes718nitzanholmes718eliasgaeliasgaidoagidoagitaysimitaysimjacksnettjacksnetteladmondayeladmondaytomasfeldertomasfelderibgudmanibgudmanalexjialexjiitcerbyitcerbybrittdabrittdashahargmndshahargmndkevinmondaykevinmondaymortzmondaymortzmondayyoniarvivyoniarvivmarcin-gabmarcin-gabalonedelmanmonday1alonedelmanmonday1mulhamhamulhamhasheenanashsheenanashmaslomonday2maslomonday2talbamatalbamakuba_niemieckuba_niemiecyoavroyoavrocoralincoralinlaver_mondaylaver_mondaysimohanounasimohanounaohad-katzavohad-katzavmeytalfremeytalfredavidbr1davidbr1awallace327awallace327romanshapromanshapzivamzivamdh94dh94adamyahidadamyahidhagaiwehagaiweyoni-mondayyoni-mondayomerfoxomerfoxrivkapelegrivkapelegjakubrohlederjakubrohledertomaszjackowiaktomaszjackowiakfabiotaatmondayfabiotaatmondayishandua-mondayishandua-mondayhadarahhadarahmatthewtomatthewtoilyamezilyamezdamianmarek-mondaydamianmarek-mondayandrewlo-mondayandrewlo-mondaymaxdv-4016maxdv-4016shanybarshanybarsefinisefinikatedubouskayakatedubouskayamaor-karomaor-karonovrosenamnnovrosenamnjohnnpmmanjohnnpmmanharveyr-mondayharveyr-mondayyuval-moshe-mndyyuval-moshe-mndyyardenliyardenlisagilinshitssagilinshitsshaygrshaygrjeremybarnejeremybarneidoziidozibarakzabarakzashamilgshamilgibukun-mondayibukun-mondaysagibarkol89sagibarkol89alonsegalalonsegalofrichenofrichenyuvallev-mondayyuvallev-mondayshannon-mondayshannon-mondayjoel-mondayjoel-mondaymichaelozmondaymichaelozmondaybenlivnibenlivniapeslinapeslinnaorsolmondaynaorsolmondaysergeytsibulnik3sergeytsibulnik3jonathanadlerjonathanadlerliatyaliatyaalonmorgenalonmorgenellaportnovellaportnovadelebeadelebemichaelarmichaelaritamarhiitamarhileahorlinleahorlinruthiedarruthiedaramirfeamirferonykrishtalronykrishtalitaypa777itaypa777reutlevyreutlevyeithanhollandermondayeithanhollandermondaybenhabenhagiladomgiladomyuriisrohyiyuriisrohyiamirnajjaramirnajjarmohamedig1mohamedig1raunaq-mondayraunaq-mondayodedgoodedgonuri-mondaynuri-mondaysreekanthjusreekanthjunavelenavelelironamlironamzivha-mondayzivha-mondayshirzashirzazvimintszvimintsasif_d_dromiasif_d_dromibroster.mondaybroster.mondayhilakislevhilakislevtommattommateran_zidkiyaeran_zidkiyastavrastavraozkamaozkamaofirstofirstcarmeldahancarmeldahandordvdordvalonadaalonadadvirshdvirshtamarshetamarshemark-watkin-mondaymark-watkin-mondayshimony-urielshimony-urieltzvico-mondaytzvico-mondayasafbashiriasafbashiriohadleshnoohadleshnoor-mondayor-mondayaviramashkenazi-monaviramashkenazi-monjihyunum-mondayjihyunum-mondaydanielkorichdanielkorichguymarushchenkoguymarushchenkobruchim_mondaybruchim_mondaytomda-mondaytomda-mondaymiroslawwomiroslawwonickday-mondaynickday-mondayyuvalpadanyuvalpadanamalpiamalpiroeiyaroeiyaiddoaliddoalshirlyrashirlyramichaldamichaldayuvalezyuvalezkerensokerensoyaarmaypazyaarmaypazroiemondayroiemondayhadarlibmanhadarlibmannetaezra1netaezra1guybe-mondayguybe-mondayamitsabag1amitsabag1lorengolorengomusayedahmusayedahamitreamitreedendoron-mondayedendoron-mondayfranekmondayfranekmondaylinoymarganlinoymargannoam-yehudanoam-yehudasergeisasergeisamatanmematanmeyoavkulayoavkularoniavroniavmonadavmonadavsofivasofivaprzemyslawbprzemyslawbadiknafoadiknafoalekseiilalekseiilandreiyuandreiyubargaldbargaldtbreuerweiltbreuerweilyanivridelyanivridelmichalbudziakmichalbudziakdananodananourasmuurasmulayanhalayanhamoshe1100moshe1100moranossmoranosssergeym-mondaysergeym-mondaylevkomondaylevkomondayyonatanc163yonatanc163matkotmatkotolegkaplunolegkaplunohad-mondayohad-mondayandreyolandreyolnetta-snetta-schezkibotwinickchezkibotwinickwitoswitosguysimaimondayguysimaimonday

Readme

@mondaydotcomorg/atp-mcp-adapter

Model Context Protocol (MCP) adapter for Agent Tool Protocol - connect MCP servers and use their tools in ATP.

Overview

This package enables seamless integration between MCP (Model Context Protocol) servers and ATP servers. Connect to any MCP server (stdio or HTTP) and expose their tools as ATP APIs.

Installation

npm install @mondaydotcomorg/atp-mcp-adapter

Architecture

graph LR
    ATP[ATP Server] --> Adapter[MCP Adapter]
    Adapter --> Stdio[StdioTransport]
    Adapter --> HTTP[HTTPTransport]

    Stdio --> MCP1[MCP Server 1<br/>Filesystem]
    HTTP --> MCP2[MCP Server 2<br/>Database]
    HTTP --> MCP3[MCP Server 3<br/>API]

Quick Start

Connect to MCP Server (stdio)

import { createServer } from '@mondaydotcomorg/atp-server';
import { MCPConnector } from '@mondaydotcomorg/atp-mcp-adapter';

const server = createServer();
const mcpConnector = new MCPConnector();

// Connect to filesystem MCP server
const filesystemAPI = await mcpConnector.connectToMCPServer({
	name: 'filesystem',
	command: 'npx',
	args: ['-y', '@modelcontextprotocol/server-filesystem', '/path/to/files'],
	env: {
		LOG_LEVEL: 'info',
	},
});

server.addAPIGroup(filesystemAPI);

await server.start(3333);

// Agents can now use MCP tools:
// await atp.api.filesystem.read_file({ path: 'README.md' })
// await atp.api.filesystem.write_file({ path: 'file.txt', content: 'Hello' })

Connect to HTTP MCP Server

import { MCPHttpConnector } from '@mondaydotcomorg/atp-mcp-adapter';

const httpConnector = new MCPHttpConnector();

const databaseAPI = await httpConnector.connectToHttpServer({
	name: 'database',
	baseUrl: 'http://localhost:8080/mcp',
	headers: {
		Authorization: 'Bearer token',
	},
});

server.addAPIGroup(databaseAPI);

// Agents can use:
// await atp.api.database.query({ sql: 'SELECT * FROM users' })

Multiple MCP Servers

const mcpConnector = new MCPConnector();

const apis = await mcpConnector.connectToMultipleServers([
	{
		name: 'filesystem',
		command: 'npx',
		args: ['-y', '@modelcontextprotocol/server-filesystem', '/data'],
	},
	{
		name: 'git',
		command: 'npx',
		args: ['-y', '@modelcontextprotocol/server-git', '/repo'],
	},
	{
		name: 'database',
		command: 'npx',
		args: ['-y', '@modelcontextprotocol/server-postgres'],
		env: {
			DATABASE_URL: process.env.DATABASE_URL,
		},
	},
]);

apis.forEach((api) => server.addAPIGroup(api));

// Agents can now use:
// - atp.api.filesystem.*
// - atp.api.git.*
// - atp.api.database.*

MCP Connectors

MCPConnector (stdio)

Connect to MCP servers running as child processes via stdio.

import { MCPConnector } from '@mondaydotcomorg/atp-mcp-adapter';

const connector = new MCPConnector();

const apiGroup = await connector.connectToMCPServer({
  name: string;         // API group name
  command: string;      // Command to execute
  args: string[];       // Command arguments
  env?: Record<string, string>;  // Environment variables
});

Examples:

// Filesystem MCP server
const filesystem = await connector.connectToMCPServer({
	name: 'files',
	command: 'npx',
	args: ['-y', '@modelcontextprotocol/server-filesystem', '/data'],
});

// Custom Python MCP server
const custom = await connector.connectToMCPServer({
	name: 'custom',
	command: 'python',
	args: ['mcp_server.py'],
	env: {
		API_KEY: process.env.API_KEY,
	},
});

MCPHttpConnector

Connect to MCP servers over HTTP.

import { MCPHttpConnector } from '@mondaydotcomorg/atp-mcp-adapter';

const connector = new MCPHttpConnector();

const apiGroup = await connector.connectToHttpServer({
  name: string;         // API group name
  baseUrl: string;      // MCP server URL
  headers?: Record<string, string>;  // HTTP headers
});

Example:

const api = await connector.connectToHttpServer({
	name: 'remote-api',
	baseUrl: 'https://mcp.example.com',
	headers: {
		Authorization: 'Bearer token',
		'X-API-Key': process.env.API_KEY,
	},
});

Tool Conversion

MCP tools are automatically converted to ATP format:

// MCP tool definition
{
  name: 'read_file',
  description: 'Read file contents',
  inputSchema: {
    type: 'object',
    properties: {
      path: { type: 'string' }
    },
    required: ['path']
  }
}

// Converted to ATP function
{
  name: 'read_file',
  description: 'Read file contents',
  inputSchema: { /* same schema */ },
  handler: async (input) => {
    // Calls MCP server
    const result = await mcpClient.callTool({
      name: 'read_file',
      arguments: input
    });
    return result.content;
  }
}

Agent Usage

Once MCP servers are connected, agents can use their tools naturally:

// Agent-generated code
const files = await atp.api.filesystem.list_directory({
	path: '/data',
});

atp.log.info('Found files', { count: files.length });

for (const file of files) {
	const content = await atp.api.filesystem.read_file({
		path: file.path,
	});

	// Process with LLM
	const summary = await atp.llm.call({
		prompt: `Summarize this file: ${content}`,
	});

	// Write summary
	await atp.api.filesystem.write_file({
		path: `${file.path}.summary`,
		content: summary,
	});
}

MCP Server Examples

Official MCP Servers

// Filesystem
await connector.connectToMCPServer({
	name: 'filesystem',
	command: 'npx',
	args: ['-y', '@modelcontextprotocol/server-filesystem', '/path'],
});

// Git
await connector.connectToMCPServer({
	name: 'git',
	command: 'npx',
	args: ['-y', '@modelcontextprotocol/server-git', '/repo'],
});

// PostgreSQL
await connector.connectToMCPServer({
	name: 'postgres',
	command: 'npx',
	args: ['-y', '@modelcontextprotocol/server-postgres'],
	env: {
		DATABASE_URL: process.env.DATABASE_URL,
	},
});

// Puppeteer (browser automation)
await connector.connectToMCPServer({
	name: 'browser',
	command: 'npx',
	args: ['-y', '@modelcontextprotocol/server-puppeteer'],
});

Custom MCP Server

Create your own MCP server:

# mcp_server.py
from mcp.server import Server, Tool

server = Server("custom-mcp-server")

@server.tool()
async def process_data(data: str) -> dict:
    """Process data and return result"""
    result = perform_processing(data)
    return {"result": result}

if __name__ == "__main__":
    server.run()

Connect in ATP:

await connector.connectToMCPServer({
	name: 'custom',
	command: 'python',
	args: ['mcp_server.py'],
});

Error Handling

try {
	const api = await connector.connectToMCPServer({
		name: 'filesystem',
		command: 'npx',
		args: ['-y', '@modelcontextprotocol/server-filesystem', '/path'],
	});
	server.addAPIGroup(api);
} catch (error) {
	console.error('Failed to connect to MCP server:', error);
	// Handle connection error
}

Lifecycle Management

const connector = new MCPConnector();

// Connect
const api = await connector.connectToMCPServer(config);

// List connected servers
const servers = connector.listServers();
// Returns: ['filesystem', 'git', 'database']

// Close specific server
await connector.closeServer('filesystem');

// Close all servers
await connector.closeAll();

Types

interface MCPServerConfig {
	name: string;
	command: string;
	args: string[];
	env?: Record<string, string>;
}

interface MCPHttpConfig {
	name: string;
	baseUrl: string;
	headers?: Record<string, string>;
}

interface MCPTool {
	name: string;
	description?: string;
	inputSchema: {
		type: string;
		properties?: Record<string, unknown>;
		required?: string[];
	};
}

Integration Flow

sequenceDiagram
    participant Agent
    participant ATP Server
    participant MCP Adapter
    participant MCP Server

    Agent->>ATP Server: execute(code with atp.api.filesystem.read_file())
    ATP Server->>MCP Adapter: Call function
    MCP Adapter->>MCP Server: MCP request
    MCP Server-->>MCP Adapter: MCP response
    MCP Adapter-->>ATP Server: Converted result
    ATP Server-->>Agent: Execution result

Benefits

  • Zero modifications to existing MCP servers
  • Automatic tool discovery and conversion
  • Type-safe integration with ATP
  • Support for stdio and HTTP transports
  • Multiple server connections in single ATP server
  • Error handling and lifecycle management

TypeScript Support

Full TypeScript definitions included.

License

MIT