Neonia
The ultimate platform for Autonomous AI Agents. Features include Autonomous Tool Discovery (dynamically finds and executes missing capabilities), Stateful Cloud Memory (remembers cross-session context), Context Packing (saves LLM tokens), and 20+ specialized dev tools.
Neonia Agent MCP Examples
A collection of autonomous agent examples demonstrating how to integrate the Neonia Model Context Protocol (MCP) Gateway using the official Streamable HTTP transport standard.
About These Examples
This repository will continuously grow with new patterns demonstrating deterministic, high-performance AI agents.
Our first major showcases focus on solving two critical problems in modern agent architectures: Context Window Bloat and Tool Rigidity.
1. Solving Tool Rigidity (Auto-Pilot Discovery)
Agents are traditionally hard-coded with a static list of tools. If a user asks for something outside that list, the agent hallucinates or fails. The auto-discovery-url-to-markdown examples demonstrate how to give your agents true autonomy. By connecting to the Neonia Gateway, the agent can dynamically search for missing capabilities, read the tool's schema, and execute it on the fly without human intervention.
2. Solving Context Bloat (Zero-Bloat Data Processing)
Traditionally, when an agent needs to extract data from a large 5MB JSON file, it loads the entire file into its context window, causing massive token consumption, high latency, and LLM "amnesia". By connecting to the Neonia MCP Gateway (mcp.neonia.io/mcp?tools=neo_data_jq_filter), our zero-bloat-jq-filter agents explicitly bind the Wasm-powered JQ Filter tool. The agent executes queries on the remote server and receives only the filtered result (e.g. $651,758.23), saving ~50,000+ tokens per request and responding almost instantly.
3. Stateful Memory Note (stateful-cloud-memory)
Agents typically suffer from absolute amnesia between sessions. If a user states a preference or business rule, it is lost unless hardcoded into the system prompt. The stateful-cloud-memory examples demonstrate how to create stateful agents that use Neonia's neo_sys_memory_note tool to dynamically store and recall rules (like custom personas or user preferences) across completely isolated sessions without needing a custom database.
(More examples covering vision extraction, dynamic execution, and multi-agent orchestration will be added soon!)
Examples Provided
This repository includes implementations of "Zero-Bloat Data Processing", "Auto-Pilot Tool Discovery", and "Stateful Memory Note" across major agentic frameworks in 3 different languages:
1. Python (LangGraph)
A deterministic workflow using LangChain and LangGraph to build a reactive agent (create_agent) that dynamically wraps MCP capabilities into native LangChain @tool instances.
- Directories:
python/langgraph/zero-bloat-jq-filter,python/langgraph/chained-json-jq-filter,python/langgraph/auto-discovery-url-to-markdown,python/langgraph/stateful-cloud-memory - Setup:
uv sync && uv run python agent.py
2. Python (SmolAgents)
A self-assembling agent using Hugging Face's SmolAgents and LiteLLM. Demonstrates subclassing smolagents.Tool for synchronous forward execution wrapped around an asynchronous Streamable HTTP session.
- Directories:
python/smolagents/zero-bloat-jq-filter,python/smolagents/chained-json-jq-filter,python/smolagents/auto-discovery-url-to-markdown - Setup:
uv sync && uv run python main.py
3. TypeScript (Vercel AI SDK)
An integration with the Vercel AI SDK utilizing the official @modelcontextprotocol/sdk and @openrouter/ai-sdk-provider. Demonstrates proper multi-turn tool calling and schema mapping for Claude 3.7 Sonnet.
- Directories:
typescript/vercel-ai-sdk/zero-bloat-jq-filter,typescript/vercel-ai-sdk/chained-json-jq-filter,typescript/vercel-ai-sdk/auto-discovery-url-to-markdown,typescript/vercel-ai-sdk/stateful-cloud-memory - Setup:
npm install && npm start
4. Rust (Rig)
A statically-typed integration using the Rig agent framework and rust-mcp-sdk. Demonstrates bridging an initialized MCP client session into Rust's strong type system.
- Directories:
rust/rig/zero-bloat-jq-filter,rust/rig/chained-json-jq-filter,rust/rig/auto-discovery-url-to-markdown,rust/rig/stateful-cloud-memory - Setup:
cargo run
Prerequisites
To run these examples, you will need:
- A Neonia API Key (
NEONIA_API_KEY) - An OpenRouter API Key (
OPENROUTER_API_KEY)
Configure these in the .env file within the specific example directory you wish to run.
Ecosystem Architecture
agent-mcp-examples/
├── typescript/ # TypeScript Ecosystem
│ └── vercel-ai-sdk/ # Vercel AI SDK Framework
│ ├── zero-bloat-jq-filter/ # Single-tool Data Processing
│ ├── chained-json-jq-filter/ # Multi-tool Chained Data Processing
│ ├── auto-discovery-url-to-markdown/ # Auto-Pilot Tool Discovery
│ └── stateful-cloud-memory/ # System Memory Note Persistence
│
├── python/ # Python Ecosystem
│ ├── langgraph/ # LangGraph Framework
│ │ ├── zero-bloat-jq-filter/
│ │ ├── chained-json-jq-filter/
│ │ ├── auto-discovery-url-to-markdown/
│ │ └── stateful-cloud-memory/
│ └── smolagents/ # SmolAgents Framework
│ ├── zero-bloat-jq-filter/
│ ├── chained-json-jq-filter/
│ ├── auto-discovery-url-to-markdown/
│ └── stateful-cloud-memory/
│
└── rust/ # Rust Ecosystem
└── rig/ # Rig Framework
├── zero-bloat-jq-filter/
├── chained-json-jq-filter/
├── auto-discovery-url-to-markdown/
└── stateful-cloud-memory/
Available Examples
Each example is self-contained and demonstrates specific, production-ready architectural patterns over MCP.
1. Auto-Pilot Tool Discovery (auto-discovery-url-to-markdown)
Demonstrates how to give agents true autonomy. If an agent lacks a required capability, it dynamically searches the Neonia Gateway for a matching tool, reads its parameters, and executes it on the fly without human intervention.
- 📂 auto-discovery-url-to-markdown (TypeScript / Vercel AI SDK)
- 📂 auto-discovery-url-to-markdown (Python / LangGraph)
- 📂 auto-discovery-url-to-markdown (Python / SmolAgents)
- 📂 auto-discovery-url-to-markdown (Rust / Rig)
2. Zero-Bloat Data Processing (zero-bloat-jq-filter)
Demonstrates how to safely process massive API payloads using a deterministic Wasm JQ filter at the edge, drastically reducing LLM token context usage and preventing hallucination.
- 📂 zero-bloat-jq-filter (TypeScript / Vercel AI SDK)
- 📂 zero-bloat-jq-filter (Python / LangGraph)
- 📂 zero-bloat-jq-filter (Python / SmolAgents)
- 📂 zero-bloat-jq-filter (Rust / Rig)
3. Chained Data Execution (chained-json-jq-filter)
Demonstrates how to safely process massive API payloads using a chained data workflow. The agent uses neo_web_json_fetch to retrieve remote JSON and stores it on the Gateway, returning a lightweight pointer. It then passes this pointer to a deterministic Wasm JQ filter (neo_data_jq_filter) to extract exactly what it needs, keeping its context window incredibly small.
- 📂 chained-json-jq-filter (TypeScript / Vercel AI SDK)
- 📂 chained-json-jq-filter (Python / LangGraph)
- 📂 chained-json-jq-filter (Python / SmolAgents)
- 📂 chained-json-jq-filter (Rust / Rig)
4. Stateful Memory Note (stateful-cloud-memory)
Demonstrates how to use the System Memory Note tool (neo_sys_memory_note) to allow an agent to remember personas or business rules across completely isolated sessions.
- 📂 stateful-cloud-memory (TypeScript / Vercel AI SDK)
- 📂 stateful-cloud-memory (Python / LangGraph)
- 📂 stateful-cloud-memory (Python / SmolAgents)
- 📂 stateful-cloud-memory (Rust / Rig)
Getting Started
To run the examples, you will need an Anthropic API key (for the AI agent) and a free Neonia API key (for the Wasm MCP Gateway).
-
Clone the repository:
git clone https://github.com/neonia-io/agent-mcp-examples.git cd agent-mcp-examples -
Navigate to the example you want to try:
cd typescript/vercel-ai-sdk/zero-bloat-jq-filter -
Set up environment variables:
OPENROUTER_API_KEY="your-openrouter-key" NEONIA_API_KEY="your-neonia-key"(Note: The Neonia Gateway requires a free API key to authenticate MCP connections).
-
Install dependencies and run:
npm install npx tsx index.ts
相關伺服器
Poof
Background removal API - remove backgrounds from images with a simple API call. Supports PNG, JPEG, WebP output with transparency or custom backgrounds.
MCP Dev Brasil
37 MCP servers for agentic commerce — Stripe ACP, x402, AP2, Google UCP, plus 14 Brazilian payment rails. ~480 tools.
MCP HUB
The Ultimate Control Plane for MCP Unlock the full power of Model Context Protocol with zero friction. One-Click GPT Integration: Bridge the gap between MCP servers and ChatGPT/LLMs instantly. No more manual config hunting. Pro-Level Orchestration: Manage, monitor, and toggle multiple MCP tools from a single, intuitive dashboard. Secure by Design: Built-in support for complex auth flows and 2FA, making enterprise-grade tool integration seamless. Streamlined Debugging: Test queries and inspect tool responses in real-time without leaving the hub. Stop wrestling with JSON configs. Start building agentic workflows that actually work.
O'RLY Book Cover Generator
Generates O'RLY? (O'Reilly parody) book covers.
Relay Protocol MCP Server
An MCP server for the Relay Protocol REST API, enabling cross-chain bridging and token swapping operations.
observability-mcp
One MCP server that connects to any observability backend through pluggable connectors, normalizes the data, adds intelligent analysis, and provides a web UI for configuration.
Guesty MCP Server
First MCP server for Guesty property management. 38 tools for reservations, guests, messaging, pricing, financials, calendars, reviews, tasks, and webhooks. Free tier with 23 tools, Pro tier with all 38.
bioinformatics-mcp-server
Bioinformatics data for AI agents — gene search, protein structures, clinical variants, PubMed literature, and DNA sequences via NCBI and UniProt. No API key required.
MCP OCR Server
An MCP server for Optical Character Recognition (OCR) using the Tesseract engine.
Pinterest Ads MCP
Connect Pinterest Ads to Claude or ChatGPT via Two Minute Reports MCP to get clear insights into Pin clicks, outbound clicks, engagement rate and conversions.