Skip to main content

Solscan MCP Server

A Model Context Protocol (MCP) server implementation for interacting with the Solscan Pro API. This server allows AI agents to fetch and analyze token, transaction, and DeFi activity data from the Solana blockchain.

Overview

This MCP server provides a bridge between AI agents and the Solscan Pro API service. It follows the best practices laid out by Anthropic for building MCP servers, allowing seamless integration with any MCP-compatible client.

Features

The server provides several essential tools for interacting with Solscan:

  1. token_meta: Get token metadata

    • Fetch comprehensive token information
    • Get name, symbol, price, market cap, etc.
  2. token_markets: Get token market data and liquidity pools

    • View market pairs and liquidity pools
    • Filter by program addresses
    • Sort and paginate results
  3. token_holders: Get token holder distribution

    • View holder balances and distribution
    • Filter by amount ranges
    • Paginate through results
  4. token_price: Get token price information

    • Historical price data
    • Filter by date range
    • Price trends and statistics
  5. token_accounts: Get token holdings for a wallet

    • List token and NFT holdings
    • Filter zero balances
    • Paginate results
  6. defi_activities: Get DeFi activities for a wallet

    • Filter by activity type and platform
    • Sort by time or other metrics
    • Comprehensive activity details
  7. balance_change: Get balance change activities

    • Track token balance changes
    • Filter by token and amount
    • Remove spam transactions
  8. account_transactions: Get wallet transactions

    • List wallet transactions
    • Paginate through transaction history
    • Configurable result limits
  9. transaction_detail: Get transaction information

    • Detailed transaction data
    • Parsed instructions
    • Fee information
  10. transaction_actions: Get transaction actions

  • List token transfers
  • View program interactions
  • Decoded instruction data

Prerequisites

  • Python 3.10+
  • Solscan Pro API key (obtain from Solscan APIs)
  • Docker if running the MCP server as a container (recommended)

Installation

Using uv (Recommended)

When using uv, no specific installation is needed. We use uvx to directly run solscan-mcp-server.

Using pip

Alternatively, install via pip:

pip install solscan-mcp-server

Configuration

You can configure the server using either environment variables or command-line arguments:

Option Env Variable CLI Argument Default Description
API Key SOLSCAN_API_KEY --api-key Required Your Solscan Pro API key
Transport TRANSPORT --transport sse Transport protocol (sse or stdio)
Host HOST --host 127.0.0.1 Host to bind to when using SSE transport
Port PORT --port 8050 Port to listen on when using SSE transport
Log Level LOG_LEVEL --verbose INFO Logging level (use -v or -vv for detail)

Running the Server

Using uvx (Recommended)

# Using environment variables:
SOLSCAN_API_KEY=your-key uvx solscan-mcp-server

# Using CLI arguments:
uvx solscan-mcp-server --api-key your-key

Using pip Installation

# Using environment variables:
SOLSCAN_API_KEY=your-key python -m solscan_mcp_server

# Using CLI arguments:
python -m solscan_mcp_server --api-key your-key

Using Docker

# Build the image
docker build -t solscan-mcp-server .

# Run with environment variables
docker run -e SOLSCAN_API_KEY=your-key solscan-mcp-server

Integration with MCP Clients

Claude Desktop Configuration

Using uvx (Recommended)

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "solscan": {
      "command": "uvx",
      "args": ["solscan-mcp-server"]
    }
  }
}

Using pip Installation

{
  "mcpServers": {
    "solscan": {
      "command": "python",
      "args": ["-m", "solscan_mcp_server"]
    }
  }
}

Zed Configuration

Add to your Zed settings.json:

"context_servers": {
  "solscan": {
    "command": {
      "path": "uvx",
      "args": ["solscan-mcp-server"]
    }
  }
}

Development

Running Tests

# Install dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

Code Quality

# Run type checker
pyright

# Run linter
ruff check .

Debugging

You can use the MCP inspector to debug the server:

npx @modelcontextprotocol/inspector uvx solscan-mcp-server

For development debugging:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for solscan-mcp-server 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solscan-mcp-server 0.2.0
File Size Uploaded Provenance
solscan_mcp_server-0.2.0.tar.gz 79.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for solscan-mcp-server 0.2.0
File Interpreter ABI Platform
solscan_mcp_server-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 89.7 kB

Release files / solscan_mcp_server-0.2.0.tar.gz

Download URL solscan_mcp_server-0.2.0.tar.gz
Size 79.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2df8a0e4b75bfd2103046a14ba701b59cc7920af260f84c8ea28235e84568bef
BLAKE2b-256 checksum
How to use checksums
ca48a5490563bd5ad242d1f958d62c4f28f002ff04bdb4e92247053cf17f2f9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Release files / solscan_mcp_server-0.2.0-py3-none-any.whl

Download URL solscan_mcp_server-0.2.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f27cc29c649e94615ed4c99791a52da033bb954fb8772a94d6349648350d8dc
BLAKE2b-256 checksum
How to use checksums
914bde26c0b51a575ffefea4d00bf11d9709328f5b09538bdf40ab5a1f0874ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.1

Security for solscan-mcp-server 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page