Pharos MCP Server
Enables querying Pharos blockchain data (EVM-compatible) through MCP, with read-only tools for blocks, transactions, balances, and contract calls, plus optional transaction broadcasting when self-hosted.
README
Pharos MCP Server
An MCP server that brings Pharos chain data into MCP-compatible IDEs and agent workflows — Claude Desktop, Cursor, Windsurf, and custom agent runners.
- Network: Pharos (EVM-compatible, 100% Ethereum-compatible)
- Chain ID:
1672(0x688) - RPC:
https://rpc.pharos.xyz - Native token: PROS
- Hosted endpoint:
https://mcp.pharos.xyz/mcp
Quick start — use the hosted server
No API key required. Add this to your MCP client configuration:
{
"mcpServers": {
"pharos": {
"type": "http",
"url": "https://mcp.pharos.xyz/mcp"
}
}
}
The hosted endpoint speaks Streamable HTTP, so your client must support remote MCP
servers. Clients that only support stdio can bridge with
mcp-remote:
{
"mcpServers": {
"pharos": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.pharos.xyz/mcp"]
}
}
}
Once connected, ask your agent things like "what's the latest Pharos block?" or "check the PROS balance of 0x…".
Rate limit: 120 requests per minute per IP. Exceeding it returns HTTP 429 with a
Retry-After header.
Tools
13 read-only tools are available today.
| Tool | Underlying JSON-RPC | Description | Parameters |
|---|---|---|---|
get_chain_info |
eth_chainId, eth_blockNumber, web3_clientVersion |
Chain ID, client version, latest block | — |
get_block_number |
eth_blockNumber |
Latest block height | — |
get_balance |
eth_getBalance |
Native PROS balance of an address | address, block? |
get_transaction_count |
eth_getTransactionCount |
Address nonce | address, block? |
get_gas_price |
eth_gasPrice, eth_maxPriorityFeePerGas |
Current gas price and priority fee | — |
get_block |
eth_getBlockByNumber |
Block by tag or number | block?, includeTransactions? |
get_transaction |
eth_getTransactionByHash |
Transaction by hash | hash |
get_transaction_receipt |
eth_getTransactionReceipt |
Transaction receipt | hash |
get_code |
eth_getCode |
Contract bytecode | address, block? |
get_storage_at |
eth_getStorageAt |
Read a contract storage slot | address, position, block? |
eth_call |
eth_call |
Read-only contract call | transaction, block? |
estimate_gas |
eth_estimateGas |
Estimate gas without sending | transaction |
get_logs |
eth_getLogs |
Event logs over a block range (max 5000 blocks per call) | address?, topics?, fromBlock?, toBlock? |
block accepts a named tag (latest, earliest, pending, safe, finalized), a
decimal number, or a 0x hex quantity.
Transaction broadcasting
A send_raw_transaction tool exists but is disabled on the hosted endpoint
(ENABLE_SEND_RAW_TRANSACTION=false), which is therefore read-only. Calling it there
returns an error.
The design is non-custodial: the server never receives or stores a private key. It only relays a transaction you already signed locally. If you self-host and enable it, put authentication in front of the endpoint first — an open, unauthenticated broadcast endpoint lets anyone push transactions through your node.
Self-hosting
Requires Node.js 20+.
npm install
npm run build
stdio transport
npm start
{
"mcpServers": {
"pharos": {
"command": "node",
"args": ["/absolute/path/to/pharos-mcp/dist/src/index.js"],
"env": {
"PHAROS_RPC_URL": "https://rpc.pharos.xyz",
"PHAROS_CHAIN_ID": "1672",
"PHAROS_NATIVE_SYMBOL": "PROS"
}
}
}
}
HTTP transport
MCP_TRANSPORT=http \
MCP_HOST=127.0.0.1 \
MCP_PORT=3001 \
MCP_AUTH_TOKEN="$(openssl rand -hex 32)" \
npm start
- MCP endpoint:
http://127.0.0.1:3001/mcp(POST only) - Health check:
http://127.0.0.1:3001/health
With MCP_AUTH_TOKEN set, clients must send Authorization: Bearer <token>.
Scaling note. In HTTP mode each MCP session is held in the server process's memory. Running multiple instances behind a load balancer therefore needs real session affinity — and cookie-based stickiness is not enough, because MCP clients generally do not store or resend cookies. Requests that land on an instance which does not own the session fail with
Unknown MCP session. Run a single instance, or move session state into a shared store before scaling out.
Docker
docker build -t pharos-mcp-server .
docker run -p 3001:3001 -e MCP_TRANSPORT=http -e MCP_HOST=0.0.0.0 pharos-mcp-server
Configuration
| Variable | Default | Description |
|---|---|---|
PHAROS_RPC_URL |
https://rpc.pharos.xyz |
Upstream JSON-RPC endpoint |
PHAROS_CHAIN_ID |
1672 |
Expected chain ID |
PHAROS_NATIVE_SYMBOL |
PROS |
Native token symbol |
MCP_TRANSPORT |
stdio |
stdio or http |
MCP_HOST |
127.0.0.1 |
Bind address (use 0.0.0.0 in containers) |
MCP_PORT |
3001 |
HTTP port |
MCP_AUTH_TOKEN |
— | Bearer token; auth is off when unset |
ENABLE_SEND_RAW_TRANSACTION |
false |
Enable transaction broadcasting |
RATE_LIMIT_PER_MINUTE |
120 |
Per-IP request cap; 0 disables |
TRUST_PROXY |
false |
Set true when running behind exactly one trusted proxy (e.g. an ALB) so rate limiting uses the real client IP. Leave false if the server is directly reachable — otherwise clients can spoof X-Forwarded-For and evade the limiter |
MAX_SESSIONS |
500 |
Maximum concurrent MCP sessions; new sessions past the cap get 503. 0 disables the cap |
SESSION_TIMEOUT_MINUTES |
30 |
Idle sessions are evicted after this long |
Development
npm test # unit tests + a live chain ID check
npm run smoke # end-to-end MCP test over stdio against the real RPC
npm run smoke:http # end-to-end test against a running HTTP server
npm run smoke exercises the write path by signing a zero-value transaction with a freshly
generated empty wallet. The RPC rejects it for insufficient funds, so nothing is broadcast
on-chain.
Security notes
- Never pass a private key or mnemonic to this server; it has no use for one.
send_raw_transactionis disabled by default.- HTTP binds to
127.0.0.1by default. - For a public deployment, terminate TLS in front of the server and keep rate limiting on.
admin_*,debug_*,personal_*andtxpool_*methods are not exposed.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。