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

@forestadmin/mcp-server

v1.5.0

Published

Model Context Protocol server for Forest Admin with OAuth authentication

Downloads

1,654

Readme

@forestadmin/mcp-server

Model Context Protocol (MCP) server for Forest Admin with OAuth authentication support.

Overview

This MCP server provides HTTP REST API access to Forest Admin operations, enabling AI assistants and other MCP clients to interact with your Forest Admin data through a standardized protocol.

Usage

With Forest Admin Agent

The MCP server is included with the Forest Admin agent. Simply call mountAiMcpServer():

import { createAgent } from '@forestadmin/agent';

const agent = createAgent(options)
  .addDataSource(myDataSource)
  .mountAiMcpServer();

agent.mountOnExpress(app);
agent.start();

The MCP server will be automatically initialized and mounted on your application.

Standalone Server

You can also run the MCP server standalone using the CLI:

npx forest-mcp-server

Or programmatically:

node dist/index.js

Environment Variables

The following environment variables are required to run the server as a standalone:

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | FOREST_ENV_SECRET | Yes | - | Your Forest Admin environment secret | | FOREST_AUTH_SECRET | Yes | - | Your Forest Admin authentication secret (must match your agent) | | MCP_SERVER_PORT | No | 3931 | Port for the HTTP server |

Example Configuration

export FOREST_ENV_SECRET="your-env-secret"
export FOREST_AUTH_SECRET="your-auth-secret"
export MCP_SERVER_PORT=3931

npx forest-mcp-server

API Endpoint

Once running, the MCP server exposes a single endpoint:

  • POST /mcp - Main MCP protocol endpoint

The server expects MCP protocol messages in the request body and returns MCP-formatted responses.

Features

  • HTTP Transport: Uses streamable HTTP transport for MCP communication
  • OAuth Authentication: Built-in support for Forest Admin OAuth
  • CORS Enabled: Allows cross-origin requests
  • Express-based: Built on top of Express.js for reliability and extensibility

Development

Building

npm run build

Watch Mode

npm run build:watch

Linting

npm run lint

Testing

npm test

Cleaning

npm run clean

Architecture

The server consists of:

  • ForestMCPServer: Main server class managing the MCP server lifecycle
  • McpServer: Core MCP protocol implementation
  • StreamableHTTPServerTransport: HTTP transport layer for MCP
  • Express App: HTTP server handling incoming requests

License

GPL-3.0

Repository

https://github.com/ForestAdmin/agent-nodejs

Support

For issues and feature requests, please visit the GitHub repository.