Stellar MCP Server

Development

Scripts, adding new tools, and code style.

Available scripts

ScriptDescription
npm run buildCompile TypeScript to JavaScript
npm run start:devRun in development mode with hot reload
npm run start:prodClean, build, then run the compiled output
npm run lintRun ESLint
npm run formatFormat with Prettier
npm testRun the Jest test suite

Adding a new tool

With the feature-based layout, adding a Stellar tool takes four steps:

  1. Define the tool's Zod schema in src/features/<classic|soroban>/schemas.ts.
  2. Implement the tool logic in src/features/<classic|soroban>/<classic|soroban>.ts.
  3. Add the tool definition (name, description, input schema) in src/tools/<classic|soroban>.ts.
  4. Add the corresponding case in the request handler in src/index.ts.

Code style

  • Use TypeScript for all new code.
  • Add JSDoc comments for public functions and classes.
  • Follow the existing patterns and conventions.
  • Use conventional commit messages.

Formatting and linting run automatically on staged files via a Husky pre-commit hook (lint-staged → Prettier + ESLint).

On this page