> For the complete documentation index, see [llms.txt](https://vibemx.gitbook.io/neuronai-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vibemx.gitbook.io/neuronai-studio/mcp-servers/stdio-and-http.md).

# Stdio & HTTP

NeuronAI Studio supports two MCP transport types: **stdio** (local process) and **HTTP** (remote endpoint).

## Stdio transport

Spawns a local process that communicates over stdin/stdout.

### Configuration

| Field     | Description                       |
| --------- | --------------------------------- |
| `command` | Executable (must be in allowlist) |
| `args`    | Command arguments array           |
| `env`     | Optional environment variables    |

Example — filesystem server:

```php
'filesystem' => [
    'transport' => 'stdio',
    'command' => 'npx',
    'args' => ['-y', '@modelcontextprotocol/server-filesystem', storage_path('app')],
],
```

### Stdio allowlist

Only commands in `mcp_stdio_allowlist` can be executed:

```php
'mcp_stdio_allowlist' => [
    'npx', 'node', 'python', 'python3', 'uv', 'uvx',
],
```

An empty allowlist allows all commands (not recommended in production).

## HTTP transport

Connects to a remote MCP server over HTTP.

### Configuration

| Field       | Description                                |
| ----------- | ------------------------------------------ |
| `url`       | MCP endpoint URL                           |
| `token_env` | Environment variable name for bearer token |

Example:

```php
'telescope' => [
    'transport' => 'http',
    'url' => env('TELESCOPE_MCP_URL'),
    'token_env' => 'TELESCOPE_MCP_TOKEN',
],
```

```env
TELESCOPE_MCP_URL=http://127.0.0.1:8000/telescope/mcp
TELESCOPE_MCP_TOKEN=your-token
```

## Test tool discovery

In the MCP server editor, use **Test Discovery** to list available tools from the server before binding to agents.

> **Screenshot pending:** MCP server editor with test discovery.
>
> Asset path: `docs/assets/screenshots/mcp-servers-edit.png` Capture: MCP server edit page — dark theme, 1440×900

## Transport comparison

| Aspect     | Stdio                         | HTTP                                   |
| ---------- | ----------------------------- | -------------------------------------- |
| Deployment | Same machine as Laravel       | Remote service                         |
| Startup    | Spawns process per session    | HTTP request                           |
| Security   | Command allowlist             | Token auth                             |
| Use case   | Local tools (filesystem, CLI) | Shared services (Telescope, SaaS APIs) |

## Workflow MCP node

Workflows can invoke MCP tools directly via the **MCP node**. See [AI Nodes](/neuronai-studio/workflows/ai-nodes.md).

## Related code

* `src/MCP/McpStdioTransport.php`
* `src/Registry/McpRegistry.php`
* `src/Runtime/McpToolResolver.php`

## Next steps

* [Agent Binding](/neuronai-studio/mcp-servers/agent-binding.md)
* [Security & Access](/neuronai-studio/workflows/security-and-access.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vibemx.gitbook.io/neuronai-studio/mcp-servers/stdio-and-http.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
