> For the complete documentation index, see [llms.txt](https://katoshi.gitbook.io/katoshi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://katoshi.gitbook.io/katoshi-docs/mcp/quickstart.md).

# Quickstart

This sections showcases a few ways to get started using our remote MCP server.

{% hint style="warning" %}
The Katoshi MCP server is currently in Beta - Please report any issues or feedback in our [Telegram Group](https://t.me/+KCMjT02DBX84Zjkx)
{% endhint %}

***

### Connection Types <a href="#connection-types" id="connection-types"></a>

Katoshi's MCP server is available via stream for persistent connexion for high-volume data flow.

`https://server.katoshi.ai/x2/mcp/A17mXBLw/mcp/stream`

***

### Authentication <a href="#authentication" id="authentication"></a>

Authentication is required to connect to the MCP server. 2 auth options are available:

#### 1) API Key in URL <a href="#id-1-api-key-in-url" id="id-1-api-key-in-url"></a>

* Pass your Katoshi API Key directly in the URL

`https://server.katoshi.ai/x2/mcp/A17mXBLw/KATOSHI_API_KEY/stream`

#### 2) Bearer Token <a href="#id-2-bearer-token" id="id-2-bearer-token"></a>

* Pass your Katoshi API Key in headers as a bearer token

`https://server.katoshi.ai/x2/mcp/A17mXBLw/mcp/stream`

```
"Authorization": "Bearer KATOSHI_API_KEY"
```

***

{% hint style="warning" %}
The new MCP server below is experimental and still in BETA, use at your own risk.  For better reliability use the one above. More updates coming soon.&#x20;
{% endhint %}

## MCP Endpoint

Katoshi's MCP server is available via stream for persistent connexion for high-volume data flow.

* Pass your `USER_ID` in the id query parameter

<mark style="color:green;">`https://mcp.katoshi.ai?id=USER_ID`</mark>

{% hint style="info" %}
You can find your MCP endpoint and user id in the app's settings page.
{% endhint %}

***

## Authentication

Authentication is required to connect to the MCP server. We provide 2 ways to auth:

### 1)  Bearer Token

* Pass your Katoshi API Key in headers as a bearer token

```
"Authorization": "Bearer KATOSHI_API_KEY"
```

### 2)  URL Query Parameter

* Pass your Katoshi API Key to the `api_key` query parameter

<mark style="color:green;">`https://mcp.katoshi.ai?id=USER_ID&api_key=API_KEY`</mark>

***

## Client Integrations

### Katoshi

The easiest way to use our MCP is by creating an [AI Agent](/katoshi-docs/app/agents.md) directly in the Katoshi app.&#x20;

* Our native AI agents are already connected to our MCP and have even more tools that allows agents to read charts, run technical analysis, and more.&#x20;
* Katoshi Agents are also API-ready out-of-the-box, so you can send commands to your agents via simple POST requests. See the [Agent API](/katoshi-docs/api/agent-api.md) section for more info.

> Continue reading below if you prefer to use and setup your own Agentic framework or AI tools

### Cursor

Clients like `Cursor` will require you to add MCP servers in the `mcp.json` file.

```json
{
  "mcpServers": {
    "katoshi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.katoshi.ai?id=USER_ID&api_key=API_KEY"
      ]
    }
  }
}
```

* Replace `USER_ID` with your user id and  `API_KEY`  with your Katoshi API Key

{% hint style="warning" %}
The `mcp-remote` package requires Node.js 22 or higher.
{% endhint %}

### Agentic Frameworks

Agentic frameworks like `LangChain`, `CrewAI`, `AutoGen`, `Agno`, while slightly different will connect to MCP tools in a similar way. Here's a simple example using the [Agno framework](https://docs.agno.com/introduction) that will create a fully functional Agent with memory and full trading capacity due to our MCP tools:

```python
import os
from dotenv import load_dotenv
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openrouter import OpenRouter
from agno.os import AgentOS
from agno.tools.mcp import MCPTools, StreamableHTTPClientParams

# Load environment variables from .env file
load_dotenv()

# ************* Create Agent *************
# See: https://docs.agno.com/concepts/tools/mcp/overview
agno_agent = Agent(
    name="Agno Agent",
    model=OpenRouter(id="anthropic/claude-3.5-sonnet"),
    db=SqliteDb(db_file="agno.db"),
    enable_agentic_memory=True,
    tools=[
        MCPTools(
            transport="streamable-http",
            server_params=StreamableHTTPClientParams(
                url=f"https://mcp.katoshi.ai/?id={os.getenv('USER_ID', '')}",
                headers={
                    "Authorization": f"Bearer {os.getenv('KATOSHI_API_KEY', '')}"
                },
            ),
        )
    ],
    add_history_to_context=True,
    markdown=True,
)

# ************* Create AgentOS *************
agent_os = AgentOS(agents=[agno_agent])
app = agent_os.get_app()

# ************* Run AgentOS *************
if __name__ == "__main__":
    agent_os.serve(app="agno_agent:app", reload=False)
```

### n8n Integration

You can connect the Katoshi MCP to n8n agents using this tutorial:

{% content-ref url="/pages/KKHbR2PFSTGA03Tw82z9" %}
[n8n](/katoshi-docs/integrations/n8n.md)
{% endcontent-ref %}
