# Tianyancha CLI MCP server

> Provides access to 162 business data tools covering enterprise registration, risk compliance, intellectual property, and executive information.

- Repository: https://github.com/tyc-tech/tyc-cli
- Page: https://hostedmcp.org/servers/tyc-tech/tyc-cli
- Transport: stdio
- Stars: 24
- License: MIT

## Install

### Claude Code

```sh
claude mcp add tyc-cli -- npx -y tyc-cli
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "tyc-cli": {
      "command": "npx",
      "args": [
        "-y",
        "tyc-cli"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "tyc-cli": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "tyc-cli"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"tyc-cli","type":"stdio","command":"npx","args":["-y","tyc-cli"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "tyc-cli": {
      "command": "npx",
      "args": [
        "-y",
        "tyc-cli"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add tyc-cli -- npx -y tyc-cli
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.tyc-cli]
command = "npx"
args = ["-y", "tyc-cli"]
```

### Gemini CLI

```sh
gemini mcp add -s user tyc-cli npx -- -y tyc-cli
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "tyc-cli": {
      "command": "npx",
      "args": [
        "-y",
        "tyc-cli"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MCP_URL` | no | no |  |

## FAQ

### How do I log in to the official MCP server?

You can use the `tyc login` command to perform a browser-based OAuth login using the PKCE authorization code flow.

### Can I use my own Tianyancha OpenAPI token?

Yes, you can directly write your existing OpenAPI token using the `tyc init --authorization` command.
