Build with Claude Code and Codex
You can drive Obside from a coding assistant such as Claude Code or Codex over the Model Context Protocol (MCP). Once connected, the assistant can search assets, write agent code, validate it, create the agent, back it and read the results, all from your editor or terminal. This page is the end-to-end workflow, the setup for each client, and the security model that makes it safe.
Connecting requires an eligible paid plan. See AI connections (MCP) for the account side.
Get a token
Go to app.obside.com/settings/mcp, generate a token, and copy it. It is shown once. Name one token per client so you can revoke them independently.
Connect Claude Code
Add the Obside MCP server (keep the header after the URL):
claude mcp add --transport http --scope user obside https://api.obside.com/mcp \
--header "Authorization: Bearer YOUR_TOKEN"
Then, in a session, /mcp shows the connection and the Obside tools become available.
Connect Codex
Codex declares MCP servers in its config file, ~/.codex/config.toml. Keep the token in an environment variable rather than in the file: Codex reads it from the variable you name, and never expands ${...} placeholders inside the file.
[mcp_servers.obside]
url = "https://api.obside.com/mcp"
bearer_token_env_var = "OBSIDE_TOKEN"
Export the variable (export OBSIDE_TOKEN="YOUR_TOKEN") where Codex can see it. The same can be done in one command:
codex mcp add obside --url https://api.obside.com/mcp --bearer-token-env-var OBSIDE_TOKEN
No feature flag is needed. If a tool does not appear, run codex mcp list or /mcp to confirm the server started and the variable was set.
The workflow
- Resolve the asset. Call
search_assetsto turn a name or ticker into the identifiers Obside uses. Pin exactly the listing you mean. - Write the code. Use this developer section as the reference: Agent code (STSE), Structure and lifecycle, the Manager API, Types, the Indicator reference, Orders, trades and risk, Schedules, News, data and AI, the Validation rules, Pitfalls and the Examples.
- Validate. Call
validate_agent_codewith your code. It returns either that the code is valid, or a list of errors with a code, line and column. Fix and repeat until it is valid. This is free and runs nothing. - Create the agent. Call
create_agentwith a plain-languagepromptdescribing the intent, and optionally your validatedcode. Obside resolves the assets, reviews the code and builds the agent. If the code was invalid it tells you so without building. Large multi-asset builds run in the background: when the result says the build is pending, pollget_agent_buildwith the returned build id rather than callingcreate_agentagain. - Backtest and run. Call
start_backtestand pollget_backtestfor the metrics and equity curve. Activate the agent when you are satisfied. Live trading and monitoring follow the same regional and plan rules as the app, and real-money actions always require an explicit confirmation.
Starting from a TradingView Pine Script
A Pine Script needs no translation: call import_pine_script with the script exactly as it is, plus the source of each library it imports. Obside's own Pine engine runs it as-is, with TradingView's rules, and returns a custom indicator: its class, and the titles of its alerts, markers and plots. Then call create_agent without code, with a prompt that names that indicator: Obside's builder writes the agent on it, following a strategy's positions or reading an indicator's signals. If the engine refuses the script, the result says why (a line to fix, a library to add, or a Pine feature Obside does not support yet). A Pine Script passed in code, or in a prompt before it is imported, is refused without building.
The security model, briefly
Your code is treated as a specification, not something Obside runs as-is. When you pass code to create_agent, Obside validates it deterministically, then its own builder reimplements the intent into a reviewed, type-checked agent, and only that result is saved. Anything the code does that the engine does not support is reported back to you instead of being forced through. This is why you always get a clean, checkable agent, and why a mistake in your draft cannot do anything unsafe.
Two more guarantees worth knowing: the connection is scoped to your account and respects the same permissions as the app, and every real-money action needs an explicit confirmation flag on the call, so an assistant can never place a real order silently.
The Obside skill
Obside publishes a reusable Agent Skill that packages this workflow and the STSE essentials for a coding assistant. It is a single Markdown file:
https://obside.com/skills/obside-stse/SKILL.md
Install it once so your assistant loads it automatically.
- Claude Code: save it as
~/.claude/skills/obside-stse/SKILL.md. - Codex: save it as
~/.agents/skills/obside-stse/SKILL.md(older Codex versions read~/.codex/skills/obside-stse/SKILL.md). Invoke it with$obside-stseor list skills with/skills.
The skill links back to the raw Markdown of these pages (append .md to any docs URL) so the assistant can pull the full reference on demand.
Without installing anything
The Obside MCP connection serves the same material itself, so there is nothing to install: it is available through the connection. The skill is the MCP resource obside://skills/obside-stse, and every page of this developer section is a resource under obside://docs/developers/ (for example obside://docs/developers/stse/manager-api). They are the same files that are published on this site, shipped together with the server, so the reference you read always matches the validation that checks your code.
There is also a prompt, build_agent, that loads the skill and starts the workflow above. It takes an optional idea argument, the agent you want in plain language. In Claude Code it appears as /mcp__obside__build_agent, and Claude Code can read the resources on its own. In a chat app such as claude.ai or Claude Desktop, an assistant does not load a resource by itself: attach it yourself, or run build_agent, which loads the skill for you. Reading resources and running prompts needs the same token and paid plan as the tools.