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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@arcote.tech/arc-mcp

v0.8.25

Published

Model Context Protocol server for Arc framework — exposes Arc tools over streamable HTTP

Downloads

2,570

Readme

@arcote.tech/arc-mcp

Serwer Model Context Protocol dla Arc — wystawia narzędzia Arc (ArcTool) klientom MCP, takim jak Claude Desktop, przez transport streamable HTTP.

Te same toole obsługują czat AI w aplikacji i kanał MCP. Jedno źródło prawdy, zero duplikacji: ArcTool.toJsonSchema() daje kształt wymagany przez tools/list, a executeWithContext() jest wprost implementacją tools/call.

Użycie

import { mcpServer } from "@arcote.tech/arc-mcp";

export const subiektMcp = mcpServer("subiektMcp")
  .path("/mcp")
  .serverInfo({ name: "Berotex Subiekt", version: "1.0.0" })
  .instructions("Dane magazynowe i sprzedażowe z Subiekta GT.")
  .protectBy(workspaceToken, () => true)
  .scopeFrom((p) => p.workspaceId)
  .useTools(subiektTools)
  .build();

build() zwraca zwykły route, więc rejestrujesz go w context([...]) jak każdy inny element.

Realny URL to /route/mcp — prefiks /route dokłada host Arc i nie da się go pominąć.

Obsługiwane metody

| Metoda | Zachowanie | |---|---| | initialize | Negocjacja wersji (2025-06-18, 2025-03-26, 2024-11-05), capabilities.tools, serverInfo, opcjonalne instructions | | notifications/initialized | Notyfikacja — odpowiedź 202 bez ciała | | tools/list | Deskryptory z polem inputSchema | | tools/call | Wykonanie narzędzia → { content: [{ type: "text", text }] } | | ping | Pusty wynik |

Batch JSON-RPC (tablica wiadomości) jest obsługiwany, mimo że spec 2025-06-18 go wycofał — starsi klienci go używają, a koszt obsługi jest zerowy.

Decyzje projektowe

Serwer jest bezstanowy. Nie wydaje Mcp-Session-Id, a GET i DELETE zwracają 405 (spec wprost na to pozwala). Narzędzia Arc odpowiadają synchronicznie w ramach POST-a, więc kanał SSE server→client nie miałby czego nieść, a stan sesji w pamięci procesu psułby się przy wielu instancjach i przy federacji modułów.

Toole interaktywne są pomijane. Tool bez .handle(), który odpowiada przez respond() z interfejsu, nie ma odpowiednika w MCP — protokół nie potrafi poprosić klienta o interakcję użytkownika. Takie toole nie pojawią się w tools/list; sprawdzisz je przez getter .skippedTools. Jeśli żaden tool nie ma handlera, build() rzuca wyjątkiem, zamiast wystawić pusty serwer.

Błąd narzędzia to poprawna odpowiedź. Wyjątek z handlera wraca jako result z isError: true, nie jako błąd JSON-RPC — model ma go zobaczyć i zareagować, a błąd transportowy zerwałby mu kontekst. Błędami JSON-RPC są tylko naruszenia protokołu (nieznana metoda, brak nazwy narzędzia, zły JSON).

Zdolności resources i prompts nie są deklarowane. Arc nie ma czym ich wypełnić, a pusta zdolność tylko myli klientów.

Autoryzacja

Domyślnie route wymaga tokena — bez .protectBy() ani .public() host przepuści tylko żądania z dowolnym ważnym tokenem Arc. Token czytany jest z nagłówka Authorization: Bearer <token>, czyli dokładnie tak, jak wysyłają go klienci MCP.

.scopeFrom(fn) mapuje parametry tokena na wartość identifyBy widoczną w handlerach jako ctx.identifyBy — odpowiednik .billTo(...) z ArcChat.

Weryfikacja

curl -X POST localhost:5005/route/mcp \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'