Hey dev community 👋
As the agent ecosystem keeps growing, I’ve noticed a recurring problem:
You might have one solid business API or proprietary data, but to make it usable across different agent platforms, you end up rebuilding it in multiple formats:
MCPs, Skills ,CLIs , REST APIs , Even language-specific SDKs (Python / TypeScript). That is painful when you want to upgrade, you have to upgrade on all of it, which means duplicated effort, multiple codebases, and painful maintenance.
That’s why I started OneKey Gateway project:
GitHub OneKey Gateway
with internal gateway layer, central Agent API registry platform, onekey authentication, and omni format converter, you only need to maintain one API/data, and users/agents can use in all formats.
Introduction
OneKey Gateway Agent/Skills/MCP Conversion Matrix Roadmap
Register and maintain your APIs only once, allow agents/users to use your APIs in other formats 10x faster, supported CLIs/Skills/Rest API/MCPs
| From \ To | API | CLI | Skills | Routed API | MCPs (StreamingHTTP) | MCPs (Stdio Local) |
|---|---|---|---|---|---|---|
| API | - | ✅ | ✅ | ✅ | ✅ | - |
| CLI | - | - | ✅ | - | - | ✅ |
| Skills | - | - | - | - | ✅ | ✅ |
| Routed API | - | - | - | - | - | - |
| MCPs (Streaming HTTP) | - | - | - | - | - | - |
| MCPs (Stdio Local) | - | - | - | - | - | - |
So the question is: Today, most solutions only partially solve this. You’ll find tools like fastapi_mcp and similar converters—but they’re still code-level solutions:
You still need to write glue code. You still need to maintain multiple packages, publish and version each format
In reality, you might end up managing 6–10 different packages for a single API.
That’s not scalable.
The workflow of OneKey Agent Gateway works like
Register your API
→ Store metadata (Agent meta, API meta OpenAPI, auth, configs)
→ Auto-generate & distribute as
- CLI
- Skills
- MCP
- REST Router
-> Agent Requests Routed to your APIs
Here is the roadmap of potential cases of conversion between various formats: https://github.com/aiagenta2z/onekey-gateway
Now I will introduce you how to convert a food calories API to various formats without publishing any more packages and use the OneKey Gateway.
OneKey Gateway Registered and Routed
Original API
Food Nutrition API from U.S. Department of Agriculture
Search the nutritions caloeries of Cheddar Cheese.
curl -XPOST -H "Content-Type:application/json" -d "{\"query\":\"Cheddar cheese\"}" https://api.nal.usda.gov/fdc/v1/foods/search?api_key=DEMO_KEY
After registration as in docs OneKey Gateway Doc. Agents/Users can use your APIs in various formats:
Convert API to CLI
npx onekey agent fdcnal/usda-fooddata-central-agent search_foods '{"query": "Cheddar Cheese","pageSize": 10}'
Convert API to Skills
npx agtm skills build fdcnal/usda-fooddata-central-agent
It will generate local ./skills folder with scripts and CLIs
Convert API to MCP
npx onekey mcp fdcnal/usda-fooddata-central-agent
It generates a mcp config to access your APIs
{
"mcpServers": {
"deepnlp-onekey-fdcnal-usda-fooddata-central-agent": {
"url": "https://agent.deepnlp.org/mcp?server_name=fdcnal/usda-fooddata-central-agent&onekey=YOUR_KEY"
}
}
}
Convert API to REST Router in programming way
export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_ROUTER_KEY
curl -X POST "https://agent.deepnlp.org/agent_router" -H "Content-Type: application/json" -H "X-OneKey: $DEEPNLP_ONEKEY_ROUTER_ACCESS" -d '{"unique_id":"fdcnal/usda-fooddata-central-agent","api_id":"search_foods","data":{"query":"Cheddar Cheese","pageSize":10}}'
And for the remaining blog, I will introduce you how to register the API to DeepNLP x AI Agent A2Z agent registry.
and distribute in various formats.
2. Quickstart Example: USDA FoodData Central API
Let’s see how to register and convert a Food Nutrition API:
2.1 Prepare API Specs
Use the USDA OpenAPI specs (fdc_api.json or fdc_api.yaml) to define your agent metadata. If no OpenAPI or similar specs are available, provide the python/typescript definition as "def my_func(param1: str,...)" to coding agent/claude code/codex to help you generate the meta.
agent.yaml
api_list:
- api_id: search_foods
protocol: https
description: Search for food items and calories
endpoint: https://api.nal.usda.gov/fdc/v1/foods/search
method: POST
params:
query: str
pageSize: int
auth:
type: API_KEY
header: "X-Api-Key"
value: $YOUR_FDC_API_KEY
You can also generate this using Claude Code or Codex. I am using the prompt, in the Github repo run the prompt:
Generate agent.json and agent.yaml file following the format of ./examples/usda_food_api/agent.json and agent.yaml format,
fill in the api_list key, with meta of APIs: api_id,protocol,description,endpoint,method,params,auth, For params, you can read the necessary informations from the the OpenAPI specs of fdc_api.json.
Output to /agent.json or /agent.yaml formats
1.2 Register Your API
Get your OneKey Gateway registry key, the key will identify you as the owner of the registered API. Get Keys at Keys
export AI_AGENT_MARKETPLACE_ACCESS_KEY=YOUR_REGISTRY_KEY
npx agtm upload --config ./agent.yaml
Your agent’s unique ID is in user_id/repo_name format, e.g.:
fdcnal/usda-fooddata-central-agent
1.3. Usage Examples
API2REST
The request will be posted to central registry endpoint, https://agent.deepnlp.org/agent_router, authenticated once and routed
to your registered API endpoint with payload and headers for authentication. Note the access_key devs provide are encrypted safely and decrypted/routed to your registered API.
export AI_AGENT_MARKETPLACE_ACCESS_KEY=YOUR_REGISTRY_KEY
curl -X POST "https://agent.deepnlp.org/agent_router" \
-H "Content-Type: application/json" \
-H "X-OneKey: $DEEPNLP_ONEKEY_ROUTER_ACCESS" \
-d '{
"unique_id": "fdcnal/usda-fooddata-central-agent",
"api_id": "search_foods",
"data": {"query": "Cheddar Cheese","pageSize": 10}
}'
API2CLI
Users can use your API in the common command line npx onekey agent <unique_id> <api_id> <payload>
npx onekey agent <unique_id> <api_id> <payload>
npx onekey agent fdcnal/usda-fooddata-central-agent search_foods '{"query": "Cheddar Cheese","pageSize": 10}'
API2Skills
If you readily convert your APIs to local skills under the folder ./skills/your-api-converted-skill/*
npx agtm skills build fdcnal/usda-fooddata-central-agent
Generates:
skills/fdcnal-usda-fooddata-central-agent/
├── SKILL.md
├── scripts/
└── reference/
API2MCP Server
npx onekey mcp fdcnal/usda-fooddata-central-agent
Generates config for StreamingHTTP MCPs:
{
"mcpServers": {
"deepnlp-onekey-fdcnal-usda-fooddata-central-agent": {
"url": "https://agent.deepnlp.org/mcp?server_name=fdcnal/usda-fooddata-central-agent&onekey=YOUR_KEY"
}
}
}
RoadMap
If you like the ideas of the onekey gateway and roadmap of converter.
You can also contribute more use cases, documents and your registered APIs at the Onekey Gateway GitHub and AI Agent Marketplace GitHub.

Top comments (0)