JustOneAPI MCP Server Tutorial: Let AI Assistants Find and Call Data APIs
Learn how to connect JustOneAPI MCP Server to Claude Code, Codex, Cursor, Hermes Agent, and other clients so your AI assistant can find endpoints, inspect parameters, and call APIs.
What MCP is
MCP stands for Model Context Protocol. It gives AI clients a standard way to connect to external tools, data sources, and APIs. For developers, the practical value is simple: your AI assistant can do real work through a tool protocol instead of only describing what to do.
JustOneAPI MCP Server exposes the Just One API endpoint catalog, parameter schemas, and API calling workflow to MCP-compatible clients. After connecting it, you can ask Claude Code, Codex, Cursor, Hermes Agent, or another compatible client to find the right endpoint, inspect required parameters, and call an API after you provide the required values.
What JustOneAPI MCP helps with
- You do not need to browse every API document manually. The assistant can search endpoint candidates from a natural language request.
- You do not need to guess parameter names. The assistant can inspect the endpoint schema before explaining required parameters, enum values, and calling rules.
- You do not need to write every request by hand. The assistant can call the selected endpoint with your token and business parameters.
- You can continue paginated results by asking the assistant to follow the next-page hint from the previous response.
- You can check account balance, recent usage, and spending during debugging.
- You can ask the assistant to interpret common response codes and parameter errors.
Prepare your JustOneAPI token
Before using MCP, prepare a JustOneAPI token. Log in to the JustOneAPI Dashboard, then copy your token from the account or API token area.
Your token is sensitive. Do not commit it to public repositories, include it in public screenshots, or share it with untrusted parties. Replace your_token in the examples with your real token.
Supported clients
JustOneAPI MCP recommends a remote connection over Streamable HTTP. Common clients covered by the ready-to-use configurations in this tutorial include:
- Claude Code
- Codex CLI, Codex App, and the Codex IDE extension
- Cursor
- Hermes Agent
- Other clients that support remote HTTP MCP servers and custom request headers
The configuration file and command syntax differ by client, but every client uses the same MCP URL and authentication method.
Connection details
- MCP URL:
https://mcp.justoneapi.com/mcp - Request header:
Authorization: Bearer your_token
If your client uses the common mcpServers JSON structure, use the following as a reference:
{
"mcpServers": {
"justoneapi": {
"url": "https://mcp.justoneapi.com/mcp",
"headers": {
"Authorization": "Bearer your_token"
}
}
}
}After saving the configuration, restart or refresh your MCP client. The client must support both remote HTTP MCP servers and a custom Authorization header.
Connect by client
Claude Code
Claude Code can add a remote HTTP MCP server from the command line. The following command uses user scope, making the configuration available across your personal projects without committing a token-bearing configuration to a project repository.
claude mcp add \
--transport http \
--scope user \
--header "Authorization: Bearer your_token" \
justoneapi https://mcp.justoneapi.com/mcpCheck the saved configuration with:
claude mcp get justoneapiAfter starting Claude Code, enter /mcp to confirm that JustOneAPI is connected. For more details, see the official Claude Code MCP documentation.
Codex
Codex can read the Bearer token from an environment variable. Set the token in the terminal that launches Codex, then add the remote MCP server:
export JUSTONEAPI_TOKEN="your_token"
codex mcp add justoneapi \
--url https://mcp.justoneapi.com/mcp \
--bearer-token-env-var JUSTONEAPI_TOKENConfirm that the configuration was saved:
codex mcp get justoneapiCodex CLI, Codex App, and the Codex IDE extension read the same ~/.codex/config.toml configuration. Make sure the process that launches Codex can read JUSTONEAPI_TOKEN, then restart Codex. For more details, see the official Codex MCP documentation.
Cursor
First, set an environment variable for the process that launches Cursor:
export JUSTONEAPI_TOKEN="your_token"Then add the following configuration to the global file at ~/.cursor/mcp.json. If the file already contains mcpServers, merge only the justoneapi entry.
{
"mcpServers": {
"justoneapi": {
"url": "https://mcp.justoneapi.com/mcp",
"headers": {
"Authorization": "Bearer ${env:JUSTONEAPI_TOKEN}"
}
}
}
}Restart Cursor, open Customize in the sidebar, and confirm that the JustOneAPI MCP server is enabled and its tools are visible. Cursor must be able to read the environment variable above; if you set it in a terminal, launch Cursor from that same terminal. For more details, see the official Cursor MCP documentation.
Hermes Agent
Hermes Agent supports remote HTTP MCP servers natively. To keep your token out of the main configuration file, first save your JustOneAPI token in Hermes's default environment file at ~/.hermes/.env:
JUSTONEAPI_TOKEN=your_tokenThen add the following entry to ~/.hermes/config.yaml. If the file already contains mcp_servers, merge only the justoneapi entry instead of replacing your existing MCP server configuration.
mcp_servers:
justoneapi:
url: "https://mcp.justoneapi.com/mcp"
headers:
Authorization: "Bearer ${JUSTONEAPI_TOKEN}"
tools:
include:
- search_endpoints
- get_endpoint_schema
- call_endpoint
- get_account_balance
- get_usage_summary
- list_platforms
resources: false
prompts: falsePut only the raw token in the environment file; do not add the Bearer prefix there. The allowlist exposes the standard endpoint discovery, API calling, and account tools while leaving the admin-only catalog refresh tool unavailable.
After saving the configuration, test the connection and tool discovery from your terminal:
hermes mcp test justoneapiOnce the test passes, run hermes chat to start Hermes. If a Hermes session is already open, enter /reload-mcp inside the session to reload the MCP configuration. You can then start with a prompt that only checks endpoint discovery and does not make a paid API call:
Use JustOneAPI to find the Xiaohongshu note comments endpoint and tell me which parameters it requires. Do not call a paid API yet.For more configuration details, see the official Hermes Agent MCP documentation.
Alternative setup: local stdio
Local stdio is useful when the MCP server must run in isolation on your own machine. Because the public npm package can lag behind the hosted service, this tutorial does not recommend treating an unpinned npx -y justoneapi-mcp installation as an equivalent fallback. If you require a local deployment, first check the latest release and tool list on JustOneAPI MCP GitHub. Most users should use the Remote HTTP setup above.
Prompts you can use
After the connection works, you do not need to remember tool names. Ask in normal business language.
Find the Xiaohongshu note comments API and tell me which parameters are required.Which Douyin APIs can get video details?Call the Xiaohongshu note comments API with this note ID: xxxxx.List the Weibo search-related APIs and explain when to use each one.Continue to the next page of results.Check my JustOneAPI balance.Show my recent API usage and spending.The API returned code 400. Help me check which parameter might be wrong.The API returned code 601 or 602. What does it mean?Recommended workflow
- First ask the assistant to find an endpoint, such as “Which API should I use to get Xiaohongshu note comments?”
- Then ask it to inspect parameters, such as “Which fields are required and what does each field mean?”
- Provide business parameters before calling the endpoint. Do not ask the assistant to guess required values.
- If the response includes pagination metadata, ask the assistant to continue with the next-page hint.
- When a call fails, share the response code and error message so the assistant can compare them with the endpoint schema and common return codes.
FAQ
Where should I put the token?
Remote HTTP requests ultimately use the Authorization: Bearer your_token header. Prefer each client's environment-variable mechanism and never commit a real token to a project repository. Local stdio uses the JUSTONEAPI_TOKEN environment variable.
Can I connect Claude Desktop directly?
It depends on whether the Request headers beta has reached your Claude account or organization. If Add custom connector exposes this option, set Header name to Authorization, Header value to Bearer your_token, and enable Required. If the option is unavailable, the current JustOneAPI remote endpoint's static Bearer token cannot be configured directly. On Team and Enterprise plans, only an Owner can add the connector, and static headers are sent as an organization-wide shared credential, so every member would use the same JustOneAPI token. Do not use this setup when each member needs separate billing or permissions. Never put the token in the URL; use Claude Code, Codex, Cursor, or Hermes Agent instead. See the official Claude Request headers documentation for current availability.
How do I connect another MCP client?
Any client that supports Streamable HTTP MCP and custom request headers can use the common MCP URL and Authorization header in this tutorial. Follow that client's official documentation for its exact configuration field names.
Does MCP replace API documentation?
No. MCP is best for letting AI assistants discover and call APIs inside a workflow. API documentation is still the right place for humans to read complete field definitions and endpoint details.
Can the assistant call every API directly?
The assistant calls APIs through your JustOneAPI token. Actual access depends on your account, balance, and endpoint permissions. Before making a call, it is still a good idea to ask the assistant to show the endpoint and parameters it plans to use.
Next steps
If you already have a JustOneAPI token, choose the client you use from Claude Code, Codex, Cursor, or Hermes Agent, follow the steps above, and ask it to find one endpoint for a platform you use often. For complete endpoint details, keep the Just One API Docs open. For source code and release updates, visit JustOneAPI MCP GitHub.
Continue with Just One API
Log in to the Dashboard for your token, read the full API docs, or open the MCP GitHub project for the latest configuration.