Astrail
Imports Google Discovery documents to generate typed tools for Google APIs, enabling agents to interact with Google services that expose Discovery documents.
Imports GraphQL schemas to generate typed tools for GraphQL APIs, enabling agents to query and mutate data via GraphQL endpoints.
Imports OpenAPI and Swagger specifications to generate typed tools for REST APIs, enabling agents to call endpoints defined in Swagger/OpenAPI documents.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AstrailImport my OpenAPI spec and generate tools with deletes blocked"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Astrail turns API definitions into typed tools that agents can discover and call through the Model Context Protocol (MCP). Import a spec, generate the tools, and configure how they execute. The runtime brings authentication, OAuth, approvals, network policy, and traces into the same workflow.
Start with the API you already have. Import OpenAPI/Swagger, Google Discovery, GraphQL, or an existing HTTP MCP server.
Make execution explicit. Configure allow, approval, and block policies alongside credential and scope checks.
Inspect the path from tool to endpoint. Calls follow deterministic endpoint maps; Code Mode compiles supported calls without evaluating generated JavaScript.
Try the core locally. The offline example generates and validates tools without a database, account, model key, or upstream API call.
Why Astrail
An agent needs more than an API description to take an action: it needs a tool schema, a route to execute, credentials, and rules for when the call is allowed. Astrail brings those pieces into one workflow.
Import the API definition, inspect the generated tools, then expose a configured MCP endpoint. Runtime calls resolve through endpoint maps, pass authentication and policy checks, and execute against the upstream API. Traces help you inspect what happened. Generated source is available for export; the hosted runtime does not evaluate it.
Related MCP server: MCP Bridge
Use cases
Examples to build with your own APIs and credentials:
Workflow | Tools to expose | Policy to consider |
Support | Find tickets and prepare updates | Require approval for changes |
Operations | Look up inventory and create purchase orders | Allow reads; review purchases |
Internal tools | Search CRM records and update account fields | Limit tools and credentials by role |
These are integration ideas, not bundled end-to-end automations. Start with a small contract and verify each tool before enabling writes.
Quick start
Requires Node.js 22.18+ and npm. No database, model API key, or account is needed for this example.
git clone https://github.com/codewithriza/astrail.git
cd astrail
npm ci
npm run demo:offlineSee it in action
Visual summary of the runnable offline example below.
The example runs the real generation pipeline against a small Notes API spec:
notes_list_notes allow
notes_create_note approval
notes_delete_note blockIt validates the generated tools and their policies, with network access disabled. It generates tools; it does not execute the fictional Notes API. Read the example, change the spec, and inspect the result.
How it works

