MCP Server
This guide is for developers who want to work with Vluna through a coding agent.
You only need to complete connection setup once. After that, you can describe business goals in natural language and let the agent choose and orchestrate MCP tools.
What changes after MCP is connected
Your workflow becomes:
- Complete one-time MCP setup.
- Describe the target outcome in chat.
- Review returned data, decisions, and applied changes.
Example prompts:
- "List all current OpenAI features and pricing."
- "Sync
gpt-4o-minicost to official price and set 20% markup." - "Show total revenue, total cost, and margin for the last 30 days."
One-time setup
1. Create a production token
Open:
Recommended:
- Go to
Account > Advanced. - Create a token for coding-agent MCP usage (for example:
vluna-mcp-prod). - Store it securely.
2. Set local environment variable (macOS)
launchctl setenv VLUNA_PRODUCTION_TOKEN 'YOUR_PRODUCTION_TOKEN'
launchctl getenv VLUNA_PRODUCTION_TOKEN
If your coding agent app was already running (for example from Dock), restart it after setting the variable.
3. Configure remote MCP in Codex
[mcp_servers.vluna-us-east-1]
transport = "streamable_http"
url = "https://mcp.us-east-1.vluna.ai/mcp/"
bearer_token_env_var = "VLUNA_PRODUCTION_TOKEN"
After updating config, restart Codex.
First verification
Ask Codex:
- "Check whether
vluna-us-east-1MCP is connected and usable, and show current context."
Expected result:
- MCP connection is healthy.
- Current realm context is visible.
- Session state is visible.
Notes:
- Realm can be selected automatically from token-accessible realms.
- If you have multiple realms, ask Codex to switch to a specific realm before changes.
What you can do through MCP
Asset inventory
Use Codex to:
- list
feature_family/feature/meter - find missing or unconfigured items
- filter by provider (for example OpenAI)
Example prompts:
- "List all OpenAI features and their current prices."
- "Find features or meters that are still missing required pricing config."
Pricing and cost operations
Use Codex to:
- create features and related meters
- update cost/price in batches
- produce change plans before write actions
Example prompts:
- "Create feature
openai.gpt-4o-miniunderllm.standard, map all input/output token meter types, and set cost by official pricing." - "Recalculate this feature with 20% markup over cost, show plan first, then wait for confirmation."
Reports and operations analysis
Use Codex to:
- query revenue/cost/margin summaries
- compare windows (7d vs 30d)
- generate concise operational summaries
Example prompts:
- "Total cost in the last 30 days."
- "Margin trend for the last 7 days."
- "Show revenue only, no cost."
Team playbooks
Playbook A: pre-launch configuration
- "List existing features and meters for the target capability area."
- "Generate a pending configuration plan from my product list."
- "Show change list first; wait for my approval."
- "Apply and read back verification results."
Playbook B: pricing governance
- "Pull current OpenAI feature cost/price matrix."
- "Recompute using official costs and propose markup policy."
- "Apply after approval."
- "Output before/after diff."
Playbook C: business review
- "Show 7d and 30d revenue/cost/margin."
- "Rank by feature contribution."
- "Flag anomalies and suggest next actions."
What developers do not need to do
You usually do not need to:
- manually pick MCP tool names
- handcraft complex tool parameters
- understand MCP transport internals
- read server implementation code before doing routine operations
Focus on business goals, constraints, and acceptance criteria.
FAQ
Do I need to manually set realm every time?
No. Realm can be auto-selected from token-accessible realms.
If multiple realms are available, explicitly ask Codex to switch to the target realm.
Why can Codex execute with goal-only prompts?
Because Codex can select MCP tools and assemble parameters from your goal and constraints.
When do I need low-level details?
Mostly during troubleshooting, such as authentication issues, network transport errors, or malformed request context.
Can I put token literal directly in bearer_token_env_var?
No.
bearer_token_env_var must be the environment variable name, not the token value.
Correct:
bearer_token_env_var = "VLUNA_PRODUCTION_TOKEN"
Then Codex reads the actual token from that environment variable at runtime.