Architecture overview. Future adapters are planned; website support is limited to public read workflows. See current boundaries for deployment and export limitations.
flowchart LR
A[API definition] --> B[Typed MCP tools]
B --> C{Execution policy}
C -->|Allow| D[HTTP endpoint]
C -->|Approval required| E[Approval check]
E --> D
C -->|Block| F[Request rejected]The offline example stops at generation and policy validation. A configured deployment adds authentication, credential handling, execution, and traces.
Capabilities
Area | Included |
Import | OpenAPI/Swagger, Google Discovery, GraphQL, existing HTTP MCP servers |
Generate | Typed tools, searchable endpoint catalogs, constrained Code Mode |
Control | Authentication, OAuth scopes, approvals, network policy, bounded retries |
Inspect | Execution traces and request validation |
Connect | Dashboard, CLI, TypeScript and Python clients, SDK exports |
Export | Manual Cloudflare Worker exports with a narrower runtime feature set |
See the architecture guide for the request flow and module boundaries.
Run the dashboard
cp .env.local.example .env.local
npm run devOpen localhost:3000. The local environment example enables development-only demo auth. This preview does not replace a persistent backend. For stored servers, real users, and provider credentials, configure Neon and authentication, apply the schema, and follow the platform setup guide.
AI-assisted generation is optional. Deterministic generation works without ANTHROPIC_API_KEY. Hosted operation currently depends on Neon Auth/Data API; this is not yet a database-independent, one-command deployment.
For container deployment, follow the Docker guide.
Connect to an endpoint
After creating a server in your own deployment:
export ASTRAIL_MCP_ENDPOINT='https://YOUR_HOST/api/mcp/YOUR_SERVER_ID'
export ASTRAIL_API_KEY='YOUR_API_KEY'
node bin/astrail.mjs status
node bin/astrail.mjs tools listUse node bin/astrail.mjs help for calls, connector discovery, and the stdio bridge. See the CLI guide for configuration and protocol limits. Public package releases are not yet available; run the CLI from this checkout.
Documentation
I want to… | Start here |
Try generation without credentials | |
Run a local demo | |
Configure a persistent deployment | |
Connect an MCP client | |
Understand the codebase | |
Review execution and security controls | |
Make a contribution | |
Explore all guides |
Repository layout
app/ Next.js pages and API routes
lib/ Generation, authentication, and runtime logic
components/ Shared UI components
bin/ CLI and transport helpers
sdk/ TypeScript and Python clients
database/ Base schema and incremental migrations
config/typescript/ Focused smoke-test compiler configurations
tests/ Unit, SDK, and browser tests
scripts/ Development and verification commands
examples/ Runnable examples
docs/ Setup and architecture guidesDevelopment
npm test # unit regressions and core smoke checks
npm run check # repository checks, lint, types, tests, and buildCI also runs runtime security, OAuth, integration, export, and UI smoke checks. Changes to those areas require their corresponding tests; see CONTRIBUTING.md.
Current boundaries
Astrail is an early project. Website automation is limited to public read workflows. Code Mode statically compiles supported calls; it cannot execute arbitrary JavaScript. Worker export has a narrower feature set than the hosted runtime. Multi-region deployments need distributed limits and external edge protection. Provider OAuth applications and scopes require operator configuration.
Do not treat tool descriptions or approval metadata alone as an authorization boundary. Read the threat model, security policy, and runtime permissions before exposing a deployment.
Contribute
Useful starting points are reproducible importer bugs, minimal OpenAPI fixtures, clearer setup instructions, and tests for provider edge cases. Start with the contribution guide and roadmap. Open a discussion before a large architectural change.
Community and links
Built by Riza and Aditya. Follow us for Astrail updates and what we’re building next.
Riza
Aditya
License
MIT. Dependencies retain their own licenses. Astrail names and logos are not covered by a trademark grant.
Why we open-sourced it
We built Astrail because connecting agents to APIs meant writing the same tool definitions, auth handling, and request logic over and over. We wanted to make that easier.
We applied to YC twice. For S26, we got an interview with YC partners Harshitha Arora and Diana Hu. For F26, we made the top 10%. We decided we wanted to work on something else, so we open-sourced Astrail. There’s still plenty here to use and build on. Play around with it and let us know what you make.
— Riza & Aditya
This server cannot be deployed
Maintenance
Related MCP Connectors
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
A managed runtime for custom API integrations. Manage lines, endpoints, keys, logs and DLQ via MCP.
Build, validate, deploy — HTTP APIs, cron jobs, webhooks and MCP tools — from your AI client.
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes any REST API as MCP tools, enabling AI agents to discover and call existing HTTP endpoints without modifying the original API.-
- AlicenseNot gradedqualityDmaintenanceConverts existing HTTP operations and cURL commands into structured, local-first MCP tools that AI agents can call safely.12 npm1MIT
- AlicenseAqualityBmaintenanceExposes OpenAPI/Swagger API documentation as MCP tools, enabling AI agents to search, inspect, and call API endpoints through natural language.510 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to call any OpenAPI-defined API by automatically converting its operations into tools, with built-in support for authentication, rate limiting, and response handling.7Apache 2.0